mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
rocker: mark copy-to-cpu pkts as forwarding offloaded
For pkts copied to the CPU (to be processed by guest driver), mark the Rx descriptor with flag "OFFLOAD_FWD" to indicate device has already forwarded pkt. The guest driver will use this indicator to avoid duplicate forwarding in the guest OS. Examples include bcast/mcast/unknown ucast pkts flooded to bridged ports. We want to avoid both the device and the guest bridge driver flooding these pkts, which would result in duplicates pkts on the wire. Packet sampling, such as sFlow, can also use this technique to mark pkts for the guest OS to record but otherwise drop. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Message-id: 1435746792-41278-5-git-send-email-sfeldma@gmail.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
96497af0af
commit
d0d2555852
5 changed files with 15 additions and 3 deletions
|
@ -637,6 +637,7 @@ The TLVs for Rx descriptor buffer are:
|
|||
(1 << 5): TCP packet
|
||||
(1 << 6): UDP packet
|
||||
(1 << 7): TCP/UDP csum good
|
||||
(1 << 8): Offload forward
|
||||
RX_CSUM 2 IP calculated checksum:
|
||||
IPv4: IP payload csum
|
||||
IPv6: header and payload csum
|
||||
|
@ -645,6 +646,9 @@ The TLVs for Rx descriptor buffer are:
|
|||
RX_FRAG_MAX_LEN 2 Packet maximum fragment length
|
||||
RX_FRAG_LEN 2 Actual packet fragment length after receive
|
||||
|
||||
Offload forward RX_FLAG indicates the device has already forwarded the packet
|
||||
so the host CPU should not also forward the packet.
|
||||
|
||||
Possible status return codes in descriptor on completion are:
|
||||
|
||||
DESC_COMP_ERR reason
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue