Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160166550
D17061.id47724.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17061.id47724.diff
View Options
Index: sys/dev/ixgbe/if_ixv.c
===================================================================
--- sys/dev/ixgbe/if_ixv.c
+++ sys/dev/ixgbe/if_ixv.c
@@ -1470,6 +1470,7 @@
static void
ixv_setup_vlan_support(if_ctx_t ctx)
{
+ struct ifnet *ifp = iflib_get_ifp(ctx);
struct adapter *adapter = iflib_get_softc(ctx);
struct ixgbe_hw *hw = &adapter->hw;
u32 ctrl, vid, vfta, retry;
@@ -1483,18 +1484,27 @@
if (adapter->num_vlans == 0)
return;
- /* Enable the queues */
- for (int i = 0; i < adapter->num_rx_queues; i++) {
- ctrl = IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(i));
- ctrl |= IXGBE_RXDCTL_VME;
- IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(i), ctrl);
- /*
- * Let Rx path know that it needs to store VLAN tag
- * as part of extra mbuf info.
- */
- adapter->rx_queues[i].rxr.vtag_strip = TRUE;
+ if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) {
+ /* Enable the queues */
+ for (int i = 0; i < adapter->num_rx_queues; i++) {
+ ctrl = IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(i));
+ ctrl |= IXGBE_RXDCTL_VME;
+ IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(i), ctrl);
+ /*
+ * Let Rx path know that it needs to store VLAN tag
+ * as part of extra mbuf info.
+ */
+ adapter->rx_queues[i].rxr.vtag_strip = TRUE;
+ }
}
+ /*
+ * If filtering VLAN tags is disabled,
+ * there is no need to fill VLAN Filter Table Array (VFTA).
+ */
+ if ((ifp->if_capenable & IFCAP_VLAN_HWFILTER) == 0)
+ return;
+
/*
* A soft reset zero's out the VFTA, so
* we need to repopulate it now.
Index: sys/dev/ixgbe/ix_txrx.c
===================================================================
--- sys/dev/ixgbe/ix_txrx.c
+++ sys/dev/ixgbe/ix_txrx.c
@@ -430,7 +430,8 @@
rxd->wb.upper.status_error = 0;
eop = ((staterr & IXGBE_RXD_STAT_EOP) != 0);
- if (staterr & IXGBE_RXD_STAT_VP) {
+
+ if ( (rxr->vtag_strip) && (staterr & IXGBE_RXD_STAT_VP) ) {
vtag = le16toh(rxd->wb.upper.vlan);
} else {
vtag = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 22, 8:55 PM (6 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34211914
Default Alt Text
D17061.id47724.diff (1 KB)
Attached To
Mode
D17061: ix(4), ixv(4): Add VLAN tag strip check when receiving packets; ixv(4): Fix support for VLAN_HWTAGGING and VLAN_HWFILTER flags
Attached
Detach File
Event Timeline
Log In to Comment