linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion
@ 2019-11-15 20:12 Luigi Rizzo
  2019-11-16 21:10 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Luigi Rizzo @ 2019-11-15 20:12 UTC (permalink / raw)
  To: netdev; +Cc: linux-rdma, linux-kernel, Luigi Rizzo

ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
total number of entries in the rx classifier table.  Surprisingly, mlx4
is missing this part (in principle ethtool could still move forward and
try the insert).

Tested: compiled and run command:
	phh13:~# ethtool -N eth1 flow-type udp4  queue 4
	Added rule with ID 255

Signed-off-by: Luigi Rizzo <lrizzo@google.com>
Change-Id: I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
---
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index d8313e2ee6002..c12da02c2d1bd 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -1745,6 +1745,7 @@ static int mlx4_en_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
 		err = mlx4_en_get_flow(dev, cmd, cmd->fs.location);
 		break;
 	case ETHTOOL_GRXCLSRLALL:
+		cmd->data = MAX_NUM_OF_FS_RULES;
 		while ((!err || err == -ENOENT) && priority < cmd->rule_cnt) {
 			err = mlx4_en_get_flow(dev, cmd, i);
 			if (!err)
-- 
2.24.0.432.g9d3f5f5b63-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion
  2019-11-15 20:12 [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion Luigi Rizzo
@ 2019-11-16 21:10 ` David Miller
  2019-11-17 14:46   ` Tariq Toukan
  2019-11-17 15:28   ` Gal Pressman
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2019-11-16 21:10 UTC (permalink / raw)
  To: lrizzo; +Cc: netdev, linux-rdma, linux-kernel, tariqt

From: Luigi Rizzo <lrizzo@google.com>
Date: Fri, 15 Nov 2019 12:12:25 -0800

> ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
> total number of entries in the rx classifier table.  Surprisingly, mlx4
> is missing this part (in principle ethtool could still move forward and
> try the insert).
> 
> Tested: compiled and run command:
> 	phh13:~# ethtool -N eth1 flow-type udp4  queue 4
> 	Added rule with ID 255
> 
> Signed-off-by: Luigi Rizzo <lrizzo@google.com>
> Change-Id: I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76

Luigi, _always_ CC: the appropriate maintainer when making changes to the
kernel, as per the top-level MAINTAINERS file.

Tariq et al., please review.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion
  2019-11-16 21:10 ` David Miller
@ 2019-11-17 14:46   ` Tariq Toukan
  2019-11-17 18:29     ` David Miller
  2019-11-17 15:28   ` Gal Pressman
  1 sibling, 1 reply; 6+ messages in thread
From: Tariq Toukan @ 2019-11-17 14:46 UTC (permalink / raw)
  To: David Miller, lrizzo; +Cc: netdev, linux-rdma, linux-kernel, Tariq Toukan



On 11/16/2019 11:10 PM, David Miller wrote:
> From: Luigi Rizzo <lrizzo@google.com>
> Date: Fri, 15 Nov 2019 12:12:25 -0800
> 
>> ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
>> total number of entries in the rx classifier table.  Surprisingly, mlx4
>> is missing this part (in principle ethtool could still move forward and
>> try the insert).
>>
>> Tested: compiled and run command:
>> 	phh13:~# ethtool -N eth1 flow-type udp4  queue 4
>> 	Added rule with ID 255
>>
>> Signed-off-by: Luigi Rizzo <lrizzo@google.com>
>> Change-Id: I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
> 
> Luigi, _always_ CC: the appropriate maintainer when making changes to the
> kernel, as per the top-level MAINTAINERS file.
> 
> Tariq et al., please review.
> 

Reviewed-by: Tariq Toukan <tariqt@mellanox.com>

Thanks for your patch.

Tariq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion
  2019-11-16 21:10 ` David Miller
  2019-11-17 14:46   ` Tariq Toukan
@ 2019-11-17 15:28   ` Gal Pressman
  1 sibling, 0 replies; 6+ messages in thread
From: Gal Pressman @ 2019-11-17 15:28 UTC (permalink / raw)
  To: lrizzo; +Cc: David Miller, netdev, linux-rdma, linux-kernel, tariqt

On 16/11/2019 23:10, David Miller wrote:
> From: Luigi Rizzo <lrizzo@google.com>
> Date: Fri, 15 Nov 2019 12:12:25 -0800
> 
>> ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
>> total number of entries in the rx classifier table.  Surprisingly, mlx4
>> is missing this part (in principle ethtool could still move forward and
>> try the insert).
>>
>> Tested: compiled and run command:
>> 	phh13:~# ethtool -N eth1 flow-type udp4  queue 4
>> 	Added rule with ID 255
>>
>> Signed-off-by: Luigi Rizzo <lrizzo@google.com>
>> Change-Id: I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
> 
> Luigi, _always_ CC: the appropriate maintainer when making changes to the
> kernel, as per the top-level MAINTAINERS file.

You should also remove the Change-Id tag before submission.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion
  2019-11-17 14:46   ` Tariq Toukan
@ 2019-11-17 18:29     ` David Miller
  2019-11-18 17:38       ` Luigi Rizzo
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2019-11-17 18:29 UTC (permalink / raw)
  To: tariqt; +Cc: lrizzo, netdev, linux-rdma, linux-kernel

From: Tariq Toukan <tariqt@mellanox.com>
Date: Sun, 17 Nov 2019 14:46:50 +0000

> 
> 
> On 11/16/2019 11:10 PM, David Miller wrote:
>> From: Luigi Rizzo <lrizzo@google.com>
>> Date: Fri, 15 Nov 2019 12:12:25 -0800
>> 
>>> ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
>>> total number of entries in the rx classifier table.  Surprisingly, mlx4
>>> is missing this part (in principle ethtool could still move forward and
>>> try the insert).
>>>
>>> Tested: compiled and run command:
>>> 	phh13:~# ethtool -N eth1 flow-type udp4  queue 4
>>> 	Added rule with ID 255
>>>
>>> Signed-off-by: Luigi Rizzo <lrizzo@google.com>
>>> Change-Id: I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
>> 
>> Luigi, _always_ CC: the appropriate maintainer when making changes to the
>> kernel, as per the top-level MAINTAINERS file.
>> 
>> Tariq et al., please review.
>> 
> 
> Reviewed-by: Tariq Toukan <tariqt@mellanox.com>

Applied and queued up for -stable, with Change-Id: removed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion
  2019-11-17 18:29     ` David Miller
@ 2019-11-18 17:38       ` Luigi Rizzo
  0 siblings, 0 replies; 6+ messages in thread
From: Luigi Rizzo @ 2019-11-18 17:38 UTC (permalink / raw)
  To: David Miller; +Cc: tariqt, netdev, linux-rdma, linux-kernel

On Sun, Nov 17, 2019 at 10:29 AM David Miller <davem@davemloft.net> wrote:
>
> From: Tariq Toukan <tariqt@mellanox.com>
> Date: Sun, 17 Nov 2019 14:46:50 +0000
>
> >
> >
> > On 11/16/2019 11:10 PM, David Miller wrote:
> >> From: Luigi Rizzo <lrizzo@google.com>
> >> Date: Fri, 15 Nov 2019 12:12:25 -0800
> >>
> >>> ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
> >>> total number of entries in the rx classifier table.  Surprisingly, mlx4
> >>> is missing this part (in principle ethtool could still move forward and
> >>> try the insert).
> >>>
> >>> Tested: compiled and run command:
> >>>     phh13:~# ethtool -N eth1 flow-type udp4  queue 4
> >>>     Added rule with ID 255
> >>>
> >>> Signed-off-by: Luigi Rizzo <lrizzo@google.com>
> >>> Change-Id: I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
> >>
> >> Luigi, _always_ CC: the appropriate maintainer when making changes to the
> >> kernel, as per the top-level MAINTAINERS file.
> >>
> >> Tariq et al., please review.
> >>
> >
> > Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
>
> Applied and queued up for -stable, with Change-Id: removed.


Thank you all, apologies for mistakes.

cheers
luigi

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-18 17:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 20:12 [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion Luigi Rizzo
2019-11-16 21:10 ` David Miller
2019-11-17 14:46   ` Tariq Toukan
2019-11-17 18:29     ` David Miller
2019-11-18 17:38       ` Luigi Rizzo
2019-11-17 15:28   ` Gal Pressman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).