lkml.org 
[lkml]   [2019]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.2 034/249] net: mvpp2: cls: Extract the RSS context when parsing the ethtool rule
    Date
    From: Maxime Chevallier <maxime.chevallier@bootlin.com>

    [ Upstream commit c561da68038a738f30eca21456534c2d1872d13d ]

    ethtool_rx_flow_rule_create takes into parameter the ethtool flow spec,
    which doesn't contain the rss context id. We therefore need to extract
    it ourself before parsing the ethtool rule.

    The FLOW_RSS flag is only set in info->fs.flow_type, and not
    info->flow_type.

    Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
    index a57d17ab91f0..fb06c0aa620a 100644
    --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
    +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
    @@ -1242,6 +1242,12 @@ int mvpp2_ethtool_cls_rule_ins(struct mvpp2_port *port,

    input.fs = &info->fs;

    + /* We need to manually set the rss_ctx, since this info isn't present
    + * in info->fs
    + */
    + if (info->fs.flow_type & FLOW_RSS)
    + input.rss_ctx = info->rss_context;
    +
    ethtool_rule = ethtool_rx_flow_rule_create(&input);
    if (IS_ERR(ethtool_rule)) {
    ret = PTR_ERR(ethtool_rule);
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-07-15 17:46    [W:8.201 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site