From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8F8CA054F; Wed, 17 Mar 2021 01:32:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B41F40689; Wed, 17 Mar 2021 01:32:32 +0100 (CET) Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700060.outbound.protection.outlook.com [40.107.70.60]) by mails.dpdk.org (Postfix) with ESMTP id 078EB40040 for ; Wed, 17 Mar 2021 01:32:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YtCHaTRm+sb+7LEJTBV7cwDnhHIEu2b0mN7dQa5DoiIgBXzXxGkhQYDBHWlFwcM2UZ1m7Op09PLTpRuD7pw30wYOwf/Kc2IedeKfDDxepKLGUV+Ch7F5zAMzxJC4ceoUo4G8+VyU/jAI9r4RZI2NHeOIma4OcAsEK6gC/Bhr0wg7qIeSVshYgHSJh2Uu4kuIAh05xCqcnisU30WoysFsiykFGHqmpRF6EQ8gjSt6uAKm8vjeMmL/X19i6zJMHT00yo9h7yffrXMMp6rHedZrL4PYW6fCu4aWLr4NPm6S26k6TDUWkI7UFV7Yw48vNSEOWnqQRsmCcl9qDywXnEL2Ag== 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=+I7WJuaKo3cX/b6lE3O4ANGHkMn045Qk3yK0m7+9N+4=; b=gB/ICRkX/Y8ypnB/u4rYVKyxtxz5/cMMS3XQyCStNY0rPvbhNbCvCEvabC/Y8iHDYenuASi1t9CEVDeW17mCPQI2X2gSMJk61dKhnJL1E8QMBMhhbcpKo41+x8psuwht1zLi1Gd6d06c6hCjjGdsTxuI42ckgyvbF8wf2/vo7UM0cN7t+7fEGu6cmlSNPJKGHXwOUaFmKOlPJm5G7lfrI7DFo6IrPTDjthVafdlBbHgAFCKKV0Oav2hDkyLyXkBHLxrBmWTsT6CnL5iitKbarVjNfWfPhU1qcoR54ictogFwiKkMVU/C99m7LPyBNiOcCrh9XHRo/cLXqiCFJJ07AQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+I7WJuaKo3cX/b6lE3O4ANGHkMn045Qk3yK0m7+9N+4=; b=nNjYT+308vEOt22luxmzzLepHOEK5FyS0elaDvJFrdiIQa+j2UxBupnlE9NPRKj5+dmYiqnQ3HcLDX4e5Lom4XgRJO8Zi7auv4di4GKKPnl1/JfzXmF//D9irEE6+0qeoASnzkFqgr3s18XLy1EGfWTn+0LpdCFWp890rFJ/m4bjNVeUC1Ce+2zW3EjSJb9zfNU0n2TN1vhRYRhCR+IMaXx4GjHDLEYlbd6A1jo6V6Me+vKbs2e8V8HGpo5va8UZukCzZg1s2GE8X10Vcu5atCRqloWJfTfefi9jaPFgS+r5C49NMLknB5A6faq3sHSiupHbTRKbjZ4ToUwr+fF5OQ== Received: from MW2PR12MB2588.namprd12.prod.outlook.com (2603:10b6:907:a::19) by MWHPR12MB1248.namprd12.prod.outlook.com (2603:10b6:300:12::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 17 Mar 2021 00:32:28 +0000 Received: from MW2PR12MB2588.namprd12.prod.outlook.com ([fe80::fcee:54fa:bf37:11a3]) by MW2PR12MB2588.namprd12.prod.outlook.com ([fe80::fcee:54fa:bf37:11a3%3]) with mapi id 15.20.3933.032; Wed, 17 Mar 2021 00:32:28 +0000 From: Suanming Mou To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [PATCH 1/2] ethdev: make flow API primary/secondary process safe Thread-Index: AQHXGdFADj5ZuD6t+k2uF7tFjJdtR6qHRsYQgAAKcoCAAAECsA== Date: Wed, 17 Mar 2021 00:32:28 +0000 Message-ID: References: <20210315192722.35490-1-stephen@networkplumber.org> <20210315192722.35490-2-stephen@networkplumber.org> <20210316171359.76f0b68e@hermes.local> In-Reply-To: <20210316171359.76f0b68e@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [60.190.230.234] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d6ad9c60-66b5-495d-7668-08d8e8dc24f6 x-ms-traffictypediagnostic: MWHPR12MB1248: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:331; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wzhnlTIIt6+URF14GmeDB158ubDSu2XI8sJyO7LAAKHvfValQCbfwieQ+SmNjnwf/ffKdtdMmlFgW33erNV//B4ysbUrMcGg+0P9SoI58pn0LZDQT8L+3oZGcOwsnF3R8m9XvOA1gee6/MrieVVU+dWZLwoN/MhXAnZaJi1UGsoSWz2tgmY0TtZrQEAQQFKwxg91X7VyauzFW444AXwQWGuwISY1FV6673BAtPeBGKbZ2nAERK7REkQsqSZRMKd/bkQEGnt1mcEk1I2SntbDDTL+++i+grQDs2kicM2n6wJMe/7UIIciFZPCSdaWBjjkY1PX/gAehCfxasUvvgiLQggczCS1Rzh/Sgvw0TvviE+eiUQyKRnZMF5u0na0Iu8a3KL0zvu229SHDMzyEoJtNIUJ6XpFX1/b67wMEDS0hQ0Jk5Ka/RDTIhDvBQhU9WNqGh2CnLywS8xtKeSMvGOXlvpTDTxfVGJYRT/re7SXtWs4zQoDn8GcjCb1rjmQ9jwtkVPC7/8/ushE/T3m//BseZ5WhEK/H7gRmV3utK9aDo6Mi/zv/8BYHgHBqcTv7GCg x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2588.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(376002)(39860400002)(136003)(66476007)(66946007)(76116006)(66446008)(33656002)(66556008)(64756008)(83380400001)(8936002)(6916009)(6506007)(52536014)(5660300002)(53546011)(7696005)(9686003)(71200400001)(4326008)(55016002)(86362001)(26005)(316002)(8676002)(186003)(478600001)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?tsyAQ9fT766le6qBC8XBS1pR+RZ8u0xwv6e2+2Ss1BuaLm1EqpUFP4/UvYcC?= =?us-ascii?Q?9RJMAiJqxO2AyU+RagOfMhVWVvhR+Uv1wcuuzm24nTHaw0bRexbI6qv/lSOl?= =?us-ascii?Q?XC5QyLKbK0pWCLnz5ub0n2NopZokrMlSA8KhMDBOcS9WXQRZWSpMUOwUt+Sm?= =?us-ascii?Q?s2VSNisTzTaRa0yX9UYqlwH6PB2L/WgTxRHmZQAx+lQF0Olc6zU2m/fJmXHa?= =?us-ascii?Q?iRy0SisJJs+rXRnyg+EZ9iWFHWGfzbDh67bwrglLykmrozruPTMZQFaOeKph?= =?us-ascii?Q?GYKhFrm6xsLw7vfuV5ynLrSshRy2kXwB/PjQEJ5/2CeRzYlhAFXpF+z2c3jd?= =?us-ascii?Q?Jex4b2MRKggFWtGIygbLFf12RjBk1VvsyUTzGLkg2/Tyt3DXUsKUR8ygNssI?= =?us-ascii?Q?aUEYgOfh5a4WT5cIwUUP8xtqbUyL//pXlePksVYKGdO6grnGK3EuLqq/KtGE?= =?us-ascii?Q?RI4ubsttTfScDMjr2+q5hCe0QIKoXLpIAeR+va5NCpFRFWfiB87qwZGaGw8Z?= =?us-ascii?Q?1wP8yiFkDwCziYwzm8iGjJWKmZVckrAXhjHbqsXN+wyxcdFgi6DuisY645Pv?= =?us-ascii?Q?5DouYB/tYON77ZSVTlIcd4XdTVG/FKsn4KIG48owpukXVJiVuTi3pwZre71R?= =?us-ascii?Q?6G9jfbmYhSskZ3TWLx4OEYogptvKIwbbFG5wfGnZLpAslyzk6Pp1XQnOW3gU?= =?us-ascii?Q?VFiRmSWAcbZqPi9Fn+bKP4pdUJHSyKQn3MYdh9l+6EB+L49y1/r5y7YuZmY4?= =?us-ascii?Q?jxijBF11P2iJPGpqGiFSMYAzHvFNBVxhCRZD+KvD5xVr1zYiyoaB7QVzgjKU?= =?us-ascii?Q?qfZPG/TVQgktKihtW3rL+ze37uRqwIdK7j0hH8BLG6udoIBC5ivKZx+frCAC?= =?us-ascii?Q?bnZ5BJNovV9hdk1O399pmf1x/YonRgl5Y+OUoZHjBZ3l3qBEmW7SwBSviy3l?= =?us-ascii?Q?epzJLjdLVGGLrWq+3l2XhWDhBPTQlCeocZZXboSzsnWKh9/zrlmL+jjCPgIK?= =?us-ascii?Q?LAvHxp4TukXDF+fsIR3+icivKsNhYohHNKFtYrVgs2+d90LO5WpYJ0C4FSMw?= =?us-ascii?Q?63pSQ6I4xxQh+FPm8H6uT0QFj5ZFl+hu6GQnjVZU61uD1E/QEbkUGRJgyMIH?= =?us-ascii?Q?JFBftU3JpQyKeNUleQzEkePV8naJDwN1psyupePhHeyDoyrPUkiCBqugdK6A?= =?us-ascii?Q?3k0FshdCKGHVuTc5/3vD26S4foc1rzALl3NbQ8W9pGbOVRizCTBjRxB4L6uu?= =?us-ascii?Q?jPer7WVRNOcfFC4bv5DuaHyTH9dyMyvu7oj2c4lP14OsWgWFLQ7MqgEKqfL7?= =?us-ascii?Q?6OZGFxhjUHJUSMaMaLR5fS+p?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR12MB2588.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6ad9c60-66b5-495d-7668-08d8e8dc24f6 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Mar 2021 00:32:28.1887 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MOI2OcP/dldexpOSZ+/sr+CDr8t1fjajR+PRVNiaT4q1ToBYcp4Q3ooxzrK3w9tVXeLE8zO2ah6qK8enr34q8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1248 Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: make flow API primary/secondary process safe X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Stephen Hemminger > Sent: Wednesday, March 17, 2021 8:14 AM > To: Suanming Mou > Cc: dev@dpdk.org > Subject: Re: [PATCH 1/2] ethdev: make flow API primary/secondary process = safe >=20 > On Tue, 16 Mar 2021 23:48:57 +0000 > Suanming Mou wrote: >=20 > > Hi Stephen, > > > > > -----Original Message----- > > > From: Stephen Hemminger > > > Sent: Tuesday, March 16, 2021 3:27 AM > > > To: dev@dpdk.org > > > Cc: Stephen Hemminger ; Suanming Mou > > > > > > Subject: [PATCH 1/2] ethdev: make flow API primary/secondary process > > > safe > > > > > > Posix mutex are not by default safe for protecting for usage from > > > multiple processes. The flow ops mutex could be used by both primary > > > and secondary processes. > > > > Process safe is something more widely scope. I assume it should be anot= her > feature but not a bugfix for thread-safe? > > And the fag RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE we have added is just > thread safe. > > >=20 > OK, that makes sense. Is this in the documentation? We have the description as below in doc/guides/prog_guide/rte_flow.rst: If PMD interfaces don't support re-entrancy/multi-thread safety, the rte_flow API functions will protect threads by mutex per port. The application can check whether ``RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE`` is set in ``dev_flags``, meaning the PMD is thread-safe regarding rte_flow, so the API level protection is disabled.