From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-11 11:41:21
Introduce NETIF_F_GRO_HW feature flag and convert drivers that support
hardware GRO to use the new flag.
v4:
- more changes requested by Alexander Duyck:
- check GRO_HW/GRO dependency in drivers's ndo_fix_features().
- Reverse the order of RXCSUM and GRO_HW dependency check in
netdev_fix_features().
- No propagation in netdev_disable_gro_hw().
v3:
- Let driver's ndo_fix_features() disable NETIF_F_LRO when NETIF_F_GRO_HW
is set instead of doing it in common netdev_fix_features().
v2:
- NETIF_F_GRO_HW flag propagation between upper and lower devices not
required (see patch 1).
- NETIF_F_GRO_HW depends on NETIF_F_GRO and NETIF_F_RXCSUM.
- Add dev_disable_gro_hw() to disable GRO_HW for generic XDP.
- Use ndo_fix_features() on all 3 drivers to drop GRO_HW when it is not
supported
Michael Chan (5):
net: Introduce NETIF_F_GRO_HW.
net: Disable GRO_HW when generic XDP is installed on a device.
bnxt_en: Use NETIF_F_GRO_HW.
bnx2x: Use NETIF_F_GRO_HW.
qede: Use NETIF_F_GRO_HW.
Documentation/networking/netdev-features.txt | 8 +++++++
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 19 ++++++++++------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +++-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 27 +++++++++++++++++------
drivers/net/ethernet/qlogic/qede/qede.h | 2 ++
drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 3 +++
drivers/net/ethernet/qlogic/qede/qede_filter.c | 21 ++++++++++++------
drivers/net/ethernet/qlogic/qede/qede_main.c | 17 +++++---------
include/linux/netdev_features.h | 3 +++
net/core/dev.c | 28 ++++++++++++++++++++++++
net/core/ethtool.c | 1 +
11 files changed, 100 insertions(+), 33 deletions(-)
--
1.8.3.1
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-11 11:41:22
Introduce NETIF_F_GRO_HW feature flag for NICs that support hardware
GRO. With this flag, we can now independently turn on or off hardware
GRO when GRO is on. Previously, drivers were using NETIF_F_GRO to
control hardware GRO and so it cannot be independently turned on or
off without affecting GRO.
Hardware GRO (just like GRO) guarantees that packets can be re-segmented
by TSO/GSO to reconstruct the original packet stream. Logically,
GRO_HW should depend on GRO since it a subset, but we will let
individual drivers enforce this dependency as they see fit.
Since NETIF_F_GRO is not propagated between upper and lower devices,
NETIF_F_GRO_HW should follow suit since it is a subset of GRO. In other
words, a lower device can independent have GRO/GRO_HW enabled or disabled
and no feature propagation is required. This will preserve the current
GRO behavior. This can be changed later if we decide to propagate GRO/
GRO_HW/RXCSUM from upper to lower devices.
Cc: Ariel Elior <redacted>
Cc: everest-linux-l2@cavium.com
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
Documentation/networking/netdev-features.txt | 8 ++++++++
include/linux/netdev_features.h | 3 +++
net/core/dev.c | 10 ++++++++++
net/core/ethtool.c | 1 +
4 files changed, 22 insertions(+)
@@ -163,3 +163,11 @@ This requests that the NIC receive all possible frames, including errored frames (such as bad FCS, etc). This can be helpful when sniffing a link with bad packets on it. Some NICs may receive more packets if also put into normal PROMISC mode.++* rx-gro-hw++This requests that the NIC enables Hardware GRO (generic receive offload).+Hardware GRO is basically the exact reverse of TSO, and is generally+stricter than Hardware LRO. A packet stream merged by Hardware GRO must+be re-segmentable by GSO or TSO back to the exact original packet stream.+Hardware GRO is dependent on GRO and RXCSUM.
@@ -7424,6 +7424,16 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,features&=~dev->gso_partial_features;}+if(!(features&NETIF_F_RXCSUM)){+/* NETIF_F_GRO_HW implies doing RXCSUM. If the user does not+*wanttoenableRXCSUM,logically,weshoulddisableGRO_HW.+*/+if(features&NETIF_F_GRO_HW){+netdev_dbg(dev,"Dropping NETIF_F_GRO_HW since no RXCSUM feature.\n");+features&=~NETIF_F_GRO_HW;+}+}+returnfeatures;}
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-11 11:41:25
Advertise NETIF_F_GRO_HW in hw_features if hardware GRO is supported.
In bnxt_fix_features(), disable GRO_HW and LRO if current hardware
configuration does not allow it. GRO_HW depends on GRO. GRO_HW is
also mutually exclusive with LRO. XDP setup will now rely on
bnxt_fix_features() to turn off aggregation. During chip init, turn on
or off hardware GRO based on NETIF_F_GRO_HW in features flag.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
@@ -2843,10 +2843,10 @@ int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode)min_t(u16,bp->max_mtu,BNXT_MAX_PAGE_MODE_MTU);bp->flags&=~BNXT_FLAG_AGG_RINGS;bp->flags|=BNXT_FLAG_NO_AGG_RINGS|BNXT_FLAG_RX_PAGE_MODE;-bp->dev->hw_features&=~NETIF_F_LRO;-bp->dev->features&=~NETIF_F_LRO;bp->rx_dir=DMA_BIDIRECTIONAL;bp->rx_skb_func=bnxt_rx_page_skb;+/* Disable LRO or GRO_HW */+netdev_update_features(bp->dev);}else{bp->dev->max_mtu=bp->max_mtu;bp->flags&=~BNXT_FLAG_RX_PAGE_MODE;
@@ -6788,6 +6788,15 @@ static netdev_features_t bnxt_fix_features(struct net_device *dev,if((features&NETIF_F_NTUPLE)&&!bnxt_rfs_capable(bp))features&=~NETIF_F_NTUPLE;+if(bp->flags&BNXT_FLAG_NO_AGG_RINGS)+features&=~(NETIF_F_LRO|NETIF_F_GRO_HW);++if(!(features&NETIF_F_GRO))+features&=~NETIF_F_GRO_HW;++if(features&NETIF_F_GRO_HW)+features&=~NETIF_F_LRO;+/* Both CTAG and STAG VLAN accelaration on the RX side have to be*turnedonorofftogether.*/
@@ -7924,8 +7933,8 @@ static int bnxt_get_dflt_rings(struct bnxt *bp, int *max_rx, int *max_tx,if(rc)returnrc;bp->flags|=BNXT_FLAG_NO_AGG_RINGS;-bp->dev->hw_features&=~NETIF_F_LRO;-bp->dev->features&=~NETIF_F_LRO;+bp->dev->hw_features&=~(NETIF_F_LRO|NETIF_F_GRO_HW);+bp->dev->features&=~(NETIF_F_LRO|NETIF_F_GRO_HW);bnxt_set_ring_params(bp);}
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-11 11:41:26
Advertise NETIF_F_GRO_HW and turn on TPA_MODE_GRO when NETIF_F_GRO_HW
is set. Disable NETIF_F_GRO_HW in bnx2x_fix_features() if the MTU
does not support TPA_MODE_GRO or GRO is not set. bnx2x_change_mtu() also
needs to disable NETIF_F_GRO_HW if the MTU does not support it.
Cc: Ariel Elior <redacted>
Cc: everest-linux-l2@cavium.com
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 19 ++++++++++++-------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +++-
2 files changed, 15 insertions(+), 8 deletions(-)
@@ -4874,6 +4873,9 @@ int bnx2x_change_mtu(struct net_device *dev, int new_mtu)*/dev->mtu=new_mtu;+if(!bnx2x_mtu_allows_gro(new_mtu))+dev->features&=~NETIF_F_GRO_HW;+if(IS_PF(bp)&&SHMEM2_HAS(bp,curr_cfg))SHMEM2_WR(bp,curr_cfg,CURR_CFG_MET_OS);
@@ -4933,13 +4939,12 @@ int bnx2x_set_features(struct net_device *dev, netdev_features_t features)}}-/* if GRO is changed while LRO is enabled, don't force a reload */-if((changes&NETIF_F_GRO)&&(features&NETIF_F_LRO))-changes&=~NETIF_F_GRO;+/* Don't care about GRO changes */+changes&=~NETIF_F_GRO;/* if GRO is changed while HW TPA is off, don't force a reload */-if((changes&NETIF_F_GRO)&&bp->disable_tpa)-changes&=~NETIF_F_GRO;+if((changes&NETIF_F_GRO_HW)&&bp->disable_tpa)+changes&=~NETIF_F_GRO_HW;if(changes)bnx2x_reload=true;
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-11 11:41:27
Advertise NETIF_F_GRO_HW and set edev->gro_disable according to the
feature flag. Add qede_fix_features() to drop NETIF_F_GRO_HW if
XDP is running or MTU does not support GRO_HW or GRO is not set.
qede_change_mtu() also checks and disables GRO_HW if MTU is not
supported.
Cc: Ariel Elior <redacted>
Cc: everest-linux-l2@cavium.com
Acked-by: Manish Chopra <redacted>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/qlogic/qede/qede.h | 2 ++
drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 3 +++
drivers/net/ethernet/qlogic/qede/qede_filter.c | 21 ++++++++++++++-------
drivers/net/ethernet/qlogic/qede/qede_main.c | 17 ++++++-----------
4 files changed, 25 insertions(+), 18 deletions(-)
@@ -940,6 +940,9 @@ int qede_change_mtu(struct net_device *ndev, int new_mtu)DP_VERBOSE(edev,(NETIF_MSG_IFUP|NETIF_MSG_IFDOWN),"Configuring MTU size of %d\n",new_mtu);+if(new_mtu>PAGE_SIZE)+ndev->features&=~NETIF_F_GRO_HW;+/* Set the mtu field and re-start the interface if needed */args.u.mtu=new_mtu;args.func=&qede_update_mtu;
From: Alexander Duyck <hidden> Date: 2017-12-12 15:57:13
On Mon, Dec 11, 2017 at 3:41 AM, Michael Chan [off-list ref] wrote:
quoted hunk
Introduce NETIF_F_GRO_HW feature flag for NICs that support hardware
GRO. With this flag, we can now independently turn on or off hardware
GRO when GRO is on. Previously, drivers were using NETIF_F_GRO to
control hardware GRO and so it cannot be independently turned on or
off without affecting GRO.
Hardware GRO (just like GRO) guarantees that packets can be re-segmented
by TSO/GSO to reconstruct the original packet stream. Logically,
GRO_HW should depend on GRO since it a subset, but we will let
individual drivers enforce this dependency as they see fit.
Since NETIF_F_GRO is not propagated between upper and lower devices,
NETIF_F_GRO_HW should follow suit since it is a subset of GRO. In other
words, a lower device can independent have GRO/GRO_HW enabled or disabled
and no feature propagation is required. This will preserve the current
GRO behavior. This can be changed later if we decide to propagate GRO/
GRO_HW/RXCSUM from upper to lower devices.
Cc: Ariel Elior <redacted>
Cc: everest-linux-l2@cavium.com
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
Documentation/networking/netdev-features.txt | 8 ++++++++
include/linux/netdev_features.h | 3 +++
net/core/dev.c | 10 ++++++++++
net/core/ethtool.c | 1 +
4 files changed, 22 insertions(+)
@@ -163,3 +163,11 @@ This requests that the NIC receive all possible frames, including errored frames (such as bad FCS, etc). This can be helpful when sniffing a link with bad packets on it. Some NICs may receive more packets if also put into normal PROMISC mode.++* rx-gro-hw++This requests that the NIC enables Hardware GRO (generic receive offload).+Hardware GRO is basically the exact reverse of TSO, and is generally+stricter than Hardware LRO. A packet stream merged by Hardware GRO must+be re-segmentable by GSO or TSO back to the exact original packet stream.+Hardware GRO is dependent on GRO and RXCSUM.
This last line should probably be updated since we made the change
that dropped the dependency on software GRO.
@@ -7424,6 +7424,16 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,features&=~dev->gso_partial_features;}+if(!(features&NETIF_F_RXCSUM)){+/* NETIF_F_GRO_HW implies doing RXCSUM. If the user does not+*wanttoenableRXCSUM,logically,weshoulddisableGRO_HW.+*/
It might be in our interest here to explain why. Specifically that
"The Rx checksum can no longer be verified once a packet is modified
as a result of GRO_HW, therefore we cannot allow GRO_HW to be enabled
when RXCSUM is disabled." or something to that effect. Otherwise there
isn't a good explanation as to why GRO_HW implies this.
quoted hunk
+ if (features & NETIF_F_GRO_HW) {+ netdev_dbg(dev, "Dropping NETIF_F_GRO_HW since no RXCSUM feature.\n");+ features &= ~NETIF_F_GRO_HW;+ }+ }+ return features; }
-----Original Message-----
From: Michael Chan [mailto:michael.chan@broadcom.com]
Sent: Monday, December 11, 2017 5:11 PM
To: davem@davemloft.net
Cc: netdev@vger.kernel.org; andrew.gospodarek@broadcom.com; Elior, Ariel
[off-list ref]; Dept-Eng Everest Linux L2 <Dept-
EngEverestLinuxL2@cavium.com>
Subject: [PATCH net-next v4 4/5] bnx2x: Use NETIF_F_GRO_HW.
Advertise NETIF_F_GRO_HW and turn on TPA_MODE_GRO when
NETIF_F_GRO_HW is set. Disable NETIF_F_GRO_HW in bnx2x_fix_features() if
the MTU does not support TPA_MODE_GRO or GRO is not set.
bnx2x_change_mtu() also needs to disable NETIF_F_GRO_HW if the MTU does
not support it.
Cc: Ariel Elior <redacted>
Cc: everest-linux-l2@cavium.com
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 19 ++++++++++++-------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +++-
2 files changed, 15 insertions(+), 8 deletions(-)
net_device *dev,
features &= ~NETIF_F_LRO;
features &= ~NETIF_F_GRO;
}
+ if (!(features & NETIF_F_GRO) || !bnx2x_mtu_allows_gro(dev->mtu))
+ features &= ~NETIF_F_GRO_HW;
+ if (features & NETIF_F_GRO_HW)
+ features &= ~NETIF_F_LRO;
return features;
}
@@ -4933,13 +4939,12 @@ int bnx2x_set_features(struct net_device *dev,
netdev_features_t features)
}
}
- /* if GRO is changed while LRO is enabled, don't force a reload */
- if ((changes & NETIF_F_GRO) && (features & NETIF_F_LRO))
- changes &= ~NETIF_F_GRO;
+ /* Don't care about GRO changes */
+ changes &= ~NETIF_F_GRO;
/* if GRO is changed while HW TPA is off, don't force a reload */
- if ((changes & NETIF_F_GRO) && bp->disable_tpa)
- changes &= ~NETIF_F_GRO;
+ if ((changes & NETIF_F_GRO_HW) && bp->disable_tpa)
+ changes &= ~NETIF_F_GRO_HW;
if (changes)
bnx2x_reload = true;
Hi Michael, There seems a behavioral change here. This driver support two HW aggregation modes [LRO and GRO]
With the changes, Interfaces come with HW GRO enabled and LRO disabled by default as opposed to earlier where interfaces used to come with LRO enabled.
Also, there seems some problem when turning on LRO even after GRO disable.
When I tried to disable GRO and then tried to enable LRO it didn't go well. Not sure why ?
ethtool -K p3p1 gro off
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
Actual changes:
generic-receive-offload: off
rx-gro-hw: off [requested on]
ethtool -K p3p1 lro on
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
Could not change any device features
Thanks,
Manish
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-13 20:45:47
On Wed, Dec 13, 2017 at 1:08 AM, Chopra, Manish
[off-list ref] wrote:
Hi Michael, There seems a behavioral change here. This driver support two HW aggregation modes [LRO and GRO]
With the changes, Interfaces come with HW GRO enabled and LRO disabled by default as opposed to earlier where interfaces used to come with LRO enabled.
Right. Before, you had both NETIF_F_GRO and NETIF_F_LRO set and the
code looked at NETIF_F_LRO first and turned on LRO.
Now, we set NETIF_F_GRO and NETIF_F_GRO_HW by default. NETIF_F_LRO is
turned off since NETIF_F_GRO_HW is on.
If you want, I can change it back to the old default.
Also, there seems some problem when turning on LRO even after GRO disable.
When I tried to disable GRO and then tried to enable LRO it didn't go well. Not sure why ?
I just put an old BCM57810 card into my machine and it works for me.
As long as I turn off GRO or GRO_HW, I can turn on LRO.
[root@localhost bnx2x]# ethtool -K p1p1 lro on
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
Could not change any device features
[root@localhost bnx2x]# ethtool -K p1p1 gro off
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
Actual changes:
generic-receive-offload: off
large-receive-offload: on
rx-gro-hw: off [requested on]
[root@localhost bnx2x]# ethtool -K p1p1 lro on
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
-----Original Message-----
From: Michael Chan [mailto:michael.chan@broadcom.com]
Sent: Thursday, December 14, 2017 2:16 AM
To: Chopra, Manish <redacted>
Cc: davem@davemloft.net; netdev@vger.kernel.org;
andrew.gospodarek@broadcom.com; Elior, Ariel [off-list ref];
Dept-Eng Everest Linux L2 [off-list ref]
Subject: Re: [PATCH net-next v4 4/5] bnx2x: Use NETIF_F_GRO_HW.
On Wed, Dec 13, 2017 at 1:08 AM, Chopra, Manish
[off-list ref] wrote:
quoted
Hi Michael, There seems a behavioral change here. This driver support
two HW aggregation modes [LRO and GRO] With the changes, Interfaces
come with HW GRO enabled and LRO disabled by default as opposed to earlier
where interfaces used to come with LRO enabled.
Right. Before, you had both NETIF_F_GRO and NETIF_F_LRO set and the code
looked at NETIF_F_LRO first and turned on LRO.
Now, we set NETIF_F_GRO and NETIF_F_GRO_HW by default. NETIF_F_LRO is
turned off since NETIF_F_GRO_HW is on.
If you want, I can change it back to the old default.
Yes please, I think we should not make any default behavior change.
Few more comments -
1). This driver uses module param "disable_tpa" also to completely disable TPA [whether it be LRO or HW GRO] along the initialization flow.
For ex.
/*Set TPA flags*/
if (bp->disable_tpa) {
bp->dev->hw_features &= ~NETIF_F_LRO;
bp->dev->features &= ~NETIF_F_LRO;
}
I think we should also disable HW gro here as well, so that device will come up with no TPA at all.
2). In bnx2x_fix_features() we used to do before these changes -
/* TPA requires Rx CSUM offloading */
if (!(features & NETIF_F_RXCSUM)) {
features &= ~NETIF_F_LRO;
features &= ~NETIF_F_GRO;
}
I think we should not turn off SW gro here, we should turn off HW gro here now ?
quoted
Also, there seems some problem when turning on LRO even after GRO disable.
When I tried to disable GRO and then tried to enable LRO it didn't go well. Not
sure why ?
I just put an old BCM57810 card into my machine and it works for me.
As long as I turn off GRO or GRO_HW, I can turn on LRO.
[root@localhost bnx2x]# ethtool -K p1p1 lro on Cannot get device udp-
fragmentation-offload settings: Operation not supported Cannot get device
udp-fragmentation-offload settings: Operation not supported Could not change
any device features [root@localhost bnx2x]# ethtool -K p1p1 gro off Cannot get
device udp-fragmentation-offload settings: Operation not supported Cannot get
device udp-fragmentation-offload settings: Operation not supported Actual
changes:
generic-receive-offload: off
large-receive-offload: on
rx-gro-hw: off [requested on]
[root@localhost bnx2x]# ethtool -K p1p1 lro on Cannot get device udp-
fragmentation-offload settings: Operation not supported Cannot get device
udp-fragmentation-offload settings: Operation not supported
Doesn't sound like HW specific.
Probably, I was testing on your older series, I will check again on latest series.
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-14 07:59:15
On Wed, Dec 13, 2017 at 11:46 PM, Chopra, Manish
[off-list ref] wrote:
2). In bnx2x_fix_features() we used to do before these changes -
/* TPA requires Rx CSUM offloading */
if (!(features & NETIF_F_RXCSUM)) {
features &= ~NETIF_F_LRO;
features &= ~NETIF_F_GRO;
}
I think we should not turn off SW gro here, we should turn off HW gro here now ?
OK. I will remove GRO.
GRO_HW will be turned off by netdev_fix_features() when RXCSUM is not on.
From: Or Gerlitz <hidden> Date: 2017-12-14 16:34:29
On Mon, Dec 11, 2017 at 1:41 PM, Michael Chan [off-list ref] wrote:
Introduce NETIF_F_GRO_HW feature flag and convert drivers that support
hardware GRO to use the new flag.
Hi Michael,
Could you add more performance motivations/results? looking on your
netconf slides [1]
I see (much) better CPU utilization (slide 5) -- do you have more
numbers to share?
Or.
[1] http://vger.kernel.org/netconf2017_files/hardware_gro.pdf
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-14 18:36:13
On Thu, Dec 14, 2017 at 8:34 AM, Or Gerlitz [off-list ref] wrote:
On Mon, Dec 11, 2017 at 1:41 PM, Michael Chan [off-list ref] wrote:
quoted
Introduce NETIF_F_GRO_HW feature flag and convert drivers that support
hardware GRO to use the new flag.
Hi Michael,
Could you add more performance motivations/results? looking on your
netconf slides [1]
I see (much) better CPU utilization (slide 5) -- do you have more
numbers to share?
The motivations are the same as LRO: to achieve higher RX throughput
and lower CPU utilization.
You can think of it as an improved version of LRO that is stricter and
provides more information to construct the GRO frame so that it is
reversible.
From: Or Gerlitz <hidden> Date: 2017-12-14 20:01:27
On Thu, Dec 14, 2017 at 8:36 PM, Michael Chan [off-list ref] wrote:
On Thu, Dec 14, 2017 at 8:34 AM, Or Gerlitz [off-list ref] wrote:
quoted
On Mon, Dec 11, 2017 at 1:41 PM, Michael Chan [off-list ref] wrote:
quoted
Introduce NETIF_F_GRO_HW feature flag and convert drivers that support
hardware GRO to use the new flag.
Hi Michael,
Could you add more performance motivations/results? looking on your
netconf slides [1]
I see (much) better CPU utilization (slide 5) -- do you have more
numbers to share?
The motivations are the same as LRO: to achieve higher RX throughput
and lower CPU utilization.
makes sense, what is the +/- %% improvement in RX throughput you see?
You can think of it as an improved version of LRO that is stricter and
provides more information to construct the GRO frame so that it is
reversible.
-----Original Message-----
From: Michael Chan [mailto:michael.chan@broadcom.com]
Sent: Thursday, December 14, 2017 2:16 AM
To: Chopra, Manish <redacted>
Cc: davem@davemloft.net; netdev@vger.kernel.org;
andrew.gospodarek@broadcom.com; Elior, Ariel [off-list ref];
Dept-Eng Everest Linux L2 [off-list ref]
Subject: Re: [PATCH net-next v4 4/5] bnx2x: Use NETIF_F_GRO_HW.
On Wed, Dec 13, 2017 at 1:08 AM, Chopra, Manish
[off-list ref] wrote:
quoted
Hi Michael, There seems a behavioral change here. This driver support
two HW aggregation modes [LRO and GRO] With the changes, Interfaces
come with HW GRO enabled and LRO disabled by default as opposed to earlier
where interfaces used to come with LRO enabled.
Right. Before, you had both NETIF_F_GRO and NETIF_F_LRO set and the code
looked at NETIF_F_LRO first and turned on LRO.
Now, we set NETIF_F_GRO and NETIF_F_GRO_HW by default. NETIF_F_LRO is
turned off since NETIF_F_GRO_HW is on.
If you want, I can change it back to the old default.
Michael, I checked it on again, I tried to set LRO in dev->features and dev->hw_features.
Somehow, it gets disabled after register_netdevice(). Any idea why ? Although, I am not running any Bridge/bonding devices.
Looks like, without this series also devices seems to have LRO disabled by default.
Not sure why register_netdevice() disables LRO even driver populates this feature prior to register_netdevice().
From: Michael Chan <michael.chan@broadcom.com> Date: 2017-12-15 07:56:50
On Thu, Dec 14, 2017 at 11:07 PM, Chopra, Manish
[off-list ref] wrote:
Michael, I checked it on again, I tried to set LRO in dev->features and dev->hw_features.
Somehow, it gets disabled after register_netdevice(). Any idea why ? Although, I am not running any Bridge/bonding devices.
Looks like, without this series also devices seems to have LRO disabled by default.
Not sure why register_netdevice() disables LRO even driver populates this feature prior to register_netdevice().