From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150058.outbound.protection.outlook.com [40.107.15.58]) by dpdk.org (Postfix) with ESMTP id 4BD195424 for ; Thu, 3 Jan 2019 09:29:10 +0100 (CET) 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=OgD+WEo/T6o1BhiDD4dlNNG5lCXL5TQAs2s3vAfWE10=; b=s/UKz/VHD9nPa7RAdvYsJIYjSpTCw40IhmmJE5/n8uF4Con/n8zdmU0FH9lX6rb17Ihvlevs77cM2+zle+0CcxRZ163WazBYKkfpirSdL9h4MN5Zqy2d6UxqLnZJII4She9Fz9A2yy1kwHo0P/3ljNOE+4OA4mIbIuqAW3ikz54= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4299.eurprd05.prod.outlook.com (52.134.108.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1471.20; Thu, 3 Jan 2019 08:29:07 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::b0a0:72a4:7547:1c3c]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::b0a0:72a4:7547:1c3c%4]) with mapi id 15.20.1471.019; Thu, 3 Jan 2019 08:29:07 +0000 From: Shahaf Shuler To: Mordechay Haimovsky , "dev@dpdk.org" CC: Mordechay Haimovsky Thread-Topic: [PATCH v3 3/3] net/mlx5: support flow counters using devx Thread-Index: AQHUon+pBfvt963tMUmxI+fQct85mKWdN2BA Date: Thu, 3 Jan 2019 08:29:07 +0000 Message-ID: References: <1545949196-3355-4-git-send-email-motih@mellanox.com> <1546422185-30813-4-git-send-email-motih@mellanox.com> In-Reply-To: <1546422185-30813-4-git-send-email-motih@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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4299; 6:P3eW0NgRBTj+R/PL7aMdr7NAKeVYXXiMD+3/Wf1Hg7G7K2xFVrvGU3Mz1dQrwD9+pk0r+keuDVLgJKFV7u0vn9OZlvP5fOeDop931uB3JkQhyFKJd/5m4ivoFcTR9FxXHxDEdve1YVVc00E5x8T3Iy/gK19j5tdz7DxmYIqCNhTSdf4xQweEUgABA9y4MDO0ZAAAhkM7tPy6ThC+RxvkRfiPJJCdN0qudGtpRHuCt1USPZwlK0CPLeWRMbjvK3k1vHlOLKHNdIJ6b0/gmI4t9LWLhyNQvgGz6UCtuEIe/6+rf7kJrqAIM9l2nMZmQSGWjzdsJ+/MuHx0WXFfq4EW0F/XUQ+cQbL42rTNnH0hfCNV0JvmWm0y+bkgJqLf5zKYOAR01tVvolRBCVafio58/XkhEIM+1BrXPSVh90PKWMQBBkSzpnlR8cbx7EY2RF/onnM+u9uTuAtYorytW4FdqA==; 5:j4qjRmBIHpFc3/OljXcxUehyo6z3MBxCnh9ZyNYaAZyRJmtwS4G0J+3XrxKxaHMsC46krxzmGL8xQ56aeWxesr99o9k1lGbtJypDPs/OcELs/fCdUnW9jXZg80HGO9QlRaWlZ7zL+/IXCGf+eW1X8N3mEBz8uuZgZmDpZDt2MEQ=; 7:LhsDJPkC3hPP6CFJlS4brF3xqwiohfakJDEBIUXlO1zU3y3vPhlO96dNNkKUgkrFDbh5jyIGGptyZ7nNOzuR/d9tKtwhcWEi5HGlxpA5F8s8HyhU2AeHuXQHK+ZkVEFu7m7YU2dGXYXPO5ib1ev1eg== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: de57b5c0-e2d1-4286-8ea6-08d67155873b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4299; x-ms-traffictypediagnostic: DB7PR05MB4299: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(93006095)(93001095)(3231475)(944501520)(52105112)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:DB7PR05MB4299; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4299; x-forefront-prvs: 0906E83A25 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(136003)(346002)(39860400002)(396003)(43544003)(189003)(199004)(6246003)(53936002)(316002)(446003)(3846002)(99286004)(25786009)(76176011)(81156014)(8676002)(6116002)(11346002)(105586002)(106356001)(68736007)(6436002)(7736002)(5660300001)(74316002)(107886003)(86362001)(476003)(9686003)(71190400001)(2501003)(486006)(33656002)(97736004)(66066001)(71200400001)(110136005)(6506007)(2906002)(26005)(8936002)(14454004)(4326008)(7696005)(81166006)(256004)(229853002)(478600001)(186003)(14444005)(305945005)(55016002)(102836004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4299; H:DB7PR05MB4426.eurprd05.prod.outlook.com; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: GwXk9ZN/R5eVJD20sfvnT++UpVKxoqInTqN50ZDwvTFQIaXZnIa+9HTvW02Foxf9WjSlpO0B/P7YkwaCa5OLXIcuQ81qjQ2EYh8z4A4GSZiN/JEpc2hHDE5YWpexN07X6ZEzqjoWjOQwfqofM7V+cN5SrNKC6BpqRAM4mPBaFuyGuZohnDo0qd3NPDI5hacgSd68YpEaSsvo1Aqr8vacOvf19yUrd3T/dxONDutzG+RutS2bLP0WtaM42w/U+MCxu/5Afz+DeBa2Ghze8VecVRilPs4ZUg34R8Sy/cpYEHGwYXKUEvZwMJyh1TCtT8eT spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: de57b5c0-e2d1-4286-8ea6-08d67155873b X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jan 2019 08:29:07.3469 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4299 Subject: Re: [dpdk-dev] [PATCH v3 3/3] net/mlx5: support flow counters using devx 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, 03 Jan 2019 08:29:10 -0000 Moti, Wednesday, January 2, 2019 11:43 AM, Mordechay Haimovsky: > Subject: [dpdk-dev] [PATCH v3 3/3] net/mlx5: support flow counters using = devx >=20 > This commit adds counters support when creating flows via direct verbs. T= he > implementation uses devx interface in order to create query and delete th= e > counters. > This support requires MLNX_OFED_LINUX-4.5-0.1.0.1 installation. >=20 > Signed-off-by: Moti Haimovsky > --- > v2: > * Modifications according to code review, > See message Id: 1545748697-3385-4-git-send-email-motih@mellanox.com > v3: > * Modified calls to devx routins to be done through the glue interface. > See message Id: 1545949196-3355-4-git-send-email-motih@mellanox.com > --- [...] > @@ -2789,6 +2903,37 @@ struct field_modify_info modify_tcp[] =3D { > flow->rss.level =3D rss->level; > action_flags |=3D MLX5_FLOW_ACTION_RSS; > break; > + case RTE_FLOW_ACTION_TYPE_COUNT: > + if (!priv->config.devx) { > + rte_errno =3D ENOTSUP; > + goto cnt_err; > + } > + flow->counter =3D > + flow_dv_counter_new(dev, > + count->shared, count->id); > + if (flow->counter =3D=3D NULL) > + goto cnt_err; > + dev_flow->dv.actions[actions_n].type =3D > + > MLX5DV_FLOW_ACTION_COUNTER_DEVX; Am having compilation issue here w/ old rdma-core where this feature is not= defined.=20 Please take care, and add my acked-by on the next version.=20 > + dev_flow->dv.actions[actions_n].obj =3D > + flow->counter->dcs->obj; > + action_flags |=3D MLX5_FLOW_ACTION_COUNT; > + ++actions_n; > + break; > +cnt_err: > + if (rte_errno =3D=3D ENOTSUP) > + return rte_flow_error_set > + (error, ENOTSUP,