]> git.ipfire.org Git - thirdparty/openwrt.git/blob
e231bc8d496f1bd7d9fb822a1b2a9c3f0c01b729
[thirdparty/openwrt.git] /
1 From 8cae5a0d91fea01d90ce7c1827e26934a22ca2fa Mon Sep 17 00:00:00 2001
2 From: Rui Salvaterra <rsalvaterra@gmail.com>
3 Date: Wed, 5 Mar 2025 11:53:56 +0000
4 Subject: [PATCH] igc: enable HW vlan tag insertion/stripping by default
5
6 This is enabled by default in other Intel drivers I've checked (e1000, e1000e,
7 iavf, igb and ice). Fixes an out-of-the-box performance issue when running
8 OpenWrt on typical mini-PCs with igc-supported Ethernet controllers and 802.1Q
9 VLAN configurations, as ethtool isn't part of the default packages and sane
10 defaults are expected.
11
12 In my specific case, with an Intel N100-based machine with four I226-V Ethernet
13 controllers, my upload performance increased from under 30 Mb/s to the expected
14 ~1 Gb/s.
15
16 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
17 ---
18 drivers/net/ethernet/intel/igc/igc_main.c | 3 +++
19 1 file changed, 3 insertions(+)
20
21 --- a/drivers/net/ethernet/intel/igc/igc_main.c
22 +++ b/drivers/net/ethernet/intel/igc/igc_main.c
23 @@ -7066,6 +7066,9 @@ static int igc_probe(struct pci_dev *pde
24 netdev->xdp_features = NETDEV_XDP_ACT_BASIC | NETDEV_XDP_ACT_REDIRECT |
25 NETDEV_XDP_ACT_XSK_ZEROCOPY;
26
27 + /* enable HW vlan tag insertion/stripping by default */
28 + netdev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
29 +
30 /* MTU range: 68 - 9216 */
31 netdev->min_mtu = ETH_MIN_MTU;
32 netdev->max_mtu = MAX_STD_JUMBO_FRAME_SIZE;