From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E698BA0613 for ; Thu, 26 Sep 2019 11:33:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 373761BF75; Thu, 26 Sep 2019 11:33:28 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70040.outbound.protection.outlook.com [40.107.7.40]) by dpdk.org (Postfix) with ESMTP id F0EB61BF06 for ; Thu, 26 Sep 2019 11:33:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N70BDPtM+oCyKVYK3fI9AbLyWDCTeNGNaTbRQF2VKOZsPBHmqGFJ0+xi0rk8IPE3I2yCERWomToOB02kBzoH7asN7lsDBe/2rIK5/Q0Xp2BNbYDUKxAHaTRdFl6Tp7F0Fwc331ef7m7pe4TKz0rsuzj9c3d9M86gelSuRsHHKoc2ZjQs1cun7AihYgbS9ZTc6d9uLJsI2XE8AC23UO5XbFcjG0OzEFkMmqUvqJQPaG8YlCczCJPWTGrNLocWWpONYGga/VIu356qakw7I/06uWUmxK2Oh5SD7j7+iQd9yuif1FGrbl3f+eVGr/5qBZUlFHT3PuCo2ke3Zn8MyDWR+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t5YqMAjgU858jaa9Z/Pyy++gRh5rW42vfsCR7dGtN/o=; b=Oljq0Hgeq+WugwqJMt/ujmGK5tkdAWVmNJwHxkzbMcWVnauVoZwbrP2ObdOUBrqzjtaGopPUmeqPEdrpmSmlmRK7AlV8y2aXTw95HKtb/SlmnIBHKXseZNcmioXfNJ7gWBBJc4iQqqsy9xexOWRlUrpuWuqCNyQPBSRj3Zy7ctw7eOvQtzxTCxGSzvvcNbi1r6zISVvRu2uURS67x9MHNpxSi3x7vQhh911KsXfo5zSMeEE1Ssw2PBQS8O26WxErojQlZ97LIhzpvBmud0GqVku/2dd7n1see2LcSXXxvMxOjK1NP8NYMz4z14GeJadeYo70+mbm66zdygVZyM5X8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t5YqMAjgU858jaa9Z/Pyy++gRh5rW42vfsCR7dGtN/o=; b=NYKoSrrIl9szqNCqED1+MphmktPeWRQSPWVWSYf4Q4GLFJp1d902uHkaYHkjXZqN6EHDvZ23EaH2pRMgjSa6v0RsgCiKoYGcmxKWUnnN8MKG5dwOCiD1QfVDxrTQFpSsIl0BMII3eTYtSbnXs1Bz6yvw66GBYzhEJejrHZtan4s= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3474.eurprd05.prod.outlook.com (10.171.186.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.20; Thu, 26 Sep 2019 09:33:26 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::da9:65ba:1323:a39b]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::da9:65ba:1323:a39b%7]) with mapi id 15.20.2305.017; Thu, 26 Sep 2019 09:33:26 +0000 From: Slava Ovsiienko To: Ori Kam , Matan Azrad , Shahaf Shuler CC: "dev@dpdk.org" , Ori Kam , "jingjing.wu@intel.com" , "stephen@networkplumber.org" Thread-Topic: [PATCH 08/13] net/mlx5: add support for hairpin hrxq Thread-Index: AQHVdDPmL+u1vfBr8EWn73vqRjUGJac9snTQ Date: Thu, 26 Sep 2019 09:33:25 +0000 Message-ID: References: <1569479349-36962-1-git-send-email-orika@mellanox.com> <1569479349-36962-9-git-send-email-orika@mellanox.com> In-Reply-To: <1569479349-36962-9-git-send-email-orika@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=viacheslavo@mellanox.com; x-originating-ip: [95.67.35.250] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3fd32d19-6d8c-4524-b589-08d742649516 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM4PR05MB3474; x-ms-traffictypediagnostic: AM4PR05MB3474:|AM4PR05MB3474: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0172F0EF77 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(396003)(366004)(376002)(136003)(346002)(13464003)(199004)(189003)(6506007)(26005)(76116006)(110136005)(54906003)(66946007)(14454004)(316002)(33656002)(66476007)(2906002)(64756008)(66446008)(66556008)(4326008)(6246003)(446003)(486006)(74316002)(6116002)(3846002)(256004)(25786009)(476003)(11346002)(6636002)(52536014)(5660300002)(86362001)(71200400001)(71190400001)(478600001)(8936002)(66066001)(81156014)(81166006)(55016002)(6436002)(9686003)(53546011)(99286004)(305945005)(7696005)(8676002)(102836004)(229853002)(186003)(7736002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3474; H:AM4PR05MB3265.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: u3IG/EbD+uflYG8Z0ube7ermOlwLJLd4F46Sfndo04QlX0Vyd2Hz4ybGKOEzqq6xbN7a/SaiYiSvm4u44vwf2aCTPk3eNdTV6KQfSJWZ1HuMfqmM0oLv+h/pq03JbB14OLFkSUB0uIY6OGi3QQa9WmO37saZluf5N+dr2YqSYA5DRoYrQjxT266Uq0YxgZDW0Ew4mE+3AlindXA72D4HqeaZl0j9NnAaxnQj6bYb+8ssIhwHZ79E1vqjxGqtDwnYVGmtQKYD3untRUgkez2xkxDhkEohKF1rPnUq0O0Fn5MMf/NLv/BQlBWefwjG8Of83zrSbilGKSgEMbaJ/V5SdBS8bSmQEzZrRt4FNa/J//+T2yOi7aUOweXWztoSk5NunUaWdgovPkZmHUo1kDWzvtcmhW0+MLGUh2J6HLE7oq8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fd32d19-6d8c-4524-b589-08d742649516 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2019 09:33:25.6773 (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-CrossTenant-userprincipalname: yxj2PO0uuEU/E0j6M7NRRJILTEG/Z09o4ztRXjjM3h4jEnk45VVqIiTMZZ3nnTxSqUP5zfC1r/b4LRgaYbgLEW1i31dN4ljwSEIPgCOWfuc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3474 Subject: Re: [dpdk-dev] [PATCH 08/13] net/mlx5: add support for hairpin hrxq 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" > -----Original Message----- > From: Ori Kam > Sent: Thursday, September 26, 2019 9:29 > To: Matan Azrad ; Shahaf Shuler > ; Slava Ovsiienko > Cc: dev@dpdk.org; Ori Kam ; jingjing.wu@intel.com; > stephen@networkplumber.org > Subject: [PATCH 08/13] net/mlx5: add support for hairpin hrxq >=20 > The hairpin hrxq is based on the DevX hrxq but uses different pd. >=20 > Signed-off-by: Ori Kam Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_rxq.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c in= dex > a673da9..bf39112 100644 > --- a/drivers/net/mlx5/mlx5_rxq.c > +++ b/drivers/net/mlx5/mlx5_rxq.c > @@ -2344,13 +2344,13 @@ struct mlx5_hrxq * > struct mlx5_ind_table_obj *ind_tbl; > int err; > struct mlx5_devx_obj *tir =3D NULL; > + struct mlx5_rxq_data *rxq_data =3D (*priv->rxqs)[queues[0]]; > + struct mlx5_rxq_ctrl *rxq_ctrl =3D > + container_of(rxq_data, struct mlx5_rxq_ctrl, rxq); >=20 > queues_n =3D hash_fields ? queues_n : 1; > ind_tbl =3D mlx5_ind_table_obj_get(dev, queues, queues_n); > if (!ind_tbl) { > - struct mlx5_rxq_data *rxq_data =3D (*priv->rxqs)[queues[0]]; > - struct mlx5_rxq_ctrl *rxq_ctrl =3D > - container_of(rxq_data, struct mlx5_rxq_ctrl, rxq); > enum mlx5_ind_tbl_type type; >=20 > type =3D rxq_ctrl->obj->type =3D=3D MLX5_RXQ_OBJ_TYPE_IBV ? > @@ -2446,7 +2446,10 @@ struct mlx5_hrxq * > tir_attr.rx_hash_fn =3D MLX5_RX_HASH_FN_TOEPLITZ; > memcpy(&tir_attr.rx_hash_field_selector_outer, > &hash_fields, > sizeof(uint64_t)); > - tir_attr.transport_domain =3D priv->sh->tdn; > + if (rxq_ctrl->obj->type =3D=3D > MLX5_RXQ_OBJ_TYPE_DEVX_HAIRPIN) > + tir_attr.transport_domain =3D priv->sh->td->id; > + else > + tir_attr.transport_domain =3D priv->sh->tdn; > memcpy(tir_attr.rx_hash_toeplitz_key, rss_key, rss_key_len); > tir_attr.indirect_table =3D ind_tbl->rqt->id; > if (dev->data->dev_conf.lpbk_mode) > -- > 1.8.3.1