Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp239850ybi; Fri, 24 May 2019 03:08:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXdvDXFmD2J4IeMoRRSOmaL+isDw+5Qs89Din78xQnwAbQUGQiZRiFihKlB0v1lMauDbLG X-Received: by 2002:a63:700b:: with SMTP id l11mr48103362pgc.449.1558692487317; Fri, 24 May 2019 03:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558692487; cv=none; d=google.com; s=arc-20160816; b=nuwlG/2oRZVaW9Je/9iBveGlerktAR2UPOnyz29r9aII2Tnq1UPcGICHAOLAAztKo4 JjrERomz3HLwf7UM5xLQUPYVoiq7b7WFWmkj4KZeAmXbzXQYa58rO/ai2dK/qhROD0I3 CPz64HgZguZqV2Y/pbjmBcjEn1bgkmcvB3GqlV/vG0LVE7/vZiHMCgPZj3KBP+Y82MQL 8ZyjWKZC0J7W/vaLcFfVXEuH7mHTccbm48202Z0ErTE1PHnW0IiiW0PyGEdhiSVTqRnb e3b2pz+vlzksGoPxI8ZB3oWVJxmkEDCUX1HRU0oYaXMpybOaNEb0TfLi19hinnG546nk LU2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rT7FxEFiTE6O7R2ocDAH2J1+fFtufkSVeRV5TyBpUEo=; b=KPpLf29ogkrDptIRmfuVkPwkT+Ma3Sq9eIYMjPXv7CtrUyEAECmUkH2+cq8Orqn7rQ C6ixmBHrn5bZhrF/OD5vhVccN75oq8mSjDB/Jjwfi0JMu6CuhDU6QoqsGpwVv6s/3QbX Vi3oafKxOMerRTi3E4/3iivCgWpo10lFlt+gffadQqyAzXwuA3BsukxJJkaqim0EqnJ1 oQeYukm3uJlKMdZNGaEEwN4AA/0ymyiQZsAx5VcZw81sr6EB7d0IDAit7mrpOX+Mi9Wp X9gyZMSx5pO10w+v2sVXoSWvwgY/C7EjH0F8gkYPV1f0RlSg5KTkLRJMXBCO6aqzZsyS qoUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cn18si3501832plb.314.2019.05.24.03.07.49; Fri, 24 May 2019 03:08:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390511AbfEXKGQ (ORCPT + 99 others); Fri, 24 May 2019 06:06:16 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:59927 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390330AbfEXKGO (ORCPT ); Fri, 24 May 2019 06:06:14 -0400 X-Originating-IP: 90.88.147.134 Received: from mc-bl-xps13.lan (aaubervilliers-681-1-27-134.w90-88.abo.wanadoo.fr [90.88.147.134]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id BBE524001F; Fri, 24 May 2019 10:06:10 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Antoine Tenart , thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, mw@semihalf.com, Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next 4/5] net: mvpp2: cls: Extract the RSS context when parsing the ethtool rule Date: Fri, 24 May 2019 12:05:53 +0200 Message-Id: <20190524100554.8606-5-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190524100554.8606-1-maxime.chevallier@bootlin.com> References: <20190524100554.8606-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 c16e343ccbbf..c1a83e9cb80a 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c @@ -1281,6 +1281,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