Hi Dave,
This patchset contains some bug fixes, a cleanup, and small improvements
from the team to the mlx4 Eth and core drivers.
Series generated against net-next commit:
02154927c115 "net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device"
Please push the following patch to -stable >= 4.6 as well:
"net/mlx4_core: Fix to clean devlink resources"
Thanks,
Tariq.
Jack Morgenstein (1):
net/mlx4_core: Fix deadlock when switching between polling and event
fw commands
Kamal Heib (2):
net/mlx4_en: Fix wrong indentation
net/mlx4_core: Fix to clean devlink resources
Leon Romanovsky (1):
net/mlx4_core: Use RCU to perform radix tree lookup for SRQ
Tariq Toukan (1):
net/mlx4_en: Add branch prediction hints in RX data-path
drivers/net/ethernet/mellanox/mlx4/cmd.c | 23 +++++++++++++++++------
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 28 +++++++++++++++-------------
drivers/net/ethernet/mellanox/mlx4/main.c | 3 +++
drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 ++
drivers/net/ethernet/mellanox/mlx4/srq.c | 14 +++++---------
5 files changed, 42 insertions(+), 28 deletions(-)
--
1.8.3.1
@@ -796,10 +798,10 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int budu64timestamp;booll2_tunnel;-if(!priv->port_up)+if(unlikely(!priv->port_up))return0;-if(budget<=0)+if(unlikely(budget<=0))returnpolled;/* Protect accesses to: ring->xdp_prog, priv->mac_hash list */
@@ -902,16 +904,16 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int budcaseXDP_PASS:break;caseXDP_TX:-if(!mlx4_en_xmit_frame(frags,dev,+if(likely(!mlx4_en_xmit_frame(frags,dev,length,tx_index,-&doorbell_pending))+&doorbell_pending)))gotoconsumed;break;default:bpf_warn_invalid_xdp_action(act);caseXDP_ABORTED:caseXDP_DROP:-if(mlx4_en_rx_recycle(ring,frags))+if(likely(mlx4_en_rx_recycle(ring,frags)))gotoconsumed;gotonext;}
@@ -1015,7 +1017,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud/* GRO not possible, complete processing here */skb=mlx4_en_rx_skb(priv,rx_desc,frags,length);-if(!skb){+if(unlikely(!skb)){ring->dropped++;gotonext;}
@@ -2970,6 +2970,7 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port)mlx4_err(dev,"Failed to create mtu file for port %d\n",port);device_remove_file(&info->dev->persist->pdev->dev,&info->port_attr);+devlink_port_unregister(&info->devlink_port);info->port=-1;}
From: Jack Morgenstein <redacted>
When switching from polling-based fw commands to event-based fw
commands, there is a race condition which could cause a fw command
in another task to hang: that task will keep waiting for the polling
sempahore, but may never be able to acquire it. This is due to
mlx4_cmd_use_events, which "down"s the sempahore back to 0.
During driver initialization, this is not a problem, since no other
tasks which invoke FW commands are active.
However, there is a problem if the driver switches to polling mode
and then back to event mode during normal operation.
The "test_interrupts" feature does exactly that.
Running "ethtool -t <eth device> offline" causes the PF driver to
temporarily switch to polling mode, and then back to event mode.
(Note that for VF drivers, such switching is not performed).
Fix this by adding a read-write semaphore for protection when
switching between modes.
Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
Signed-off-by: Matan Barak <redacted>
Signed-off-by: Jack Morgenstein <redacted>
Signed-off-by: Tariq Toukan <redacted>
---
drivers/net/ethernet/mellanox/mlx4/cmd.c | 23 +++++++++++++++++------
drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 ++
2 files changed, 19 insertions(+), 6 deletions(-)
This patchset contains some bug fixes, a cleanup, and small improvements
from the team to the mlx4 Eth and core drivers.
Series generated against net-next commit:
02154927c115 "net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device"
Please push the following patch to -stable >= 4.6 as well:
"net/mlx4_core: Fix to clean devlink resources"
Again, coding style fixes and optimizations like branch prediction
hints are not bug fixes and therefore not appropriate for 'net'.
This patchset contains some bug fixes, a cleanup, and small improvements
from the team to the mlx4 Eth and core drivers.
Series generated against net-next commit:
02154927c115 "net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device"
Please push the following patch to -stable >= 4.6 as well:
"net/mlx4_core: Fix to clean devlink resources"
Again, coding style fixes and optimizations like branch prediction
hints are not bug fixes and therefore not appropriate for 'net'.
Hi Dave,
He sent it to net-next, not net... ok?
Or.
This patchset contains some bug fixes, a cleanup, and small improvements
from the team to the mlx4 Eth and core drivers.
Series generated against net-next commit:
02154927c115 "net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device"
Please push the following patch to -stable >= 4.6 as well:
"net/mlx4_core: Fix to clean devlink resources"
Again, coding style fixes and optimizations like branch prediction
hints are not bug fixes and therefore not appropriate for 'net'.
Yes, I know. Please notice that it was submitted to net-next this time.
Regards,
Tariq
This patchset contains some bug fixes, a cleanup, and small
improvements
from the team to the mlx4 Eth and core drivers.
Series generated against net-next commit:
02154927c115 "net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device"
Please push the following patch to -stable >= 4.6 as well:
"net/mlx4_core: Fix to clean devlink resources"
Again, coding style fixes and optimizations like branch prediction
hints are not bug fixes and therefore not appropriate for 'net'.
Yes, I know. Please notice that it was submitted to net-next this
time.
This is completely incompatible with a request for one of the changes
to go into -stable.
If the change is not in 'net', it can't go to -stable.
This patchset contains some bug fixes, a cleanup, and small
improvements
from the team to the mlx4 Eth and core drivers.
Series generated against net-next commit:
02154927c115 "net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device"
Please push the following patch to -stable >= 4.6 as well:
"net/mlx4_core: Fix to clean devlink resources"
Again, coding style fixes and optimizations like branch prediction
hints are not bug fixes and therefore not appropriate for 'net'.
Yes, I know. Please notice that it was submitted to net-next this
time.
This is completely incompatible with a request for one of the changes
to go into -stable.
If the change is not in 'net', it can't go to -stable.
Dave,
So when we're pretty late in the 4.8-rc cycle, a fix for a problem
which was not introduced in 4.8-rc1 was targeted to net-next (4.9) and
not net.
This indeed creates a small mess when the fix needs to go to -stable as well.
I guess the correct thing to do next time, would be to either send to
net and ask you to take it to stable as part of picking the patch --
or send to net-next, and later send you a request to put it to stable
-- or, wait a bit and send it to net of the next kernel along with
stable request... we will pick one of these three way of doings next
(...) time.
So, at this point, I think it would be just correct to take the series
to net-next, and on a future point we'll issue a request to push the
patch into stable.
Or.
Or.
So when we're pretty late in the 4.8-rc cycle, a fix for a problem
which was not introduced in 4.8-rc1 was targeted to net-next (4.9) and
not net.
This indeed creates a small mess when the fix needs to go to -stable
as well.
...
I see that the series status is 'Changes requested'.
I agree with Or. If possible, please take the series, and we will
issue a request to push into -stable in the future.
Anyway, I can also do a re-submission if you prefer. Just let me know.
Either the bug exists in pre-net trees and needs to go to -stable, or
it does not.
If it does, you submit the change targetting 'net'.
This whole mess occurred because you tried to combine changes
inappropriate for 'net' with the bug fix.
Instead of fixing the issue properly, by removing the cleanups
and inappropriate changes, you tried to target 'net-next' instead.
That's why this mess exists.
Please send the change properly, targetting 'net', and not
alongside changes which are inappropriate to 'net'.
There is no other acceptable way to resolve this problem.
Thank you.
This patchset contains some bug fixes, a cleanup, and small
improvements
from the team to the mlx4 Eth and core drivers.
Series generated against net-next commit:
02154927c115 "net: dsa: bcm_sf2: Get VLAN_PORT_MASK from b53_device"
Please push the following patch to -stable >= 4.6 as well:
"net/mlx4_core: Fix to clean devlink resources"
Again, coding style fixes and optimizations like branch prediction
hints are not bug fixes and therefore not appropriate for 'net'.
Yes, I know. Please notice that it was submitted to net-next this
time.
This is completely incompatible with a request for one of the changes
to go into -stable.
If the change is not in 'net', it can't go to -stable.
Dave,
So when we're pretty late in the 4.8-rc cycle, a fix for a problem
which was not introduced in 4.8-rc1 was targeted to net-next (4.9) and
not net.
This indeed creates a small mess when the fix needs to go to -stable as well.
I guess the correct thing to do next time, would be to either send to
net and ask you to take it to stable as part of picking the patch --
or send to net-next, and later send you a request to put it to stable
-- or, wait a bit and send it to net of the next kernel along with
stable request... we will pick one of these three way of doings next
(...) time.
So, at this point, I think it would be just correct to take the series
to net-next, and on a future point we'll issue a request to push the
patch into stable.
Or.
Or.
Hi Dave,
I see that the series status is 'Changes requested'.
I agree with Or. If possible, please take the series, and we will issue a request to push into -stable in the future.
Anyway, I can also do a re-submission if you prefer. Just let me know.
Thanks,
Tariq