[PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default

Rui Salvaterra posted 1 patch 9 months, 1 week ago
drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
1 file changed, 3 insertions(+)
[PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Rui Salvaterra 9 months, 1 week ago
This is enabled by default in other Intel drivers I've checked (e1000, e1000e,
iavf, igb and ice). Fixes an out-of-the-box performance issue when running
OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q
VLAN configurations, as ethtool isn't part of the default packages and sane
defaults are expected.

In my specific case, with an Intel N100-based machine with four I226-V Ethernet
controllers, my upload performance increased from under 30 Mb/s to the expected
~1 Gb/s.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 84307bb7313e..1cb9ce8aa743 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -7049,6 +7049,9 @@ static int igc_probe(struct pci_dev *pdev,
 	netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
 			       NETDEV_XDP_ACT_XSK_ZEROCOPY;
 
+	/* enable HW vlan tag insertion/stripping by default */
+	netdev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
+
 	/* MTU range: 68 - 9216 */
 	netdev->min_mtu = ETH_MIN_MTU;
 	netdev->max_mtu = MAX_STD_JUMBO_FRAME_SIZE;
-- 
2.48.1
Re: [Intel-wired-lan] [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Mor Bar-Gabay 8 months, 3 weeks ago
On 13/03/2025 11:35, Rui Salvaterra wrote:
> This is enabled by default in other Intel drivers I've checked (e1000, e1000e,
> iavf, igb and ice). Fixes an out-of-the-box performance issue when running
> OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q
> VLAN configurations, as ethtool isn't part of the default packages and sane
> defaults are expected.
> 
> In my specific case, with an Intel N100-based machine with four I226-V Ethernet
> controllers, my upload performance increased from under 30 Mb/s to the expected
> ~1 Gb/s.
> 
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Reviewed-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> ---
>   drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Re: [Intel-wired-lan] [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Rui Salvaterra 8 months, 3 weeks ago
Hi again, everyone,

Just a quick question: this is scheduled for 6.16, it's too late for
6.15, correct?

Kind regards,
Rui Salvaterra


On Thu, 27 Mar 2025 at 12:54, Mor Bar-Gabay <morx.bar.gabay@intel.com> wrote:
>
> On 13/03/2025 11:35, Rui Salvaterra wrote:
> > This is enabled by default in other Intel drivers I've checked (e1000, e1000e,
> > iavf, igb and ice). Fixes an out-of-the-box performance issue when running
> > OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q
> > VLAN configurations, as ethtool isn't part of the default packages and sane
> > defaults are expected.
> >
> > In my specific case, with an Intel N100-based machine with four I226-V Ethernet
> > controllers, my upload performance increased from under 30 Mb/s to the expected
> > ~1 Gb/s.
> >
> > Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
> > Reviewed-by: Simon Horman <horms@kernel.org>
> > Reviewed-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
> > Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> > ---
> >   drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Re: [Intel-wired-lan] [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Tony Nguyen 8 months, 3 weeks ago

On 3/28/2025 8:01 AM, Rui Salvaterra wrote:
> Hi again, everyone,
> 
> Just a quick question: this is scheduled for 6.16, it's too late for
> 6.15, correct?

Yes, it will be submitted for 6.16.

Also, please don't top post :)

Thanks,
Tony
Re: [Intel-wired-lan] [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Rui Salvaterra 8 months, 3 weeks ago
Hi again, Tony,

On Fri, 28 Mar 2025 at 15:52, Tony Nguyen <anthony.l.nguyen@intel.com> wrote:
>
> Yes, it will be submitted for 6.16.
>
> Also, please don't top post :)

I almost never do, sorry about that. :)
Would it be too much to ask for this to be backported to stable,
though? I've tested it on the 6.6 and 6.12 series just fine.

Kind regards,
Rui Salvaterra
Re: [Intel-wired-lan] [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Tony Nguyen 8 months, 2 weeks ago

On 3/28/2025 9:17 AM, Rui Salvaterra wrote:
> Would it be too much to ask for this to be backported to stable,
> though? I've tested it on the 6.6 and 6.12 series just fine.

It doesn't seem like a strict bug fix, so I don't think it should go to 
net, but we should be able to request backport to stable afterwards.

Thanks,
Tony
Re: [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Kurt Kanzenbach 9 months ago
On Thu Mar 13 2025, Rui Salvaterra wrote:
> This is enabled by default in other Intel drivers I've checked (e1000, e1000e,
> iavf, igb and ice). Fixes an out-of-the-box performance issue when running
> OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q
> VLAN configurations, as ethtool isn't part of the default packages and sane
> defaults are expected.
>
> In my specific case, with an Intel N100-based machine with four I226-V Ethernet
> controllers, my upload performance increased from under 30 Mb/s to the expected
> ~1 Gb/s.
>
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>

Great, thanks a lot.

Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Re: [Intel-wired-lan] [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Lifshits, Vitaly 9 months ago

On 3/13/2025 11:35 AM, Rui Salvaterra wrote:
> This is enabled by default in other Intel drivers I've checked (e1000, e1000e,
> iavf, igb and ice). Fixes an out-of-the-box performance issue when running
> OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q
> VLAN configurations, as ethtool isn't part of the default packages and sane
> defaults are expected.
> 
> In my specific case, with an Intel N100-based machine with four I226-V Ethernet
> controllers, my upload performance increased from under 30 Mb/s to the expected
> ~1 Gb/s.
> 
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
> ---
>   drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
> index 84307bb7313e..1cb9ce8aa743 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -7049,6 +7049,9 @@ static int igc_probe(struct pci_dev *pdev,
>   	netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
>   			       NETDEV_XDP_ACT_XSK_ZEROCOPY;
>   
> +	/* enable HW vlan tag insertion/stripping by default */
> +	netdev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
> +
>   	/* MTU range: 68 - 9216 */
>   	netdev->min_mtu = ETH_MIN_MTU;
>   	netdev->max_mtu = MAX_STD_JUMBO_FRAME_SIZE;
> 

Reviewed-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Re: [PATCH iwl-next] igc: enable HW vlan tag insertion/stripping by default
Posted by Simon Horman 9 months ago
On Thu, Mar 13, 2025 at 09:35:22AM +0000, Rui Salvaterra wrote:
> This is enabled by default in other Intel drivers I've checked (e1000, e1000e,
> iavf, igb and ice). Fixes an out-of-the-box performance issue when running
> OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q
> VLAN configurations, as ethtool isn't part of the default packages and sane
> defaults are expected.
> 
> In my specific case, with an Intel N100-based machine with four I226-V Ethernet
> controllers, my upload performance increased from under 30 Mb/s to the expected
> ~1 Gb/s.
> 
> Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>

Thanks,

this seems entirely reasonable to me.

Reviewed-by: Simon Horman <horms@kernel.org>

Link to v1 for reference:
https://lore.kernel.org/all/20250307110339.13788-1-rsalvaterra@gmail.com/