This implements ndo_poll_controller in net_device_ops for mlx5, which is
necessary to use netconsole with this driver.
Signed-off-by: Calvin Owens <redacted>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
On Fri, Sep 23, 2016 at 11:13 PM, Calvin Owens [off-list ref] wrote:
quoted hunk
This implements ndo_poll_controller in net_device_ops for mlx5, which is
necessary to use netconsole with this driver.
Signed-off-by: Calvin Owens <redacted>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
@@ -2786,6 +2786,20 @@ static void mlx5e_tx_timeout(struct net_device *dev)schedule_work(&priv->tx_timeout_work);}+#ifdef CONFIG_NET_POLL_CONTROLLER+/* Fake "interrupt" called by netpoll (eg netconsole) to send skbs without+*reenablinginterrupts.+*/+staticvoidmlx5e_netpoll(structnet_device*dev)+{+structmlx5e_priv*priv=netdev_priv(dev);+inti,nr_sq=priv->params.num_channels*priv->params.num_tc;++for(i=0;i<nr_sq;i++)+napi_schedule(priv->txq_to_sq_map[i]->cq.napi);
Hi Calvin,
Basically all CQs on the same channel are sharing the same napi, so
here you will end up calling napi_schedule more than once for each
napi (channel).
iterating over the SQs map is irrelevant here, all you need to do is
to iterate over the channels:
for (i = 0; i < priv->params.num_channels; i++)
napi_schedule(priv->channel[i]->napi);
Thanks,
Saeed.
This implements ndo_poll_controller in net_device_ops callback for mlx5,
which is necessary to use netconsole with this driver.
Cc: Saeed Mahameed <redacted>
Signed-off-by: Calvin Owens <redacted>
---
Changes in v2:
* Only iterate channels to avoid redundant napi_schedule() calls
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
On Wed, Sep 28, 2016 at 1:23 AM, Calvin Owens [off-list ref] wrote:
This implements ndo_poll_controller in net_device_ops callback for mlx5,
which is necessary to use netconsole with this driver.
Cc: Saeed Mahameed <redacted>
Signed-off-by: Calvin Owens <redacted>
This implements ndo_poll_controller in net_device_ops callback for mlx5,
which is necessary to use netconsole with this driver.
Cc: Saeed Mahameed <redacted>
Signed-off-by: Calvin Owens <redacted>
---
Changes in v2:
* Only iterate channels to avoid redundant napi_schedule() calls
This doesn't apply cleanly to net-next, please respin.
This implements ndo_poll_controller in net_device_ops callbacks for mlx5,
which is necessary to use netconsole with this driver.
Acked-By: Saeed Mahameed <redacted>
Signed-off-by: Calvin Owens <redacted>
---
Changes in v2:
* Only iterate channels to avoid redundant napi_schedule() calls
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
This implements ndo_poll_controller in net_device_ops callbacks for mlx5,
which is necessary to use netconsole with this driver.
Acked-By: Saeed Mahameed <redacted>
Signed-off-by: Calvin Owens <redacted>
---
Changes in v2:
* Only iterate channels to avoid redundant napi_schedule() calls