From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30053.outbound.protection.outlook.com [40.107.3.53]) by dpdk.org (Postfix) with ESMTP id E5AB01BF86 for ; Fri, 6 Jul 2018 10:17:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=azeHtq72B5QAcyuvbPnm7+cgexaRH1jimypfu+KuUho=; b=Wi3YgnDAQuwYa0RlZSOG+mCWetHgDSQdsjNEIHT6H6vTKo6dUqUwXdLVxC0hfJq3ZjPkE+NiwazbhqfBIQvAJEPW6SfvBcZly7emW+qE/TuYXoAO1CYx1Tc3MWnzVgTU8LFL/yrs3eAS1Zu+brh39q0I6MQubMNIHzJlqekvtwA= Received: from minint-98vp2qg (73.222.116.174) by DB6PR0501MB2040.eurprd05.prod.outlook.com (2603:10a6:4:6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Fri, 6 Jul 2018 08:17:02 +0000 Date: Fri, 6 Jul 2018 01:16:47 -0700 From: Yongseok Koh To: Nelio Laranjeiro Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20180706081646.GA52308@minint-98vp2qg> References: <3d98905c5684a15c9cf96be6b65fc6d83d5443d8.1530111623.git.nelio.laranjeiro@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3d98905c5684a15c9cf96be6b65fc6d83d5443d8.1530111623.git.nelio.laranjeiro@6wind.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [73.222.116.174] X-ClientProxiedBy: CY4PR19CA0047.namprd19.prod.outlook.com (2603:10b6:903:103::33) To DB6PR0501MB2040.eurprd05.prod.outlook.com (2603:10a6:4:6::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8e246e23-17d8-483d-cc73-08d5e318da92 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(48565401081)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB6PR0501MB2040; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 3:YRTPuWJnxBbId1zi9IPu/dQtge9XYQfKlJQJGYByVh8nibPsj6cFuQ2kyQj+p7rrcQTEFuTLIGCp2zQf6IjThBd25dxxreLcYRZ93q3OSds84/CqqjqO18rOGUszzq5XLqPV9qYjASTpsKhY7ZoGttpBxi7pUbqsvIpvnVFLGDoJNRjO3LzUEQM3fGwA53ZJs5uLr30iTjzQWvc38LwNK8f+2No3Vf4zs4wfpqdmYKs4mkG+7cq6Ty7EWEA28BpT; 25:b/TNUE0Agu1WtIKCeNd8VPcHNArNXzsxiemnqII6FzTE0a3+XluSzMqPuyCpqBAE/hYyDhuSuBzf5cLDnmfCyAfH0qESKiWbgkAnRuADCpAfH2XATnQdlcgORN4DygojPp9IJobmfK34JX22XPHtWkxztWAI/+3HPUC0VGAijV2MCn/ZklzARVVGVulRjiiBzi5DO+mIj6oyBSXTrBU1hHp0s1Q1E+O59O7qfVSPqE/wqItG764aqg4i9+G8aXemEjkL8oPvy7O433hyXX/raypGlsxS+4+fMwjKNd858UYpuMhliLqcNQ4ZjWK/sI6A+4KHUG1m4t+auBl879yv3A==; 31:o5K0uU6mbY4eN1FFsPUEz2yS/MA950vD2aMzbjM7R+DzzWT3/xYFrB7+bhmbw6VV41oIQ+BqX0/iGdqBtzWv0WHkKoxJKTHrDVAfANmI8lAo7pVW3cIpV49Uvk1QsBlwFQ76VUb0tg5bT/sICui9iGshACuEVbtrOTIPE39zwcZFXCcjNPUyk4CaCXl1GT7FIBFVc3d/9JiHhNGG7IjsKOExT24EQXXx+qAFgS3h0Ro= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2040: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 20:Mx/DVQ58JKvHw7EOdwaxEjKRKmPV0Gyn9BThh0w0NxD4gbTVdZ82T1fcoanAfdMIwZAS9Lpjfu15xZIBj86nSCgOY1C+cmvH2PcTwBjlteD/w4x5mHi1FhUB6yxiZe8GISN+4YbcCJ4eH8fQB8QhrHzsuEetPoCjArK0IOt2PdEBQZoSY8sLVN17ScLpHUBpG/a8rPX0OZnbgextoWWXFQvZZqN9av40s2on1lZuzMgyZT41dttayvkoImdsWUgxNMy+g+5FfLusGyB/7Jt1ye7HUOOBbNYkx4dfO6Zd4R9MBAajbUTQJMx6WL+mKxb7zmUMqMJHyJ3TcTXS1L8c2YKuHQC454r4et7nmzmjFc+7DOB3MtVLIkkLZEpQ6inS2AUXycQ8ZgljeWKbDGBP1QlYbiWZZi6v//YRopoKPTc41CJySMyFCZLYx1GQulrpD8DDJeLyUNcB6KAQS1sePYZAttlju7kmNdf6IZ+vUHO6mh+gOHHlERU2TheMU7Pi; 4:lpVXq3OPP2i5iUuwIOj47RzfRNBZbhNy4hlG7AFis4NB5P3maCBzd2FmSK7gmLl+XN+FRaNJ4upz0HcUh3FMmizGq6KYd64gqVY3SCLd2ISXfuD738GU5uvhZoCNOkiuLjhWJWqyzZCXDXDbXcAHZCM5bQ1WNQ9FOa4PT7Q5PfSYJ76fVuS12Nnh421RU/u75GyToxUe5v8j8vaWIhA1VKWqRt5Y/SCXzeMLeAYVcyTxmRNfLDg1IHB4Qri5286k9nwEjz8Rq506XlQG9gfLdA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231291)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:DB6PR0501MB2040; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2040; X-Forefront-PRVS: 0725D9E8D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(136003)(366004)(346002)(189003)(199004)(6246003)(6916009)(9686003)(6666003)(53936002)(5660300001)(47776003)(66066001)(4326008)(25786009)(68736007)(3846002)(105586002)(50466002)(106356001)(23726003)(1076002)(97736004)(305945005)(6116002)(478600001)(81156014)(81166006)(8936002)(8676002)(7736002)(55016002)(229853002)(2906002)(33656002)(16526019)(956004)(446003)(186003)(33896004)(6496006)(11346002)(33716001)(52116002)(76176011)(486006)(86362001)(58126008)(476003)(316002)(16586007)(14444005)(386003)(26005)(575784001)(143363002)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2040; H:minint-98vp2qg; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2040; 23:4UpEEoLr0vsxL9RHmM8kAgM4HbyoOVIZUd1cFlb?= =?us-ascii?Q?Rx/lhokCHoo5UTk8QoSG08gMkDZXgpR373X+7ikyz80JSu3S0VJtor9v+MWm?= =?us-ascii?Q?T+LxryK0jbMz24birux98L5eDdz5rrNDgFqBOYq0As7brjf/O5sc9S9iyZpw?= =?us-ascii?Q?5NjGuuiCt2VM9dNzLvsYM8l39/8nsk3axRArwXNt8utRss88hFzccUqBE6Yd?= =?us-ascii?Q?JDkNUaPzgpQiY/nevBhlLCBNhDaP1jSpPN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avJtsgXKcaT1FfHL+E4k672PB/s8Hn5it3zKS+dKpIQwgF7v/8UcBV25lQl7ykCIInY/CI/9wvbfzExXP2jcH+j3tjysHxQhCLRBkjNekBcmN0udKsbw3UmZ60u5DBCQA==; 5:MkffAaAbK8pGBS3ToJjIWHNVhEquyWjrhb6RsDaqrx5O4MuDChWKzBNSTOWGZcKypObLSYbV/kbPE3EyrRoV+834c0KKcrYbhtFKBZkb+oiSKemfpVkgqM/fz35KCplEVXz14Gu/lYXwRIsXqXSej/eAUjuFMH6LNoKkXdmrPd8=; 24:zbjSaWW3tVBCSuhZaPriDxV05PLSprhA9RvEJV5QZLwyJnVRqj4bMqv2R1WaxWZy2SZQHve8/fhOJ6B80Nm1xxVTDWdKh0nkaq0wbJNhL7o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2040; 7:TzeKGI5Hg95tcij2q7jPqVX//ZOlhRhBiCBhN1HaV2ATI6ol0w/67doPA9Or73KaZUjfKU+0/a+woOkIeVSGTDlh277AC5nlRFT+21o/kdF9WKi0vvJnCdWNxSBKnBvZ9nlrBdyBy/1LNI2KDkDbRxKAv4yondF2uTG4/gBT1V5NLILyjd2k/H3Z4EJlqjr22QXG1Ii9DDM+Cop3vuqSCTnhaNI/HeEmojpR4eBBTijFd1ZiOwfEQysrPlGEdOPL X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2018 08:17:02.0220 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e246e23-17d8-483d-cc73-08d5e318da92 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2040 Subject: Re: [dpdk-dev] [PATCH v2 15/20] net/mlx5: support inner RSS computation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2018 08:17:05 -0000 On Wed, Jun 27, 2018 at 05:07:47PM +0200, Nelio Laranjeiro wrote: > Signed-off-by: Nelio Laranjeiro > --- > drivers/net/mlx5/mlx5_flow.c | 131 +++++++++++++++++++++++++---------- > drivers/net/mlx5/mlx5_rxtx.h | 1 - > 2 files changed, 96 insertions(+), 36 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 7dda88641..eedf0c461 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -219,6 +219,8 @@ struct rte_flow { > struct mlx5_flow_verbs *cur_verbs; > /**< Current Verbs flow structure being filled. */ > struct rte_flow_action_rss rss;/**< RSS context. */ > + uint32_t ptype; > + /**< Store tunnel packet type data to store in Rx queue. */ > uint8_t key[40]; /**< RSS hash key. */ > uint16_t (*queue)[]; /**< Destination queues to redirect traffic to. */ > }; > @@ -1320,13 +1322,15 @@ mlx5_flow_action_queue(struct rte_eth_dev *dev, > * Pointer to flow structure. > * @param types > * RSS types for this flow (see ETH_RSS_*). > + * @param level > + * RSS level. > * > * @return > * 0 on success, a negative errno value otherwise and rte_errno is set. > */ > static int > mlx5_flow_action_rss_verbs_attr(struct rte_eth_dev *dev, struct rte_flow *flow, > - uint32_t types) > + uint32_t types, uint32_t level) > { > const uint32_t layers = mlx5_flow_layers(flow); > uint64_t hash_fields; > @@ -1374,6 +1378,8 @@ mlx5_flow_action_rss_verbs_attr(struct rte_eth_dev *dev, struct rte_flow *flow, > hash_fields = 0; > priority = 2; > } > + if (hash_fields && level == 2) > + hash_fields |= IBV_RX_HASH_INNER; > flow->cur_verbs->hash_fields = hash_fields; > flow->cur_verbs->attr->priority = > mlx5_flow_priority(dev, flow->attributes.priority, priority); > @@ -1416,7 +1422,7 @@ mlx5_flow_action_rss(struct rte_eth_dev *dev, > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > &rss->func, > "RSS hash function not supported"); > - if (rss->level > 1) > + if (rss->level > 2) > return rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ACTION_CONF, > &rss->level, > @@ -1456,6 +1462,7 @@ mlx5_flow_action_rss(struct rte_eth_dev *dev, > flow->rss.queue_num = rss->queue_num; > memcpy(flow->key, rss->key, rss_hash_default_key_len); > flow->rss.types = rss->types; > + flow->rss.level = rss->level; > flow->fate |= MLX5_FLOW_FATE_RSS; > return 0; > } > @@ -1814,7 +1821,8 @@ mlx5_flow_merge(struct rte_eth_dev *dev, struct rte_flow *flow, > flow->cur_verbs->attr->priority = > flow->attributes.priority; > ret = mlx5_flow_action_rss_verbs_attr(dev, flow, > - flow->rss.types); > + flow->rss.types, > + flow->rss.level); > if (ret < 0) > goto error; > LIST_INSERT_HEAD(&flow->verbs, flow->cur_verbs, next); > @@ -1828,27 +1836,6 @@ mlx5_flow_merge(struct rte_eth_dev *dev, struct rte_flow *flow, > return ret; > } > > -/** > - * Mark the Rx queues mark flag if the flow has a mark or flag modifier. > - * > - * @param dev > - * Pointer to Ethernet device. > - * @param flow > - * Pointer to flow structure. > - */ > -static void > -mlx5_flow_rxq_mark(struct rte_eth_dev *dev, struct rte_flow *flow) > -{ > - struct priv *priv = dev->data->dev_private; > - const uint32_t mask = MLX5_FLOW_MOD_FLAG | MLX5_FLOW_MOD_MARK; > - uint32_t i; > - > - if (!(flow->modifier & mask)) > - return; > - for (i = 0; i != flow->rss.queue_num; ++i) > - (*priv->rxqs)[(*flow->queue)[i]]->mark = 1; > -} > - > /** > * Validate a flow supported by the NIC. > * > @@ -1978,6 +1965,88 @@ mlx5_flow_fate_apply(struct rte_eth_dev *dev, struct rte_flow *flow, > return -rte_errno; > } > > +/** > + * Set the Tunnel packet type and the Mark in the Rx queue. > + * > + * @param dev > + * Pointer to Ethernet device. > + * @param idx > + * Rx queue index. > + */ > +static void > +mlx5_flow_rxq(struct rte_eth_dev *dev, uint16_t idx) > +{ > + struct priv *priv = dev->data->dev_private; > + struct rte_flow *flow; > + const uint32_t mark_m = MLX5_FLOW_MOD_FLAG | MLX5_FLOW_MOD_MARK; > + uint32_t ptype = 0; > + uint32_t mark = 0; > + > + TAILQ_FOREACH(flow, &priv->flows, next) { > + unsigned int i; > + > + for (i = 0; i != flow->rss.queue_num; ++i) { > + if ((*flow->queue)[i] == idx) { > + mark |= !!(flow->modifier & mark_m); > + if (ptype == 0) > + ptype = flow->ptype; > + else if (ptype != flow->ptype) I know someone else named it but flow->ptype sounds ambiguous. flow->tunnel_ptype? > + ptype = (uint32_t)-1; > + break; > + } > + } > + } > + if (ptype == (uint32_t)-1) > + ptype = 0; > + (*priv->rxqs)[idx]->tunnel = ptype; > + (*priv->rxqs)[idx]->mark = mark; > +} > + > +/** > + * Set the tunnel packet type and Mark in the Rx queues, if several packet > + * types are possible, the information in the Rx queue is just cleared. > + * Mark is not impacted by this case. > + * > + * @param dev > + * Pointer to Ethernet device. > + */ > +static void > +mlx5_flow_rxqs(struct rte_eth_dev *dev) Can you rename mlx5_flow_rxqs() and mlx5_flow_rxq()? Not clear about what each func does from its name. Maybe, mlx5_flow_set_rxq_flag()? > +{ > + struct priv *priv = dev->data->dev_private; > + unsigned int idx; > + unsigned int n; > + > + for (idx = 0, n = 0; n != priv->rxqs_n; ++idx) { > + if (!(*priv->rxqs)[idx]) > + continue; > + mlx5_flow_rxq(dev, idx); > + n++; > + } > +} > + > +/** > + * Clear tunnel ptypes and Mark in Rx queues. > + * > + * @param dev > + * Pointer to Ethernet device. > + */ > +static void > +mlx5_flow_rxqs_clear(struct rte_eth_dev *dev) This one is stranger. Sounds like it is clearing Rx queues. > +{ > + struct priv *priv = dev->data->dev_private; > + unsigned int idx; > + unsigned int n; > + > + for (idx = 0, n = 0; n != priv->rxqs_n; ++idx) { > + if (!(*priv->rxqs)[idx]) > + continue; > + (*priv->rxqs)[idx]->tunnel = 0; > + (*priv->rxqs)[idx]->mark = 0; > + n++; > + } > +} > + > /** > * Create a flow. > * > @@ -2039,8 +2108,8 @@ mlx5_flow_list_create(struct rte_eth_dev *dev, > return NULL; > } > } > - mlx5_flow_rxq_mark(dev, flow); > TAILQ_INSERT_TAIL(list, flow, next); > + mlx5_flow_rxqs(dev); > return flow; > } > > @@ -2144,19 +2213,11 @@ mlx5_flow_list_flush(struct rte_eth_dev *dev, struct mlx5_flows *list) > void > mlx5_flow_stop(struct rte_eth_dev *dev, struct mlx5_flows *list) > { > - struct priv *priv = dev->data->dev_private; > struct rte_flow *flow; > - unsigned int i; > - unsigned int idx; > > TAILQ_FOREACH_REVERSE(flow, list, mlx5_flows, next) > mlx5_flow_fate_remove(dev, flow); > - for (idx = 0, i = 0; idx != priv->rxqs_n; ++i) { > - if (!(*priv->rxqs)[idx]) > - continue; > - (*priv->rxqs)[idx]->mark = 0; > - ++idx; > - } > + mlx5_flow_rxqs_clear(dev); > } > > /** > @@ -2181,8 +2242,8 @@ mlx5_flow_start(struct rte_eth_dev *dev, struct mlx5_flows *list) > ret = mlx5_flow_fate_apply(dev, flow, &error); > if (ret < 0) > goto error; > - mlx5_flow_rxq_mark(dev, flow); > } > + mlx5_flow_rxqs(dev); > return 0; > error: > ret = rte_errno; /* Save rte_errno before cleanup. */ > diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h > index bb67c32a6..57504ceb2 100644 > --- a/drivers/net/mlx5/mlx5_rxtx.h > +++ b/drivers/net/mlx5/mlx5_rxtx.h > @@ -136,7 +136,6 @@ struct mlx5_rxq_ctrl { > struct priv *priv; /* Back pointer to private data. */ > struct mlx5_rxq_data rxq; /* Data path structure. */ > unsigned int socket; /* CPU socket ID for allocations. */ > - uint32_t tunnel_types[16]; /* Tunnel type counter. */ > unsigned int irq:1; /* Whether IRQ is enabled. */ > uint16_t idx; /* Queue index. */ > }; > -- > 2.18.0 >