Skip to contentSkip to conversation

igc: enable HW vlan tag insertion/stripping by default

PATCH In review Rui Salvaterra 6 participants 9 messages Mar 13, 2025 – Apr 1, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igc: enable HW vlan tag insertion/stripping by default

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.

---
 drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/igc/igc_main.c +3 -0
index 84307bb7313e..1cb9ce8aa743 100644
@@ -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;
Signature · 1 line
2.48.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Rui Salvaterra

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.

Thanks,

this seems entirely reasonable to me.

Link to v1 for reference:
https://lore.kernel.org/all/[email protected]/

Reviewed-by on v1 1/1
#2 lore raw
In reply to Rui Salvaterra
Quoted 21 lines · Rui Salvaterra

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.

---
  drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/igc/igc_main.c +0 -0
index 84307bb7313e..1cb9ce8aa743 100644

drivers/net/ethernet/intel/igc/igc_main.c static int igc_probe(struct pci_dev *pdev, · line 7057

Quoted 9 lines
drivers/net/ethernet/intel/igc/igc_main.c +3 -0
@@ -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 on v1 1/1
#3 lore raw
In reply to Rui Salvaterra
Quoted 11 lines · Rui Salvaterra

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.

Great, thanks a lot.

Tested-by on v1 1/1
#4 lore raw
In reply to Rui Salvaterra
Quoted 10 lines · Rui Salvaterra

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.

Quoted 8 lines
---
  drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
  1 file changed, 3 insertions(+)
#5 lore raw

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

Quoted 21 lines · Mor Bar-Gabay
Quoted 10 lines · Rui Salvaterra

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.

Quoted 8 lines
---
  drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
  1 file changed, 3 insertions(+)
maintainer
#6 lore raw
Quoted 4 lines · Rui Salvaterra

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

#7 lore raw

Hi again, Tony,

Quoted 4 lines · Tony Nguyen

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

maintainer
#8 lore raw
Quoted 2 lines · Rui Salvaterra

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