Message ID | 20211005171613.2879-1-xhavli56@stud.fit.vutbr.cz (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30FCFA0C4C; Tue, 5 Oct 2021 19:18:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9CFC413FB; Tue, 5 Oct 2021 19:18:21 +0200 (CEST) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by mails.dpdk.org (Postfix) with ESMTP id 382B8413FA for <dev@dpdk.org>; Tue, 5 Oct 2021 19:18:20 +0200 (CEST) Received: from dpdk-test7.liberouter.org (rt-tmc-kou.liberouter.org [195.113.172.126]) (authenticated bits=0) by eva.fit.vutbr.cz (8.16.1/8.16.1) with ESMTPSA id 195HGVss048378 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 5 Oct 2021 19:16:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stud.fit.vutbr.cz; s=studfit; t=1633454203; bh=+KwnI2TpBEiFliBlTfsvugo6Yod15oeEd6Y8eOeuAoY=; h=From:To:Cc:Subject:Date; b=HaBjGFl4ieSYuOes2pj1JK9sVtTD9YBGeA1GyLvwtbm5QcysgOmPfZqBli70R9JTW STM0n/fZ7yt7c96VWfIiKCToPGgpFOlXnsasgLxyS0wqugfXS/5PMzun5J4z2bpOMe xvcYWuhn0c0FV7Am3guDb98wQyZzV+R7FC4LJiRQ= From: Martin Havlik <xhavli56@stud.fit.vutbr.cz> To: xhavli56@stud.fit.vutbr.cz Cc: Jan Viktorin <viktorin@cesnet.cz>, dev@dpdk.org, chas3@att.com, humin29@huawei.com, ferruh.yigit@intel.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, haiyue.wang@intel.com, ivan.ilchenko@oktetlabs.ru, aman.deep.singh@intel.com, kirankn@juniper.net, lirongqing@baidu.com, ajit.khaparde@broadcom.com Date: Tue, 5 Oct 2021 19:16:11 +0200 Message-Id: <20211005171613.2879-1-xhavli56@stud.fit.vutbr.cz> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 0/2] net/bonding: fix dedicated queues flow rule issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
net/bonding: fix dedicated queues flow rule issue
|
|
Message
Havlík Martin
Oct. 5, 2021, 5:16 p.m. UTC
This patchset stems from [1]. Not all PMDs allow RTE flow rule creation before device start. Introduced capability marks the ones that allow it. The capability is then used to fix flow rule creation for dedicated queues in slave devices in bonding. The introduced capa _will need to be set_ for all appropriate PMDs in `rte_eth_dev_info->dev_capa`. That is not pretty, but it holds the semantics of a capability correctly, as opposed to making it a requirement to have the device started before creating flow rules. [1] https://www.mail-archive.com/dev@dpdk.org/msg214840.html Martin Havlik (2): lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START net/bonding: require started device for dedicated queues drivers/net/bonding/rte_eth_bond_pmd.c | 25 +++++++++++++++++++------ lib/ethdev/rte_ethdev.h | 2 ++ 2 files changed, 21 insertions(+), 6 deletions(-)
Comments
On 10/5/2021 6:16 PM, Martin Havlik wrote: > This patchset stems from [1]. > > Not all PMDs allow RTE flow rule creation before device start. > Introduced capability marks the ones that allow it. > The capability is then used to fix flow rule creation for > dedicated queues in slave devices in bonding. > > The introduced capa _will need to be set_ for all appropriate PMDs > in `rte_eth_dev_info->dev_capa`. > That is not pretty, but it holds the semantics of a capability > correctly, as opposed to making it a requirement to have the device > started before creating flow rules. > +Ori & Dmitry. I think right now the method to check if device supports adding flow rules when stopped is run 'rte_flow_create()' when device is stopped and check return value. Can we do similar in the bonding? I am not clear if there is an error to differentiate flow create is failed because device is stopped (or from some other reason). And other option is, what happens if rule is always created after device started? > [1] https://www.mail-archive.com/dev@dpdk.org/msg214840.html > > Martin Havlik (2): > lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START > net/bonding: require started device for dedicated queues > > drivers/net/bonding/rte_eth_bond_pmd.c | 25 +++++++++++++++++++------ > lib/ethdev/rte_ethdev.h | 2 ++ > 2 files changed, 21 insertions(+), 6 deletions(-) >
Dne 2021-10-27 11:55, Ferruh Yigit napsal: > On 10/5/2021 6:16 PM, Martin Havlik wrote: >> This patchset stems from [1]. >> >> Not all PMDs allow RTE flow rule creation before device start. >> Introduced capability marks the ones that allow it. >> The capability is then used to fix flow rule creation for >> dedicated queues in slave devices in bonding. >> >> The introduced capa _will need to be set_ for all appropriate PMDs >> in `rte_eth_dev_info->dev_capa`. >> That is not pretty, but it holds the semantics of a capability >> correctly, as opposed to making it a requirement to have the device >> started before creating flow rules. >> > > +Ori & Dmitry. > > I think right now the method to check if device supports adding flow > rules when stopped is run 'rte_flow_create()' when device is stopped > and check return value. > > Can we do similar in the bonding? It might be a possible solution. The only thing I'm not sure about is that different PMDs may require different flow rule specifications for the rule to be valid, e.g. what pattern and action to set to this tryout flow rule? We would have to make sure the rule can be created on any PMD so failure would mean only one thing - device doesn't support creating flow rules when stopped. Is that possible? Is it already a thing that is used somewhere? > > I am not clear if there is an error to differentiate flow create is > failed because device is stopped (or from some other reason). > > > And other option is, what happens if rule is always created after > device started? That is what I originally proposed [here], but it didn't gain much favour so the idea got lost in the discussion. [here] https://mails.dpdk.org/archives/dev/2021-June/212210.html > >> [1] https://www.mail-archive.com/dev@dpdk.org/msg214840.html >> >> Martin Havlik (2): >> lib/ethdev: introduce RTE_ETH_DEV_CAPA_FLOW_CREATE_BEFORE_START >> net/bonding: require started device for dedicated queues >> >> drivers/net/bonding/rte_eth_bond_pmd.c | 25 >> +++++++++++++++++++------ >> lib/ethdev/rte_ethdev.h | 2 ++ >> 2 files changed, 21 insertions(+), 6 deletions(-) >>