Revision tags: v9.1.0 |
|
#
4cadf102 |
| 24-Jan-2024 |
Laurent Vivier <lvivier@redhat.com> |
e1000e: fix link state on resume
On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() that sets link_down to false, and thus activates the link even if we have disabled it.
The p
e1000e: fix link state on resume
On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() that sets link_down to false, and thus activates the link even if we have disabled it.
The problem can be reproduced starting qemu in paused state (-S) and then set the link to down. When we resume the machine the link appears to be up.
Reproducer:
# qemu-system-x86_64 ... -device e1000e,netdev=netdev0,id=net0 -S
{"execute": "qmp_capabilities" } {"execute": "set_link", "arguments": {"name": "net0", "up": false}} {"execute": "cont" }
To fix the problem, merge the content of e1000e_vm_state_change() into e1000e_core_post_load() as e1000 does.
Buglink: https://issues.redhat.com/browse/RHEL-21867 Fixes: 6f3fbe4ed06a ("net: Introduce e1000e device emulation") Suggested-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
e710f9c4 |
| 29-May-2023 |
Tomasz Dzieciol <t.dzieciol@partner.samsung.com> |
e1000e: rename e1000e_ba_state and e1000e_write_hdr_to_rx_buffers
Rename e1000e_ba_state according and e1000e_write_hdr_to_rx_buffers for consistency with IGB.
Signed-off-by: Tomasz Dzieciol <t.dzi
e1000e: rename e1000e_ba_state and e1000e_write_hdr_to_rx_buffers
Rename e1000e_ba_state according and e1000e_write_hdr_to_rx_buffers for consistency with IGB.
Signed-off-by: Tomasz Dzieciol <t.dzieciol@partner.samsung.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
17ccd016 |
| 29-May-2023 |
Tomasz Dzieciol <t.dzieciol@partner.samsung.com> |
igb: RX payload guest writting refactoring
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes.
Signed-off-by: Tomasz Dzieciol <t
igb: RX payload guest writting refactoring
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes.
Signed-off-by: Tomasz Dzieciol <t.dzieciol@partner.samsung.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
a86aee7e |
| 29-May-2023 |
Tomasz Dzieciol <t.dzieciol@partner.samsung.com> |
igb: rename E1000E_RingInfo_st
Rename E1000E_RingInfo_st and E1000E_RingInfo according to qemu typdefs guide.
Signed-off-by: Tomasz Dzieciol <t.dzieciol@partner.samsung.com> Reviewed-by: Akihiko Od
igb: rename E1000E_RingInfo_st
Rename E1000E_RingInfo_st and E1000E_RingInfo according to qemu typdefs guide.
Signed-off-by: Tomasz Dzieciol <t.dzieciol@partner.samsung.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
2ab0ec31 |
| 31-Jul-2023 |
Andrew Melnychenko <andrew@daynix.com> |
tap: Add USO support to tap device.
Passing additional parameters (USOv4 and USOv6 offloads) when setting TAP offloads
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Signed-off-by: A
tap: Add USO support to tap device.
Passing additional parameters (USOv4 and USOv6 offloads) when setting TAP offloads
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Signed-off-by: Andrew Melnychenko <andrew@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
e4142700 |
| 02-Jun-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Add ICR clearing by corresponding IMS bit
The datasheet does not say what happens when interrupt was asserted (ICR.INT_ASSERT=1) and auto mask is *not* active. However, section of 13.3.27 th
e1000e: Add ICR clearing by corresponding IMS bit
The datasheet does not say what happens when interrupt was asserted (ICR.INT_ASSERT=1) and auto mask is *not* active. However, section of 13.3.27 the PCIe* GbE Controllers Open Source Software Developer’s Manual, which were written for older devices, namely 631xESB/632xESB, 82563EB/82564EB, 82571EB/82572EI & 82573E/82573V/82573L, does say: > If IMS = 0b, then the ICR register is always clear-on-read. If IMS is > not 0b, but some ICR bit is set where the corresponding IMS bit is not > set, then a read does not clear the ICR register. For example, if > IMS = 10101010b and ICR = 01010101b, then a read to the ICR register > does not clear it. If IMS = 10101010b and ICR = 0101011b, then a read > to the ICR register clears it entirely (ICR.INT_ASSERTED = 1b).
Linux does no longer activate auto mask since commit 0a8047ac68e50e4ccbadcfc6b6b070805b976885 and the real hardware clears ICR even in such a case so we also should do so.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441 Signed-off-by: Andrew Melnychenko <andrew@daynix.com> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
ad431f0f |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Notify only new interrupts
In MSI-X mode, if there are interrupts already notified but not cleared and a new interrupt arrives, e1000e incorrectly notifies the notified ones again along with
e1000e: Notify only new interrupts
In MSI-X mode, if there are interrupts already notified but not cleared and a new interrupt arrives, e1000e incorrectly notifies the notified ones again along with the new one.
To fix this issue, replace e1000e_update_interrupt_state() with two new functions: e1000e_raise_interrupts() and e1000e_lower_interrupts(). These functions don't only raise or lower interrupts, but it also performs register writes which updates the interrupt state. Before it performs a register write, these function determines the interrupts already raised, and compares with the interrupts raised after the register write to determine the interrupts to notify.
The introduction of these functions made tracepoints which assumes that the caller of e1000e_update_interrupt_state() performs register writes obsolete. These tracepoints are now removed, and alternative ones are added to the new functions.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
7e64a9ca |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
igb: Strip the second VLAN tag for extended VLAN
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
|
#
907209e3 |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
igb: Implement Rx SCTP CSO
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
|
#
54ced75e |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Rename a variable in e1000e_receive_internal()
Rename variable "n" to "causes", which properly represents the content of the variable.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com
e1000e: Rename a variable in e1000e_receive_internal()
Rename variable "n" to "causes", which properly represents the content of the variable.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
5c867340 |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Reset packet state after emptying Tx queue
Keeping Tx packet state after the transmit queue is emptied has some problems: - The datasheet says the descriptors can be reused after the transmi
e1000e: Reset packet state after emptying Tx queue
Keeping Tx packet state after the transmit queue is emptied has some problems: - The datasheet says the descriptors can be reused after the transmit queue is emptied, but the Tx packet state may keep references to them. - The Tx packet state cannot be migrated so it can be reset anytime the migration happens.
Always reset Tx packet state always after the queue is emptied.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
8b876b99 |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Always log status after building rx metadata
Without this change, the status flags may not be traced e.g. if checksum offloading is disabled.
Signed-off-by: Akihiko Odaki <akihiko.odaki@day
e1000e: Always log status after building rx metadata
Without this change, the status flags may not be traced e.g. if checksum offloading is disabled.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
5052fc9e |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000x: Rename TcpIpv6 into TcpIpv6Ex
e1000e and igb employs NetPktRssIpV6TcpEx for RSS hash if TcpIpv6 MRQC bit is set. Moreover, igb also has a MRQC bit for NetPktRssIpV6Tcp though it is not imple
e1000x: Rename TcpIpv6 into TcpIpv6Ex
e1000e and igb employs NetPktRssIpV6TcpEx for RSS hash if TcpIpv6 MRQC bit is set. Moreover, igb also has a MRQC bit for NetPktRssIpV6Tcp though it is not implemented yet. Rename it to TcpIpv6Ex to avoid confusion.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
e9e5b930 |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000x: Share more Rx filtering logic
This saves some code and enables tracepoint for e1000's VLAN filtering.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman
e1000x: Share more Rx filtering logic
This saves some code and enables tracepoint for e1000's VLAN filtering.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
310a128e |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Always copy ethernet header
e1000e_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensur
e1000e: Always copy ethernet header
e1000e_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration.
The size of this copy is just 18 octets, which can be even less than the code size required for checks. This (wrong) optimization is probably not worth so just remove it.
Fixes: 6f3fbe4ed0 ("net: Introduce e1000e device emulation") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
f3f9b726 |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000x: Fix BPRC and MPRC
Before this change, e1000 and the common code updated BPRC and MPRC depending on the matched filter, but e1000e and igb decided to update those counters by deriving the pac
e1000x: Fix BPRC and MPRC
Before this change, e1000 and the common code updated BPRC and MPRC depending on the matched filter, but e1000e and igb decided to update those counters by deriving the packet type independently. This inconsistency caused a multicast packet to be counted twice.
Updating BPRC and MPRC depending on are fundamentally flawed anyway as a filter can be used for different types of packets. For example, it is possible to filter broadcast packets with MTA.
Always determine what counters to update by inspecting the packets.
Fixes: 3b27430177 ("e1000: Implementing various counters") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
a51db580 |
| 22-May-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
hw/net/net_tx_pkt: Decouple interface from PCI
This allows to use the network packet abstractions even if PCI is not used.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jas
hw/net/net_tx_pkt: Decouple interface from PCI
This allows to use the network packet abstractions even if PCI is not used.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
Revision tags: v8.0.0 |
|
#
8d689f6a |
| 10-Apr-2023 |
timothee.cocault@gmail.com <timothee.cocault@gmail.com> |
e1000e: Fix tx/rx counters
The bytes and packets counter registers are cleared on read.
Copying the "total counter" registers to the "good counter" registers has side effects. If the "total" regist
e1000e: Fix tx/rx counters
The bytes and packets counter registers are cleared on read.
Copying the "total counter" registers to the "good counter" registers has side effects. If the "total" register is never read by the OS, it only gets incremented. This leads to exponential growth of the "good" register.
This commit increments the counters individually to avoid this.
Signed-off-by: Timothée Cocault <timothee.cocault@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
f4fdaf00 |
| 24-Mar-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
igb: Fix DMA requester specification for Tx packet
igb used to specify the PF as DMA requester when reading Tx packets. This made Tx requests from VFs to be performed on the address space of the PF,
igb: Fix DMA requester specification for Tx packet
igb used to specify the PF as DMA requester when reading Tx packets. This made Tx requests from VFs to be performed on the address space of the PF, defeating the purpose of SR-IOV. Add some logic to change the requester depending on the queue, which can be assigned to a VF.
Fixes: 3a977deebe ("Intrdocue igb device emulation") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
c9653b77 |
| 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000: Split header files
Some definitions in the header files are invalid for igb so extract them to new header files to keep igb from referring to them.
Signed-off-by: Gal Hammer <gal.hammer@sap.
e1000: Split header files
Some definitions in the header files are invalid for igb so extract them to new header files to keep igb from referring to them.
Signed-off-by: Gal Hammer <gal.hammer@sap.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
65f474bb |
| 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
net/eth: Introduce EthL4HdrProto
igb, a new network device emulation, will need SCTP checksum offloading. Currently eth_get_protocols() has a bool parameter for each protocol currently it supports,
net/eth: Introduce EthL4HdrProto
igb, a new network device emulation, will need SCTP checksum offloading. Currently eth_get_protocols() has a bool parameter for each protocol currently it supports, but there will be a bit too many parameters if we add yet another protocol.
Introduce an enum type, EthL4HdrProto to represent all L4 protocols eth_get_protocols() support with one parameter.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
5fb7d149 |
| 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Implement system clock
The system clock is necessary to implement PTP features. While we are not implementing PTP features for e1000e yet, we do have a plan to implement them for igb, a new
e1000e: Implement system clock
The system clock is necessary to implement PTP features. While we are not implementing PTP features for e1000e yet, we do have a plan to implement them for igb, a new network device derived from e1000e, so add system clock to the common base first.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
69ff5ef8 |
| 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
net/eth: Report if headers are actually present
The values returned by eth_get_protocols() are used to perform RSS, checksumming and segmentation. Even when a packet signals the use of the protocols
net/eth: Report if headers are actually present
The values returned by eth_get_protocols() are used to perform RSS, checksumming and segmentation. Even when a packet signals the use of the protocols which these operations can be applied to, the headers for them may not be present because of too short packet or fragmentation, for example. In such a case, the operations cannot be applied safely.
Report the presence of headers instead of whether the use of the protocols are indicated with eth_get_protocols(). This also makes corresponding changes to the callers of eth_get_protocols() to match with its new signature and to remove redundant checks for fragmentation.
Fixes: 75020a7021 ("Common definitions for VMWARE devices") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
47399506 |
| 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Count CRC in Tx statistics
The datasheet 8.19.29 "Good Packets Transmitted Count - GPTC (0x04080; RC)" says: > This register counts the number of good (no errors) packets > transmitted. A go
e1000e: Count CRC in Tx statistics
The datasheet 8.19.29 "Good Packets Transmitted Count - GPTC (0x04080; RC)" says: > This register counts the number of good (no errors) packets > transmitted. A good transmit packet is considered one that is 64 or > more bytes in length (from <Destination Address> through <CRC>, > inclusively) in length.
It also says similar for the other Tx statistics registers. Add the number of bytes for CRC to those registers.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
#
bf2a7212 |
| 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
e1000e: Combine rx traces
Whether a packet will be written back to the guest depends on the remaining space of the queue. Therefore, e1000e_rx_written_to_guest and e1000e_rx_not_written_to_guest sho
e1000e: Combine rx traces
Whether a packet will be written back to the guest depends on the remaining space of the queue. Therefore, e1000e_rx_written_to_guest and e1000e_rx_not_written_to_guest should log the index of the queue instead of generated interrupts. This also removes the need of e1000e_rx_rss_dispatched_to_queue, which logs the queue index.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|