git: eaa16e7edba1 - stable/13 - e1000: fix VLAN 0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 May 2023 05:06:08 UTC
The branch stable/13 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=eaa16e7edba1fe8de358f9379a93694537a0ce4c
commit eaa16e7edba1fe8de358f9379a93694537a0ce4c
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-05-10 16:26:29 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-05-15 04:49:09 +0000
e1000: fix VLAN 0
VLAN 0 essentially means "Treat as untagged, but with priority bits",
and is used by some ISPs.
On igb/em interfaces we did not receive packets with VLAN tag 0 unless
vlanhwfilter was disabled.
This can be fixed by explicitly listing VLAN 0 in the hardware VLAN
filter (VFTA). Do this from em_setup_vlan_hw_support(), where we already
(re-)write the VFTA.
Reviewed by: kbowling
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D40046
(cherry picked from commit 0229fab2fe0eed843ebec98fd31b7d49bb2e8438)
---
sys/dev/e1000/if_em.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 527789622169..09a063191107 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -3683,8 +3683,10 @@ em_setup_vlan_hw_support(if_ctx_t ctx)
/*
* A soft reset zero's out the VFTA, so
* we need to repopulate it now.
+ * We also insert VLAN 0 in the filter list, so we pass VLAN 0 tagged
+ * traffic through. This will write the entire table.
*/
- em_if_vlan_filter_write(sc);
+ em_if_vlan_register(ctx, 0);
/* Enable the Filter Table */
em_if_vlan_filter_enable(sc);