All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features
@ 2018-10-29 17:52 Jacob Keller
  2018-10-29 17:52 ` [Intel-wired-lan] [net 2/2] i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load Jacob Keller
  2018-10-31 21:36 ` [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features Bowers, AndrewX
  0 siblings, 2 replies; 4+ messages in thread
From: Jacob Keller @ 2018-10-29 17:52 UTC (permalink / raw)
  To: intel-wired-lan

Since commit bacd75cfac8a ("i40e/i40evf: Add capability exchange for
outer checksum", 2017-04-06) the i40e driver has not reported support
for IP-in-IP offloads. This likely occurred due to a bad rebase, as the
commit extracts hw_enc_features into its own variable. As part of this
change, it dropped the NETIF_F_FSO_IPXIP flags from the
netdev->hw_enc_features. This was unfortunately not caught during code
review.

Fix this by adding back the missing feature flags.

For reference, NETIF_F_GSO_IPXIP4 was added in commit 7e13318daa4a
("net: define gso types for IPx over IPv4 and IPv6", 2016-05-20),
replacing NETIF_F_GSO_IPIP and NETIF_F_GSO_SIT.

NETIF_F_GSO_IPXIP6 was added in commit bf2d1df39502 ("intel: Add support
for IPv6 IP-in-IP offload", 2016-05-20).

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index bc71a21c1dc2..3ff5ee49818b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -12249,6 +12249,8 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
 			  NETIF_F_GSO_GRE		|
 			  NETIF_F_GSO_GRE_CSUM		|
 			  NETIF_F_GSO_PARTIAL		|
+			  NETIF_F_GSO_IPXIP4		|
+			  NETIF_F_GSO_IPXIP6		|
 			  NETIF_F_GSO_UDP_TUNNEL	|
 			  NETIF_F_GSO_UDP_TUNNEL_CSUM	|
 			  NETIF_F_SCTP_CRC		|
-- 
2.18.0.219.gaf81d287a9da


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Intel-wired-lan] [net 2/2] i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load
  2018-10-29 17:52 [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features Jacob Keller
@ 2018-10-29 17:52 ` Jacob Keller
  2018-10-31 21:37   ` Bowers, AndrewX
  2018-10-31 21:36 ` [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features Bowers, AndrewX
  1 sibling, 1 reply; 4+ messages in thread
From: Jacob Keller @ 2018-10-29 17:52 UTC (permalink / raw)
  To: intel-wired-lan

The assignment of the feature flag NETIF_F_NTUPLE and NETIF_F_HW_TC
occurs prior to the initial setup of the local hw_features variable.

This means the features are set as user-changeable, but are not set in
the currently active feature list. This results in the features being
disabled at the driver's initial load.

Move the assignment after the initial assignment of hw_features, and
assign to the local variable. This ensures that NETIF_F_NTUPLE and
NETIF_F_HW_TC are marked as user-changeable, and also enables them by
default when the driver loads.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 3ff5ee49818b..21c2688d6308 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -12268,13 +12268,13 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
 	/* record features VLANs can make use of */
 	netdev->vlan_features |= hw_enc_features | NETIF_F_TSO_MANGLEID;
 
-	if (!(pf->flags & I40E_FLAG_MFP_ENABLED))
-		netdev->hw_features |= NETIF_F_NTUPLE | NETIF_F_HW_TC;
-
 	hw_features = hw_enc_features		|
 		      NETIF_F_HW_VLAN_CTAG_TX	|
 		      NETIF_F_HW_VLAN_CTAG_RX;
 
+	if (!(pf->flags & I40E_FLAG_MFP_ENABLED))
+		hw_features |= NETIF_F_NTUPLE | NETIF_F_HW_TC;
+
 	netdev->hw_features |= hw_features;
 
 	netdev->features |= hw_features | NETIF_F_HW_VLAN_CTAG_FILTER;
-- 
2.18.0.219.gaf81d287a9da


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features
  2018-10-29 17:52 [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features Jacob Keller
  2018-10-29 17:52 ` [Intel-wired-lan] [net 2/2] i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load Jacob Keller
@ 2018-10-31 21:36 ` Bowers, AndrewX
  1 sibling, 0 replies; 4+ messages in thread
From: Bowers, AndrewX @ 2018-10-31 21:36 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Monday, October 29, 2018 10:53 AM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to
> netdev features
> 
> Since commit bacd75cfac8a ("i40e/i40evf: Add capability exchange for outer
> checksum", 2017-04-06) the i40e driver has not reported support for IP-in-IP
> offloads. This likely occurred due to a bad rebase, as the commit extracts
> hw_enc_features into its own variable. As part of this change, it dropped the
> NETIF_F_FSO_IPXIP flags from the
> netdev->hw_enc_features. This was unfortunately not caught during code
> review.
> 
> Fix this by adding back the missing feature flags.
> 
> For reference, NETIF_F_GSO_IPXIP4 was added in commit 7e13318daa4a
> ("net: define gso types for IPx over IPv4 and IPv6", 2016-05-20), replacing
> NETIF_F_GSO_IPIP and NETIF_F_GSO_SIT.
> 
> NETIF_F_GSO_IPXIP6 was added in commit bf2d1df39502 ("intel: Add
> support for IPv6 IP-in-IP offload", 2016-05-20).
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
>  1 file changed, 2 insertions(+)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Intel-wired-lan] [net 2/2] i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load
  2018-10-29 17:52 ` [Intel-wired-lan] [net 2/2] i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load Jacob Keller
@ 2018-10-31 21:37   ` Bowers, AndrewX
  0 siblings, 0 replies; 4+ messages in thread
From: Bowers, AndrewX @ 2018-10-31 21:37 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Jacob Keller
> Sent: Monday, October 29, 2018 10:53 AM
> To: Intel Wired LAN <intel-wired-lan@lists.osuosl.org>
> Subject: [Intel-wired-lan] [net 2/2] i40e: enable NETIF_F_NTUPLE and
> NETIF_F_HW_TC at driver load
> 
> The assignment of the feature flag NETIF_F_NTUPLE and NETIF_F_HW_TC
> occurs prior to the initial setup of the local hw_features variable.
> 
> This means the features are set as user-changeable, but are not set in the
> currently active feature list. This results in the features being disabled at the
> driver's initial load.
> 
> Move the assignment after the initial assignment of hw_features, and assign
> to the local variable. This ensures that NETIF_F_NTUPLE and NETIF_F_HW_TC
> are marked as user-changeable, and also enables them by default when the
> driver loads.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-31 21:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 17:52 [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features Jacob Keller
2018-10-29 17:52 ` [Intel-wired-lan] [net 2/2] i40e: enable NETIF_F_NTUPLE and NETIF_F_HW_TC at driver load Jacob Keller
2018-10-31 21:37   ` Bowers, AndrewX
2018-10-31 21:36 ` [Intel-wired-lan] [net 1/2] i40e: restore NETIF_F_GSO_IPXIP[46] to netdev features Bowers, AndrewX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.