mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
f199b13bc1
commit
7e64a9cabb
6 changed files with 66 additions and 43 deletions
|
@ -1611,6 +1611,7 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt,
|
|||
E1000E_RxRing rxr;
|
||||
E1000E_RSSInfo rss_info;
|
||||
size_t total_size;
|
||||
int strip_vlan_index;
|
||||
int i;
|
||||
|
||||
trace_e1000e_rx_receive_iov(iovcnt);
|
||||
|
@ -1672,9 +1673,18 @@ igb_receive_internal(IGBCore *core, const struct iovec *iov, int iovcnt,
|
|||
|
||||
igb_rx_ring_init(core, &rxr, i);
|
||||
|
||||
if (!igb_rx_strip_vlan(core, rxr.i)) {
|
||||
strip_vlan_index = -1;
|
||||
} else if (core->mac[CTRL_EXT] & BIT(26)) {
|
||||
strip_vlan_index = 1;
|
||||
} else {
|
||||
strip_vlan_index = 0;
|
||||
}
|
||||
|
||||
net_rx_pkt_attach_iovec_ex(core->rx_pkt, iov, iovcnt, iov_ofs,
|
||||
igb_rx_strip_vlan(core, rxr.i),
|
||||
core->mac[VET] & 0xffff);
|
||||
strip_vlan_index,
|
||||
core->mac[VET] & 0xffff,
|
||||
core->mac[VET] >> 16);
|
||||
|
||||
total_size = net_rx_pkt_get_total_len(core->rx_pkt) +
|
||||
e1000x_fcs_len(core->mac);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue