]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Do not modify number of rules
authorSubbaraya Sundeep <sbhatta@marvell.com>
Thu, 18 Mar 2021 14:15:42 +0000 (19:45 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Mar 2021 21:12:41 +0000 (14:12 -0700)
commit47b01d6d0974f5e14bf584d2e6ee6be511717157
treed5acabc8d7a49ad8b0f84bb0a6a283e4a70b2d63
parent30f731bc86ee72c3b5278c51ab2cd642089169eb
octeontx2-pf: Do not modify number of rules

In the ETHTOOL_GRXCLSRLALL ioctl ethtool uses
below structure to read number of rules from the driver.

    struct ethtool_rxnfc {
            __u32                           cmd;
            __u32                           flow_type;
            __u64                           data;
            struct ethtool_rx_flow_spec     fs;
            union {
                    __u32                   rule_cnt;
                    __u32                   rss_context;
            };
            __u32                           rule_locs[0];
    };

Driver must not modify rule_cnt member. But currently driver
modifies it by modifying rss_context. Hence fix it by using a
local variable.

Fixes: 31758486a5fc ("octeontx2-pf: Add RSS multi group support")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c