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 4FA98A0613 for ; Thu, 26 Sep 2019 11:31:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 697451BE86; Thu, 26 Sep 2019 11:31:51 +0200 (CEST) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40063.outbound.protection.outlook.com [40.107.4.63]) by dpdk.org (Postfix) with ESMTP id D04741BE51 for ; Thu, 26 Sep 2019 11:31:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m4S+aWYo134AVrDdwDv0kRiB2sWgw5ydN3OYWhpHZcQqGY53WjHnT/tST8TQj07arJz+omsWGpeyXZsOtxF9gQ1eYiAw8ipbzwDRER67LHunRboorJHzMh2is2uxq9KK9tMzu4h7jrqf1oCh6BAr1VrBsF/B3TD3nixRAn9Y+IplsAPFu5H6K+LGvcYTlfznhvZr/c5pEbzwY56A+XYVoCcdQJHPtAhgmoVeAvAcNExBY4OScrpaJAKphOKmja0neWTk0CaWC6t2YmbBM3ihXBYjUOGxOVK/nAxlYs93t7fBNWONZBTZgfe9rkXePU/JwwulryIHh9u71qj+6d5/EA== 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=nJnDiiJzl597a7mvpyHcWkBvHy/RjQ23L2rEqvNNnWU=; b=M7cjJhUOWp+NYSkPiPTRVXWtyZkCHkQCK0xU60gMjQ6NvyowRavNV5N/hpgGxRDp2JbfzLSHyC0qbbHASg2+EWszVaaARkVsYGsGrCBclpBQL8xecGLY6PjYjtfJGf+a55FLjQBKEyhZR38RApQ9DFE7TPeD7u27YxCtVKv9bclAqona5Smz/gri31+ZSSUneWnX5tAPq0n3SbqsUKat3SLaBrrx2wjqToGROCPRlgfuIg2QhovieBzsCHwEEYSammmj7pPJsRU1EB20y6sBAIjYLvHXhpson7pWW6BNzM9C5fZq+6J2eXbYf5ytPxdAXztonB1nzX79O/FTAuz2rw== 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=nJnDiiJzl597a7mvpyHcWkBvHy/RjQ23L2rEqvNNnWU=; b=sQ6IaydAMNfsD5JYZJBRuKwxJcF5XmWJtr5OwZhbbJDxzvx0mMDaJbVmB0CnfRYP9Bne+uKlKvSQiDOG5+0ePlTn5T2y2OeV9eStKQad8YugQvldkOgoXhUxEF6vWw7nR9KX3tF2Tiuixl1imnOgQAGMzypWYi3rKsGtfh+kuQY= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3281.eurprd05.prod.outlook.com (10.171.188.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.15; Thu, 26 Sep 2019 09:31:48 +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:31:48 +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 02/13] net/mlx5: query hca hairpin capabilities Thread-Index: AQHVdDPY3XYCv6LIeUuLaWq6TjpNt6c9sdxg Date: Thu, 26 Sep 2019 09:31:48 +0000 Message-ID: References: <1569479349-36962-1-git-send-email-orika@mellanox.com> <1569479349-36962-3-git-send-email-orika@mellanox.com> In-Reply-To: <1569479349-36962-3-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: 865241d3-9719-45c3-17d4-08d742645b10 x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: AM4PR05MB3281:|AM4PR05MB3281: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:108; x-forefront-prvs: 0172F0EF77 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(396003)(346002)(376002)(366004)(13464003)(199004)(189003)(71190400001)(71200400001)(33656002)(316002)(6246003)(7696005)(6436002)(76176011)(6506007)(53546011)(99286004)(110136005)(8936002)(8676002)(3846002)(9686003)(476003)(6116002)(256004)(486006)(102836004)(229853002)(2906002)(54906003)(26005)(81156014)(81166006)(11346002)(66446008)(66946007)(66476007)(66556008)(64756008)(76116006)(6636002)(55016002)(186003)(74316002)(66066001)(5660300002)(25786009)(52536014)(478600001)(446003)(305945005)(7736002)(4326008)(14454004)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3281; 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: BCL:0; x-microsoft-antispam-message-info: 0YQb4r2lG9Xcq58sUHhquxgg+msJGICaPhtGZh7sxjJpXZeJHNkcsNFBOEvBWKCHrnM74csVU4rGa8vWY0/UnAb2bmf85Gh2WvPj19eckOHCoOxNuZ1919Y7eOfIYEv1a6/+SbAYcbmnsE0QvG7dm8r3guWfXmivr6FB4hAGCzueq2qsj/6LrcQQaKe1Pmea67QQjYoqgyyJ+tmCVY76ZBNQXnBtL27Jdn4Y5o8eMIPNWdM9hlqbjbWewoE4Dq/Nr/gHGe79R12DmNylvV1RPt+OwDpnAE29n3bp+AyPxxDtyUi079D5QuvaRVU+FaO5XxswE21jWKcx8LgIjhwH7aEQMyo13zXzoKNeZBdmsmQuxsJteI7KY/uD0vjtHcvnzATyC7LqMmBgFfb35WzLuADxi0A/0H4cRWaEMarWFZI= 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: 865241d3-9719-45c3-17d4-08d742645b10 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2019 09:31:48.6609 (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: xZUcnEcfBVj5CPtz8Ov/v3URuoRgt6SSJOQOjLc8MGDMFykoAMg7yLBzvMe4GpRGeJ1uXVm+pBLGL2syY4kMnAYNIgIM9BYz6vX2dq1FhGg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3281 Subject: Re: [dpdk-dev] [PATCH 02/13] net/mlx5: query hca hairpin capabilities 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 02/13] net/mlx5: query hca hairpin capabilities >=20 > This commit query and store the hairpin capabilities from the device. >=20 > Those capabilities will be used when creating the hairpin queue. >=20 > Signed-off-by: Ori Kam Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5.h | 4 ++++ > drivers/net/mlx5/mlx5_devx_cmds.c | 7 +++++++ > 2 files changed, 11 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index > d4d2ca8..cd896c8 100644 > --- a/drivers/net/mlx5/mlx5.h > +++ b/drivers/net/mlx5/mlx5.h > @@ -184,6 +184,10 @@ struct mlx5_hca_attr { > uint32_t tunnel_lro_vxlan:1; > uint32_t lro_max_msg_sz_mode:2; > uint32_t > lro_timer_supported_periods[MLX5_LRO_NUM_SUPP_PERIODS]; > + uint32_t hairpin:1; > + uint32_t log_max_hairpin_queues:5; > + uint32_t log_max_hairpin_wq_data_sz:5; > + uint32_t log_max_hairpin_num_packets:5; > }; >=20 > /* Flow list . */ > diff --git a/drivers/net/mlx5/mlx5_devx_cmds.c > b/drivers/net/mlx5/mlx5_devx_cmds.c > index acfe1de..b072c37 100644 > --- a/drivers/net/mlx5/mlx5_devx_cmds.c > +++ b/drivers/net/mlx5/mlx5_devx_cmds.c > @@ -327,6 +327,13 @@ struct mlx5_devx_obj * > attr->flow_counters_dump =3D MLX5_GET(cmd_hca_cap, hcattr, > flow_counters_dump); > attr->eswitch_manager =3D MLX5_GET(cmd_hca_cap, hcattr, > eswitch_manager); > + attr->hairpin =3D MLX5_GET(cmd_hca_cap, hcattr, hairpin); > + attr->log_max_hairpin_queues =3D MLX5_GET(cmd_hca_cap, hcattr, > + log_max_hairpin_queues); > + attr->log_max_hairpin_wq_data_sz =3D MLX5_GET(cmd_hca_cap, > hcattr, > + > log_max_hairpin_wq_data_sz); > + attr->log_max_hairpin_num_packets =3D MLX5_GET > + (cmd_hca_cap, hcattr, log_min_hairpin_wq_data_sz); > attr->eth_net_offloads =3D MLX5_GET(cmd_hca_cap, hcattr, > eth_net_offloads); > attr->eth_virt =3D MLX5_GET(cmd_hca_cap, hcattr, eth_virt); > -- > 1.8.3.1