Hi Dave,
This series includes some important bug fixes for mlx5e driver.
Three misc fixes:
From Mohamad, compilation fix on s390 system
From Me, A fix for driver unload when switchdev mode is on.
From Tariq, HW LRO frag size optimization for when build_skb is not used
(striding RQ mode).
Three CQE compression related fixes:
Two fixes from Tariq and I, to correctly setup CQE compression
parameters on driver load and on arbitrary user modifications.
Last patch, fixes a very critical issue that was originally reported
by Tom, where the driver reported csum errors or even page ref issues
for when cqe compression is enabled and rapidly active.
For your convenience this series was generated on top of net-next branch:
005c3490e9db ('Revert "ath10k: Search SMBIOS for OEM board file extension"')
for -stable:
net/mlx5e: Register/unregister vport representors on interface (for kernel >= 4.9)
net/mlx5e: Do not reduce LRO WQE size when not using build_skb (for kernel >= 4.9)
net/mlx5e: Fix broken CQE compression initialization (for kernel >= 4.9)
net/mlx5e: Update MPWQE stride size when modifying CQE compress state (for kernel >= 4.7)
net/mlx5e: Fix wrong CQE decompression (for kernel >= 4.7)
Thanks,
Saeed.
Mohamad Haj Yahia (1):
net/mlx5e: s390 system compilation fix
Saeed Mahameed (2):
net/mlx5e: Register/unregister vport representors on interface
attach/detach
net/mlx5e: Update MPWQE stride size when modifying CQE compress state
Tariq Toukan (3):
net/mlx5e: Do not reduce LRO WQE size when not using build_skb
net/mlx5e: Fix broken CQE compression initialization
net/mlx5e: Fix wrong CQE decompression
drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 +
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 +
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 40 +++++++++++++---------
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 15 ++++----
.../net/ethernet/mellanox/mlx5/core/en_selftest.c | 1 +
5 files changed, 35 insertions(+), 23 deletions(-)
--
2.11.0
From: Tariq Toukan <redacted>
In cqe compression with striding RQ, the decompression of the CQE field
wqe_counter was done with a wrong wraparound value.
This caused handling cqes with a wrong pointer to wqe (rx descriptor)
and creating SKBs with wrong data, pointing to wrong (and already consumed)
strides/pages.
The meaning of the CQE field wqe_counter in striding RQ holds the
stride index instead of the WQE index. Hence, when decompressing
a CQE, wqe_counter should have wrapped-around the number of strides
in a single multi-packet WQE.
We dropped this wrap-around mask at all in CQE decompression of striding
RQ. It is not needed as in such cases the CQE compression session would
break because of different value of wqe_id field, starting a new
compression session.
Tested:
ethtool -K ethxx lro off/on
ethtool --set-priv-flags ethxx rx_cqe_compress on
super_netperf 16 {ipv4,ipv6} -t TCP_STREAM -m 50 -D
verified no csum errors and no page refcount issues.
Fixes: 7219ab34f184 ("net/mlx5e: CQE compression")
Signed-off-by: Tariq Toukan <redacted>
Reported-by: Tom Herbert <redacted>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <redacted>
---
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
When the admin enables/disables cqe compression, updating
mpwqe stride size is required:
CQE compress ON ==> stride size = 256B
CQE compress OFF ==> stride size = 64B
This is already done on driver load via mlx5e_set_rq_type_params, all we
need is just to call it on arbitrary admin changes of cqe compression
state via priv flags or when changing timestamping state
(as it is mutually exclusive with cqe compression).
This bug introduces no functional damage, it only makes cqe compression
occur less often, since in ConnectX4-LX CQE compression is performed
only on packets smaller than stride size.
Tested:
ethtool --set-priv-flags ethxx rx_cqe_compress on
pktgen with 64 < pkt size < 256 and netperf TCP_STREAM (IPv4/IPv6)
verify `ethtool -S ethxx | grep compress` are advancing more often
(rapidly)
Fixes: 7219ab34f184 ("net/mlx5e: CQE compression")
Signed-off-by: Saeed Mahameed <redacted>
Reviewed-by: Tariq Toukan <redacted>
Cc: kernel-team@fb.com
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 +
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 +
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 +
4 files changed, 4 insertions(+), 1 deletion(-)
From: Tariq Toukan <redacted>
Some of RQ type parameters are derived from CQE compression state flag,
CQE compression flag was initialized only after RQ type parameters
setup. This leads to load RQ with stride size smaller than what we
want for when CQE compression is on.
This bug introduces no functional damage, it only makes CQE compression
occur less often, since in ConnectX4-LX CQE compression is performed
only on packets smaller than stride size.
Fix this by marking default status of CQE compression in PFLAG prior to
calling mlx5e_set_rq_priv_params(), as it inits some fields based on it.
Tested:
load driver on systems where rx CQE compress will be on (MH)
pktgen with 64 < pkt size < 256 and netperf TCP_STREAM (IPv4/IPv6)
verify `ethtool -S ethxx | grep compress` are advancing more often
(rapidly)
Fixes: 2fc4bfb7250d ("net/mlx5e: Dynamic RQ type infrastructure")
Signed-off-by: Tariq Toukan <redacted>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <redacted>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Currently vport representors are added only on driver load and removed on
driver unload. Apparently we forgot to handle them when we added the
seamless reset flow feature. This caused to leave the representors
netdevs alive and active with open HW resources on pci shutdown and on
error reset flows.
To overcome this we move their handling to interface attach/detach, so
they would be cleaned up on shutdown and recreated on reset flows.
Fixes: 26e59d8077a3 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks")
Signed-off-by: Saeed Mahameed <redacted>
Reviewed-by: Hadar Hen Zion <redacted>
Reviewed-by: Roi Dayan <redacted>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
On Wed, Feb 22, 2017 at 7:20 AM, Saeed Mahameed [off-list ref] wrote:
From: Tariq Toukan <redacted>
When rq_type is Striding RQ, no room of SKB_RESERVE is needed
as SKB allocation is not done via build_skb.
Fixes: e4b85508072b ("net/mlx5e: Slightly reduce hardware LRO size")
Signed-off-by: Tariq Toukan <redacted>
Signed-off-by: Saeed Mahameed <redacted>
why this one is a bug fix?
Sound like an optimization from commit log.
On Wed, Feb 22, 2017 at 9:45 PM, Alexei Starovoitov
[off-list ref] wrote:
On Wed, Feb 22, 2017 at 7:20 AM, Saeed Mahameed [off-list ref] wrote:
quoted
From: Tariq Toukan <redacted>
When rq_type is Striding RQ, no room of SKB_RESERVE is needed
as SKB allocation is not done via build_skb.
Fixes: e4b85508072b ("net/mlx5e: Slightly reduce hardware LRO size")
Signed-off-by: Tariq Toukan <redacted>
Signed-off-by: Saeed Mahameed <redacted>
why this one is a bug fix?
Sound like an optimization from commit log.
It is a regression since ("net/mlx5e: Slightly reduce hardware LRO size").
And we see due to this a small drop in HW LRO performance.
We just fixed the LRO size to be the same as it was before the
offending patch for striding RQ case.
This series includes some important bug fixes for mlx5e driver.
Three misc fixes:
From Mohamad, compilation fix on s390 system
From Me, A fix for driver unload when switchdev mode is on.
From Tariq, HW LRO frag size optimization for when build_skb is not used
(striding RQ mode).
Three CQE compression related fixes:
Two fixes from Tariq and I, to correctly setup CQE compression
parameters on driver load and on arbitrary user modifications.
Last patch, fixes a very critical issue that was originally reported
by Tom, where the driver reported csum errors or even page ref issues
for when cqe compression is enabled and rapidly active.
For your convenience this series was generated on top of net-next branch:
005c3490e9db ('Revert "ath10k: Search SMBIOS for OEM board file extension"')
Series applied.
for -stable:
net/mlx5e: Register/unregister vport representors on interface (for kernel >= 4.9)
net/mlx5e: Do not reduce LRO WQE size when not using build_skb (for kernel >= 4.9)
net/mlx5e: Fix broken CQE compression initialization (for kernel >= 4.9)
net/mlx5e: Update MPWQE stride size when modifying CQE compress state (for kernel >= 4.7)
net/mlx5e: Fix wrong CQE decompression (for kernel >= 4.7)