Hello Dave,
This is a patchset of 3 fixes and additional change that removes
a port Link layer type restriction that is no longer relevant.
Thanks,
Yevgeny
---
Yevgeny Petrilin (3):
net/mlx4_en: Setting the NETIF_F_GRO flag back to dev->hw_features
net/mlx4_en: Fixing TX queue stop/wake flow
net/mlx4_core: Remove port type restrictions
Amir Vadai (1):
net/mlx4_en: loopbacked packets are dropped when SMAC=DMAC
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 3 ++-
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 4 ++--
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 17 +++++++----------
drivers/net/ethernet/mellanox/mlx4/main.c | 3 ---
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 -
drivers/net/ethernet/mellanox/mlx4/sense.c | 14 --------------
6 files changed, 11 insertions(+), 31 deletions(-)
Removing the ring->blocked flag, it is redundant and leads to a race:
We close the TX queue and then set the "blocked" flag.
Between those 2 operations the completion function can check the "blocked"
flag, sees that it is 0, and wouldn't open the TX queue.
Using netif_tx_queue_stopped to check the state of the queue to avoid this race.
Signed-off-by: Yevgeny Petrilin <redacted>
---
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 17 +++++++----------
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 -
2 files changed, 7 insertions(+), 11 deletions(-)
From: Amir Vadai <redacted>
Should NOT check SMAC=DMAC when:
1. loopback is turned on
2. validate_loopback is true.
Fixed it accordingly.
Signed-off-by: Amir Vadai <redacted>
---
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
@@ -614,8 +614,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud/* If source MAC is equal to our own MAC and not performing*theselftestorflbdisabled-dropthepacket*/if(s_mac==priv->mac&&-(!(dev->features&NETIF_F_LOOPBACK)||-!priv->validate_loopback))+!((dev->features&NETIF_F_LOOPBACK)||+priv->validate_loopback))gotonext;/*
The bug which removed it was introduced in commit c8c64cff
which added the hw_features.
Signed-off-by: Yevgeny Petrilin <redacted>
---
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
@@ -1658,7 +1658,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,/**Setdriverfeatures*/-dev->hw_features=NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM;+dev->hw_features=NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|+NETIF_F_GRO;if(mdev->LSO_support)dev->hw_features|=NETIF_F_TSO|NETIF_F_TSO6;
Port1=Eth, Port2=IB restriction is no longer required.
Having RoCE, there will always rdma port initialized over ConnectX
physical port, no matter whether the link layer is IB or Ethernet.
So we always have dual port IB device.
Signed-off-by: Yevgeny Petrilin <redacted>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 3 ---
drivers/net/ethernet/mellanox/mlx4/sense.c | 14 --------------
2 files changed, 0 insertions(+), 17 deletions(-)
Yevgeny Petrilin (3):
net/mlx4_en: Setting the NETIF_F_GRO flag back to dev->hw_features
As pointed out, this isn't a bug.
You just made this change purely via code inspection, and that's very
disappointing because this would have been so simple to validate.
Yevgeny Petrilin (3):
net/mlx4_en: Setting the NETIF_F_GRO flag back to dev->hw_features
As pointed out, this isn't a bug.
You just made this change purely via code inspection, and that's very
disappointing because this would have been so simple to validate.
Hello Dave,
You are absolutely right,
I should have checked it better.
There are few more modules setting this flag during device initialization, I guess we need to clean all.
Can you please apply the other 3 or should I resubmit them?
Thanks,
Yevgeny