diff mbox series

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

Message ID 20250313093615.8037-1-rsalvaterra@gmail.com
State Accepted
Delegated to: Anthony Nguyen
Headers show
Series [iwl-next] igc: enable HW vlan tag insertion/stripping by default | expand

Commit Message

Rui Salvaterra March 13, 2025, 9:35 a.m. UTC
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(+)

Comments

Simon Horman March 18, 2025, 2:48 p.m. UTC | #1
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/
Lifshits, Vitaly March 18, 2025, 3:14 p.m. UTC | #2
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>
Kurt Kanzenbach March 19, 2025, 10:19 a.m. UTC | #3
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>
Mor Bar-Gabay March 27, 2025, 12:53 p.m. UTC | #4
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>
Rui Salvaterra March 28, 2025, 3:01 p.m. UTC | #5
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>
Tony Nguyen March 28, 2025, 3:51 p.m. UTC | #6
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
Rui Salvaterra March 28, 2025, 4:17 p.m. UTC | #7
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
Tony Nguyen April 1, 2025, 9:22 p.m. UTC | #8
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
diff mbox series

Patch

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;