Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1402537 > unrolled thread
| Started by | Jarod Wilson <jarod@redhat.com> |
|---|---|
| First post | 2016-05-17 21:10 +0200 |
| Last post | 2016-05-27 03:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[RFC PATCH net] e1000e: keep vlan interfaces functional after rxvlan off Jarod Wilson <jarod@redhat.com> - 2016-05-17 21:10 +0200
Re: [RFC PATCH net] e1000e: keep vlan interfaces functional after rxvlan off Jeff Kirsher <jeffrey.t.kirsher@intel.com> - 2016-05-18 23:50 +0200
RE: [Intel-wired-lan] [RFC PATCH net] e1000e: keep vlan interfaces functional after rxvlan off "Brown, Aaron F" <aaron.f.brown@intel.com> - 2016-05-27 03:40 +0200
| From | Jarod Wilson <jarod@redhat.com> |
|---|---|
| Date | 2016-05-17 21:10 +0200 |
| Subject | [RFC PATCH net] e1000e: keep vlan interfaces functional after rxvlan off |
| Message-ID | <rzSxt-7q-27@gated-at.bofh.it> |
I've got a bug report about an e1000e interface, where a vlan interface is
set up on top of it:
$ ip link add link ens1f0 name ens1f0.99 type vlan id 99
$ ip link set ens1f0 up
$ ip link set ens1f0.99 up
$ ip addr add 192.168.99.92 dev ens1f0.99
At this point, I can ping another host on vlan 99, ip 192.168.99.91.
However, if I do the following:
$ ethtool -K ens1f0 rxvlan off
Then no traffic passes on ens1f0.99. It comes back if I toggle rxvlan on
again. I'm not sure if this is actually intended behavior, or if there's a
lack of software vlan stripping fallback, or what, but things continue to
work if I simply don't call e1000e_vlan_strip_disable() if there are
active vlans (plagiarizing a function from the e1000 driver here) on the
interface.
Also slipped a related-ish fix to the kerneldoc text for
e1000e_vlan_strip_disable here...
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: intel-wired-lan@lists.osuosl.org
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 75e6089..73f7452 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -154,6 +154,16 @@ void __ew32(struct e1000_hw *hw, unsigned long reg, u32 val)
writel(val, hw->hw_addr + reg);
}
+static bool e1000e_vlan_used(struct e1000_adapter *adapter)
+{
+ u16 vid;
+
+ for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
+ return true;
+
+ return false;
+}
+
/**
* e1000_regdump - register printout routine
* @hw: pointer to the HW structure
@@ -2789,7 +2799,7 @@ static void e1000e_vlan_filter_enable(struct e1000_adapter *adapter)
}
/**
- * e1000e_vlan_strip_enable - helper to disable HW VLAN stripping
+ * e1000e_vlan_strip_disable - helper to disable HW VLAN stripping
* @adapter: board private structure to initialize
**/
static void e1000e_vlan_strip_disable(struct e1000_adapter *adapter)
@@ -3443,7 +3453,8 @@ static void e1000e_set_rx_mode(struct net_device *netdev)
ew32(RCTL, rctl);
- if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
+ if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX ||
+ e1000e_vlan_used(adapter))
e1000e_vlan_strip_enable(adapter);
else
e1000e_vlan_strip_disable(adapter);
--
1.8.3.1
[toc] | [next] | [standalone]
| From | Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
|---|---|
| Date | 2016-05-18 23:50 +0200 |
| Subject | Re: [RFC PATCH net] e1000e: keep vlan interfaces functional after rxvlan off |
| Message-ID | <rAhvP-7Ao-11@gated-at.bofh.it> |
| In reply to | #1402537 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, 2016-05-17 at 15:03 -0400, Jarod Wilson wrote: > I've got a bug report about an e1000e interface, where a vlan interface > is > set up on top of it: > > $ ip link add link ens1f0 name ens1f0.99 type vlan id 99 > $ ip link set ens1f0 up > $ ip link set ens1f0.99 up > $ ip addr add 192.168.99.92 dev ens1f0.99 > > At this point, I can ping another host on vlan 99, ip 192.168.99.91. > However, if I do the following: > > $ ethtool -K ens1f0 rxvlan off > > Then no traffic passes on ens1f0.99. It comes back if I toggle rxvlan on > again. I'm not sure if this is actually intended behavior, or if there's > a > lack of software vlan stripping fallback, or what, but things continue to > work if I simply don't call e1000e_vlan_strip_disable() if there are > active vlans (plagiarizing a function from the e1000 driver here) on the > interface. > > Also slipped a related-ish fix to the kerneldoc text for > e1000e_vlan_strip_disable here... > > CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > CC: intel-wired-lan@lists.osuosl.org > CC: netdev@vger.kernel.org > Signed-off-by: Jarod Wilson <jarod@redhat.com> > --- > drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) Raanan, please review this patch. Even though it is an RFC I will be adding it to my queue for testing. http://patchwork.ozlabs.org/patch/623238/
[toc] | [prev] | [next] | [standalone]
| From | "Brown, Aaron F" <aaron.f.brown@intel.com> |
|---|---|
| Date | 2016-05-27 03:40 +0200 |
| Subject | RE: [Intel-wired-lan] [RFC PATCH net] e1000e: keep vlan interfaces functional after rxvlan off |
| Message-ID | <rDeUN-5lZ-7@gated-at.bofh.it> |
| In reply to | #1403316 |
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On > Behalf Of Jeff Kirsher > Sent: Wednesday, May 18, 2016 2:40 PM > To: Jarod Wilson <jarod@redhat.com>; linux-kernel@vger.kernel.org; > Avargil, Raanan <raanan.avargil@intel.com> > Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org > Subject: Re: [Intel-wired-lan] [RFC PATCH net] e1000e: keep vlan interfaces > functional after rxvlan off > > On Tue, 2016-05-17 at 15:03 -0400, Jarod Wilson wrote: > > I've got a bug report about an e1000e interface, where a vlan interface > > is > > set up on top of it: > > > > $ ip link add link ens1f0 name ens1f0.99 type vlan id 99 > > $ ip link set ens1f0 up > > $ ip link set ens1f0.99 up > > $ ip addr add 192.168.99.92 dev ens1f0.99 > > > > At this point, I can ping another host on vlan 99, ip 192.168.99.91. > > However, if I do the following: > > > > $ ethtool -K ens1f0 rxvlan off > > > > Then no traffic passes on ens1f0.99. It comes back if I toggle rxvlan on > > again. I'm not sure if this is actually intended behavior, or if there's > > a > > lack of software vlan stripping fallback, or what, but things continue to > > work if I simply don't call e1000e_vlan_strip_disable() if there are > > active vlans (plagiarizing a function from the e1000 driver here) on the > > interface. > > > > Also slipped a related-ish fix to the kerneldoc text for > > e1000e_vlan_strip_disable here... > > > > CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > > CC: intel-wired-lan@lists.osuosl.org > > CC: netdev@vger.kernel.org > > Signed-off-by: Jarod Wilson <jarod@redhat.com> > > --- > > drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++++++-- > > 1 file changed, 13 insertions(+), 2 deletions(-) > > Raanan, please review this patch. Even though it is an RFC I will be > adding it to my queue for testing. > http://patchwork.ozlabs.org/patch/623238/ Yup, without this patch disabling rxvlan offload does indeed break vlan connectivity and with the patch I can disable and re-enable rxvlan offloads as much as I care to. It also makes it through my regression tests without problems. Tested-by: Aaron Brown <aaron.f.brown@intel.com> This is from functional - does it work - testing perspective so review is probably still in order.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web