From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130041.outbound.protection.outlook.com [40.107.13.41]) by dpdk.org (Postfix) with ESMTP id EA7151B90D for ; Thu, 18 Apr 2019 02:38:41 +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=wnUhCkB9kMZxUDrlL7EeOIHrsZ+KevQQo9iqYGIBI3w=; b=VCOV1M4WeZD+9a27AmYOedSIPuhp2PyCYAkJdptcONwRbIH6e6IiE7jop8Z7MPy0Yn+JTOtCUcn4bIWUwapmR4KzxoRLabl2F/l93ZoAYrUujkSSExKzQ+N5OhBv+4zQvxkPssp6NqEFHOO4cuTxJQtii4xfiWTKMHxEeAtgny8= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3961.eurprd05.prod.outlook.com (52.134.70.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.18; Thu, 18 Apr 2019 00:38:40 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::6072:43be:7c2d:103a]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::6072:43be:7c2d:103a%3]) with mapi id 15.20.1813.011; Thu, 18 Apr 2019 00:38:40 +0000 From: Yongseok Koh To: Ori Kam CC: Shahaf Shuler , Matan Azrad , Slava Ovsiienko , Moti Haimovsky , "dev@dpdk.org" Thread-Topic: [PATCH 6/9] net/mlx5: add transfer attribute to matcher Thread-Index: AQHU8wbmKN3Wtt63SUWyFGkW0XXEBqZBGAqA Date: Thu, 18 Apr 2019 00:38:40 +0000 Message-ID: <20190418003831.GC31179@mtidpdk.mti.labs.mlnx> References: <1555276357-4892-1-git-send-email-orika@mellanox.com> <1555276357-4892-7-git-send-email-orika@mellanox.com> In-Reply-To: <1555276357-4892-7-git-send-email-orika@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR05CA0015.namprd05.prod.outlook.com (2603:10b6:a03:c0::28) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4af027ce-3dc3-473f-7d98-08d6c39633a2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600141)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DB3PR0502MB3961; x-ms-traffictypediagnostic: DB3PR0502MB3961: x-microsoft-antispam-prvs: x-forefront-prvs: 0011612A55 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(346002)(376002)(366004)(39860400002)(199004)(189003)(14454004)(486006)(478600001)(81166006)(6486002)(25786009)(14444005)(7736002)(54906003)(229853002)(305945005)(256004)(4326008)(6116002)(86362001)(8676002)(52116002)(6862004)(316002)(6246003)(3846002)(33656002)(97736004)(99286004)(6636002)(186003)(102836004)(1076003)(2906002)(8936002)(68736007)(5660300002)(446003)(6512007)(9686003)(26005)(66066001)(476003)(76176011)(386003)(6506007)(11346002)(81156014)(6436002)(71200400001)(53936002)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3961; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: KrOKpKnnwt/1RW5ntO5rdCHpkMnMjm6vp1TmVAFRg53MJILCGnKEnNOxmlQgpA0fu0hF8uaj/AtnDyxIHgzy8Epvmef6I+JIE+09kTLG5imESTEs/uau0/6zJ/dbqw40RXdO5RYVmLQqvJ5ZODwlxj8pF3TTKL7dRCxroiXvlEyEDjtL1KDDo0MMOatIjTFZA8R9xhrtulxN9FFSorzK76GPts0mFPjCRPXuhPX7LEpcSqUT2OlflExROedjuOJaAPeL4dLBS0ebcG8xzPerGJ6etBve1Q8zj4P2LrFT4c6g4EE1gnOI45GxC94yPVtY+z6uxcp6tS5mXuLuOEh+G60jw1FM38lRsOJhK7+7RTa5/tws+dpLgfulE2S2+teYwyAVMivca2l5uiuBVgw5wGZaxn6YH/CCPHi+OCsM1j0= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4af027ce-3dc3-473f-7d98-08d6c39633a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2019 00:38:40.1073 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3961 Subject: Re: [dpdk-dev] [PATCH 6/9] net/mlx5: add transfer attribute to matcher 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: Thu, 18 Apr 2019 00:38:42 -0000 On Sun, Apr 14, 2019 at 09:12:34PM +0000, Ori Kam wrote: > In current implementation the DV steering supported only NIC steering. > This commit adds the transfer attribute in order to create a matcher > on the FDB tabels. >=20 > Signed-off-by: Ori Kam > --- > drivers/net/mlx5/mlx5_flow.c | 1 + > drivers/net/mlx5/mlx5_flow.h | 2 ++ > drivers/net/mlx5/mlx5_flow_dv.c | 22 ++++++++++++++++++---- > 3 files changed, 21 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 83abc14..9fd5096 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -2095,6 +2095,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_d= ev *dev, int32_t priority, > flow =3D rte_calloc(__func__, 1, flow_size, 0); > flow->drv_type =3D flow_get_drv_type(dev, attr); > flow->ingress =3D attr->ingress; > + flow->transfer =3D attr->transfer; > assert(flow->drv_type > MLX5_FLOW_TYPE_MIN && > flow->drv_type < MLX5_FLOW_TYPE_MAX); > flow->queue =3D (void *)(flow + 1); > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index 85954c2..9d72024 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -210,6 +210,7 @@ struct mlx5_flow_dv_matcher { > uint16_t crc; /**< CRC of key. */ > uint16_t priority; /**< Priority of matcher. */ > uint8_t egress; /**< Egress matcher. */ > + uint8_t transfer; /**< 1 if the flow is E-Switch flow. */ egress and transfer can be bit fields? Those come from rte_flow_attr but I = don't understand why it needs to be uint8_t individually. > uint32_t group; /**< The matcher group. */ > struct mlx5_flow_dv_match_params mask; /**< Matcher mask. */ > }; > @@ -382,6 +383,7 @@ struct rte_flow { > struct mlx5_fdir *fdir; /**< Pointer to associated FDIR if any. */ > uint8_t ingress; /**< 1 if the flow is ingress. */ > uint32_t group; /**< The group index. */ > + uint8_t transfer; /**< 1 if the flow is E-Switch flow. */ Bit-field? Just out of curiosity, flow->ingress vs matcher->egress, why? rte_flow_attr has both ingress and egress because a flow can be applied for= both directions. But, in mlx5 PMD, it looks exclusive - !ingress =3D=3D egress v= ice versa. Then, I don't understand why one has ingress and the other one has egress even wasting bits. > }; > =20 > typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev, > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow= _dv.c > index e66ee34..b4ca9ca 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -3203,6 +3203,8 @@ struct field_modify_info modify_tcp[] =3D { > * Table id to use. > * @param[in] egress > * Direction of the table. > + * @param[in] transfer > + * E-Switch or Nic flow.. Redundant periods (..) Nic -> NIC Thanks, Yongseok > * @param[out] error > * pointer to error structure. > * > @@ -3212,6 +3214,7 @@ struct field_modify_info modify_tcp[] =3D { > static struct mlx5_flow_tbl_resource * > flow_dv_tbl_resource_get(struct rte_eth_dev *dev, > uint32_t table_id, uint8_t egress, > + uint8_t transfer, > struct rte_flow_error *error) > { > struct mlx5_priv *priv =3D dev->data->dev_private; > @@ -3219,7 +3222,12 @@ struct field_modify_info modify_tcp[] =3D { > struct mlx5_flow_tbl_resource *tbl; > =20 > #ifdef HAVE_MLX5DV_DR > - if (egress) { > + if (transfer) { > + tbl =3D &sh->fdb_tbl[table_id]; > + if (!tbl->obj) > + tbl->obj =3D mlx5_glue->dr_create_flow_tbl > + (sh->fdb_ns, table_id); > + } else if (egress) { > tbl =3D &sh->tx_tbl[table_id]; > if (!tbl->obj) > tbl->obj =3D mlx5_glue->dr_create_flow_tbl > @@ -3241,7 +3249,9 @@ struct field_modify_info modify_tcp[] =3D { > #else > (void)error; > (void)tbl; > - if (egress) > + if (transfer) > + return &sh->fdb_tbl[table_id]; > + else if (egress) > return &sh->tx_tbl[table_id]; > else > return &sh->rx_tbl[table_id]; > @@ -3306,6 +3316,7 @@ struct field_modify_info modify_tcp[] =3D { > matcher->priority =3D=3D cache_matcher->priority && > matcher->egress =3D=3D cache_matcher->egress && > matcher->group =3D=3D cache_matcher->group && > + matcher->transfer =3D=3D cache_matcher->transfer && > !memcmp((const void *)matcher->mask.buf, > (const void *)cache_matcher->mask.buf, > cache_matcher->mask.size)) { > @@ -3327,7 +3338,8 @@ struct field_modify_info modify_tcp[] =3D { > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, > "cannot allocate matcher memory"); > tbl =3D flow_dv_tbl_resource_get(dev, matcher->group * MLX5_GROUP_FACTO= R, > - matcher->egress, error); > + matcher->egress, matcher->transfer, > + error); > if (!tbl) { > rte_free(cache_matcher); > return rte_flow_error_set(error, ENOMEM, > @@ -3654,7 +3666,8 @@ struct field_modify_info modify_tcp[] =3D { > jump_data =3D action->conf; > tbl =3D flow_dv_tbl_resource_get(dev, jump_data->group * > MLX5_GROUP_FACTOR, > - attr->egress, error); > + attr->egress, > + attr->transfer, error); > if (!tbl) > return rte_flow_error_set > (error, errno, > @@ -3882,6 +3895,7 @@ struct field_modify_info modify_tcp[] =3D { > matcher.priority); > matcher.egress =3D attr->egress; > matcher.group =3D attr->group; > + matcher.transfer =3D attr->transfer; > if (flow_dv_matcher_register(dev, &matcher, dev_flow, error)) > return -rte_errno; > return 0; > --=20 > 1.8.3.1 >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 06B0FA00E6 for ; Thu, 18 Apr 2019 02:38:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9AE0B1B90E; Thu, 18 Apr 2019 02:38:43 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130041.outbound.protection.outlook.com [40.107.13.41]) by dpdk.org (Postfix) with ESMTP id EA7151B90D for ; Thu, 18 Apr 2019 02:38:41 +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=wnUhCkB9kMZxUDrlL7EeOIHrsZ+KevQQo9iqYGIBI3w=; b=VCOV1M4WeZD+9a27AmYOedSIPuhp2PyCYAkJdptcONwRbIH6e6IiE7jop8Z7MPy0Yn+JTOtCUcn4bIWUwapmR4KzxoRLabl2F/l93ZoAYrUujkSSExKzQ+N5OhBv+4zQvxkPssp6NqEFHOO4cuTxJQtii4xfiWTKMHxEeAtgny8= Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com (52.134.72.27) by DB3PR0502MB3961.eurprd05.prod.outlook.com (52.134.70.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.18; Thu, 18 Apr 2019 00:38:40 +0000 Received: from DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::6072:43be:7c2d:103a]) by DB3PR0502MB3980.eurprd05.prod.outlook.com ([fe80::6072:43be:7c2d:103a%3]) with mapi id 15.20.1813.011; Thu, 18 Apr 2019 00:38:40 +0000 From: Yongseok Koh To: Ori Kam CC: Shahaf Shuler , Matan Azrad , Slava Ovsiienko , Moti Haimovsky , "dev@dpdk.org" Thread-Topic: [PATCH 6/9] net/mlx5: add transfer attribute to matcher Thread-Index: AQHU8wbmKN3Wtt63SUWyFGkW0XXEBqZBGAqA Date: Thu, 18 Apr 2019 00:38:40 +0000 Message-ID: <20190418003831.GC31179@mtidpdk.mti.labs.mlnx> References: <1555276357-4892-1-git-send-email-orika@mellanox.com> <1555276357-4892-7-git-send-email-orika@mellanox.com> In-Reply-To: <1555276357-4892-7-git-send-email-orika@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR05CA0015.namprd05.prod.outlook.com (2603:10b6:a03:c0::28) To DB3PR0502MB3980.eurprd05.prod.outlook.com (2603:10a6:8:10::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [209.116.155.178] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4af027ce-3dc3-473f-7d98-08d6c39633a2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600141)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:DB3PR0502MB3961; x-ms-traffictypediagnostic: DB3PR0502MB3961: x-microsoft-antispam-prvs: x-forefront-prvs: 0011612A55 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(346002)(376002)(366004)(39860400002)(199004)(189003)(14454004)(486006)(478600001)(81166006)(6486002)(25786009)(14444005)(7736002)(54906003)(229853002)(305945005)(256004)(4326008)(6116002)(86362001)(8676002)(52116002)(6862004)(316002)(6246003)(3846002)(33656002)(97736004)(99286004)(6636002)(186003)(102836004)(1076003)(2906002)(8936002)(68736007)(5660300002)(446003)(6512007)(9686003)(26005)(66066001)(476003)(76176011)(386003)(6506007)(11346002)(81156014)(6436002)(71200400001)(53936002)(71190400001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3961; H:DB3PR0502MB3980.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: KrOKpKnnwt/1RW5ntO5rdCHpkMnMjm6vp1TmVAFRg53MJILCGnKEnNOxmlQgpA0fu0hF8uaj/AtnDyxIHgzy8Epvmef6I+JIE+09kTLG5imESTEs/uau0/6zJ/dbqw40RXdO5RYVmLQqvJ5ZODwlxj8pF3TTKL7dRCxroiXvlEyEDjtL1KDDo0MMOatIjTFZA8R9xhrtulxN9FFSorzK76GPts0mFPjCRPXuhPX7LEpcSqUT2OlflExROedjuOJaAPeL4dLBS0ebcG8xzPerGJ6etBve1Q8zj4P2LrFT4c6g4EE1gnOI45GxC94yPVtY+z6uxcp6tS5mXuLuOEh+G60jw1FM38lRsOJhK7+7RTa5/tws+dpLgfulE2S2+teYwyAVMivca2l5uiuBVgw5wGZaxn6YH/CCPHi+OCsM1j0= Content-Type: text/plain; charset="UTF-8" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4af027ce-3dc3-473f-7d98-08d6c39633a2 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Apr 2019 00:38:40.1073 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB3961 Subject: Re: [dpdk-dev] [PATCH 6/9] net/mlx5: add transfer attribute to matcher 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190418003840.r93jNcjKtsSlZLabWGwWIVlPLtkKqOf-n9Om36l2GVI@z> On Sun, Apr 14, 2019 at 09:12:34PM +0000, Ori Kam wrote: > In current implementation the DV steering supported only NIC steering. > This commit adds the transfer attribute in order to create a matcher > on the FDB tabels. >=20 > Signed-off-by: Ori Kam > --- > drivers/net/mlx5/mlx5_flow.c | 1 + > drivers/net/mlx5/mlx5_flow.h | 2 ++ > drivers/net/mlx5/mlx5_flow_dv.c | 22 ++++++++++++++++++---- > 3 files changed, 21 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 83abc14..9fd5096 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -2095,6 +2095,7 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_d= ev *dev, int32_t priority, > flow =3D rte_calloc(__func__, 1, flow_size, 0); > flow->drv_type =3D flow_get_drv_type(dev, attr); > flow->ingress =3D attr->ingress; > + flow->transfer =3D attr->transfer; > assert(flow->drv_type > MLX5_FLOW_TYPE_MIN && > flow->drv_type < MLX5_FLOW_TYPE_MAX); > flow->queue =3D (void *)(flow + 1); > diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h > index 85954c2..9d72024 100644 > --- a/drivers/net/mlx5/mlx5_flow.h > +++ b/drivers/net/mlx5/mlx5_flow.h > @@ -210,6 +210,7 @@ struct mlx5_flow_dv_matcher { > uint16_t crc; /**< CRC of key. */ > uint16_t priority; /**< Priority of matcher. */ > uint8_t egress; /**< Egress matcher. */ > + uint8_t transfer; /**< 1 if the flow is E-Switch flow. */ egress and transfer can be bit fields? Those come from rte_flow_attr but I = don't understand why it needs to be uint8_t individually. > uint32_t group; /**< The matcher group. */ > struct mlx5_flow_dv_match_params mask; /**< Matcher mask. */ > }; > @@ -382,6 +383,7 @@ struct rte_flow { > struct mlx5_fdir *fdir; /**< Pointer to associated FDIR if any. */ > uint8_t ingress; /**< 1 if the flow is ingress. */ > uint32_t group; /**< The group index. */ > + uint8_t transfer; /**< 1 if the flow is E-Switch flow. */ Bit-field? Just out of curiosity, flow->ingress vs matcher->egress, why? rte_flow_attr has both ingress and egress because a flow can be applied for= both directions. But, in mlx5 PMD, it looks exclusive - !ingress =3D=3D egress v= ice versa. Then, I don't understand why one has ingress and the other one has egress even wasting bits. > }; > =20 > typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev, > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow= _dv.c > index e66ee34..b4ca9ca 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -3203,6 +3203,8 @@ struct field_modify_info modify_tcp[] =3D { > * Table id to use. > * @param[in] egress > * Direction of the table. > + * @param[in] transfer > + * E-Switch or Nic flow.. Redundant periods (..) Nic -> NIC Thanks, Yongseok > * @param[out] error > * pointer to error structure. > * > @@ -3212,6 +3214,7 @@ struct field_modify_info modify_tcp[] =3D { > static struct mlx5_flow_tbl_resource * > flow_dv_tbl_resource_get(struct rte_eth_dev *dev, > uint32_t table_id, uint8_t egress, > + uint8_t transfer, > struct rte_flow_error *error) > { > struct mlx5_priv *priv =3D dev->data->dev_private; > @@ -3219,7 +3222,12 @@ struct field_modify_info modify_tcp[] =3D { > struct mlx5_flow_tbl_resource *tbl; > =20 > #ifdef HAVE_MLX5DV_DR > - if (egress) { > + if (transfer) { > + tbl =3D &sh->fdb_tbl[table_id]; > + if (!tbl->obj) > + tbl->obj =3D mlx5_glue->dr_create_flow_tbl > + (sh->fdb_ns, table_id); > + } else if (egress) { > tbl =3D &sh->tx_tbl[table_id]; > if (!tbl->obj) > tbl->obj =3D mlx5_glue->dr_create_flow_tbl > @@ -3241,7 +3249,9 @@ struct field_modify_info modify_tcp[] =3D { > #else > (void)error; > (void)tbl; > - if (egress) > + if (transfer) > + return &sh->fdb_tbl[table_id]; > + else if (egress) > return &sh->tx_tbl[table_id]; > else > return &sh->rx_tbl[table_id]; > @@ -3306,6 +3316,7 @@ struct field_modify_info modify_tcp[] =3D { > matcher->priority =3D=3D cache_matcher->priority && > matcher->egress =3D=3D cache_matcher->egress && > matcher->group =3D=3D cache_matcher->group && > + matcher->transfer =3D=3D cache_matcher->transfer && > !memcmp((const void *)matcher->mask.buf, > (const void *)cache_matcher->mask.buf, > cache_matcher->mask.size)) { > @@ -3327,7 +3338,8 @@ struct field_modify_info modify_tcp[] =3D { > RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, > "cannot allocate matcher memory"); > tbl =3D flow_dv_tbl_resource_get(dev, matcher->group * MLX5_GROUP_FACTO= R, > - matcher->egress, error); > + matcher->egress, matcher->transfer, > + error); > if (!tbl) { > rte_free(cache_matcher); > return rte_flow_error_set(error, ENOMEM, > @@ -3654,7 +3666,8 @@ struct field_modify_info modify_tcp[] =3D { > jump_data =3D action->conf; > tbl =3D flow_dv_tbl_resource_get(dev, jump_data->group * > MLX5_GROUP_FACTOR, > - attr->egress, error); > + attr->egress, > + attr->transfer, error); > if (!tbl) > return rte_flow_error_set > (error, errno, > @@ -3882,6 +3895,7 @@ struct field_modify_info modify_tcp[] =3D { > matcher.priority); > matcher.egress =3D attr->egress; > matcher.group =3D attr->group; > + matcher.transfer =3D attr->transfer; > if (flow_dv_matcher_register(dev, &matcher, dev_flow, error)) > return -rte_errno; > return 0; > --=20 > 1.8.3.1 >=20