diff options
| author | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2021-12-28 11:05:31 +0000 |
|---|---|---|
| committer | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2021-12-28 11:11:41 +0000 |
| commit | f7926a6d0c1029c8da265769e7c57b4065faa2df (patch) | |
| tree | 2192b75d1b6272c1617fd89b36c26838f975d164 /sys/dev/iavf | |
| parent | 52f45d8acee95199159b65a33c94142492c38e41 (diff) | |
Diffstat (limited to 'sys/dev/iavf')
| -rw-r--r-- | sys/dev/iavf/iavf_txrx_iflib.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/iavf/iavf_txrx_iflib.c b/sys/dev/iavf/iavf_txrx_iflib.c index f536f7f23ff5..5f24b9c18452 100644 --- a/sys/dev/iavf/iavf_txrx_iflib.c +++ b/sys/dev/iavf/iavf_txrx_iflib.c @@ -670,7 +670,7 @@ iavf_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) struct rx_ring *rxr = &que->rxr; union iavf_rx_desc *cur; u32 status, error; - u16 plen, vtag; + u16 plen; u64 qword; u8 ptype; bool eop; @@ -701,10 +701,6 @@ iavf_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) cur->wb.qword1.status_error_len = 0; eop = (status & (1 << IAVF_RX_DESC_STATUS_EOF_SHIFT)); - if (status & (1 << IAVF_RX_DESC_STATUS_L2TAG1P_SHIFT)) - vtag = le16toh(cur->wb.qword0.lo_dword.l2tag1); - else - vtag = 0; /* ** Make sure bad packets are discarded, @@ -731,10 +727,11 @@ iavf_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) iavf_rx_checksum(ri, status, error, ptype); ri->iri_flowid = le32toh(cur->wb.qword0.hi_dword.rss); ri->iri_rsstype = iavf_ptype_to_hash(ptype); - ri->iri_vtag = vtag; - ri->iri_nfrags = i; - if (vtag) + if (status & (1 << IAVF_RX_DESC_STATUS_L2TAG1P_SHIFT)) { + ri->iri_vtag = le16toh(cur->wb.qword0.lo_dword.l2tag1); ri->iri_flags |= M_VLANTAG; + } + ri->iri_nfrags = i; return (0); } |
