lkml.org 
[lkml]   [2019]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 001/151] net/mlx4_en: fix mlx4 ethtool -N insertion
    Date
    From: Luigi Rizzo <lrizzo@google.com>

    [ Upstream commit 34e59836565e36fade1464e054a3551c1a0364be ]

    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>
    Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
    +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
    @@ -1679,6 +1679,7 @@ static int mlx4_en_get_rxnfc(struct net_
    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)

    \
     
     \ /
      Last update: 2019-11-27 22:43    [W:5.534 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site