List patch comments

GET /api/patches/73556/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/73556/comments/?format=api&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/73556/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 118518, "web_url": "https://patches.dpdk.org/comment/118518/", "msgid": "<CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com", "date": "2020-09-12T02:18:04", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 501, "url": "https://patches.dpdk.org/api/people/501/?format=api", "name": "Ajit Khaparde", "email": "ajit.khaparde@broadcom.com" }, "content": "On Wed, Jul 8, 2020 at 2:40 PM Andrey Vesnovaty <andreyv@mellanox.com>\nwrote:\n\n> From: Andrey Vesnovaty <andrey.vesnovaty@gmail.com>\n>\n> This commit introduces extension of DPDK flow action API enabling\n> sharing of single rte_flow_action in multiple flows. The API intended for\n> PMDs where multiple HW offloaded flows can reuse the same HW\n> essence/object representing flow action and modification of such an\n> essence/object effects all the rules using it.\n>\n> Motivation and example\n> ===\n> Adding or removing one or more queues to RSS used by multiple flow rules\n> imposes per rule toll for current DPDK flow API; the scenario requires\n> for each flow sharing cloned RSS action:\n> - call `rte_flow_destroy()`\n> - call `rte_flow_create()` with modified RSS action\n>\n> API for sharing action and its in-place update benefits:\n> - reduce the overhead of multiple RSS flow rules reconfiguration\n> - optimize resource utilization by sharing action across of multiple\n> flows\n>\n> Change description\n> ===\n>\n> Shared action\n> ===\n> In order to represent flow action shared by multiple flows new action\n> type RTE_FLOW_ACTION_TYPE_SHARED is introduced (see `enum\n> rte_flow_action_type`).\n> Actually the introduced API decouples action from any specific flow and\n> enables sharing of single action by its handle across multiple flows.\n>\n> Shared action create/use/destroy\n> ===\n> Shared action may be reused by some or none flow rules at any given\n> moment, i.e. shared action reside outside of the context of any flow.\n> Shared action represent HW resources/objects used for action offloading\n> implementation.\n> API for shared action create (see `rte_flow_shared_action_create()`):\n> - should allocate HW resources and make related initializations required\n> for shared action implementation.\n> - make necessary preparations to maintain shared access to\n> the action resources, configuration and state.\n> API for shared action destroy (see `rte_flow_shared_action_destroy()`)\n> should release HW resources and make related cleanups required for shared\n> action implementation.\n>\n> In order to share some flow action reuse the handle of type\n> `struct rte_flow_shared_action` returned by\n> rte_flow_shared_action_create() as a `conf` field of\n> `struct rte_flow_action` (see \"example\" section).\n>\n> If some shared action not used by any flow rule all resources allocated\n> by the shared action can be released by rte_flow_shared_action_destroy()\n> (see \"example\" section). The shared action handle passed as argument to\n> destroy API should not be used any further i.e. result of the usage is\n> undefined.\n>\n> Shared action re-configuration\n> ===\n> Shared action behavior defined by its configuration can be updated via\n> rte_flow_shared_action_update() (see \"example\" section). The shared\n> action update operation modifies HW related resources/objects allocated\n> on the action creation. The number of operations performed by the update\n> operation should not be dependent on number of flows sharing the related\n> action. On return of shared action update API action behavior should be\n> according to updated configuration for all flows sharing the action.\n>\n> Shared action query\n> ===\n> Provide separate API to query shared action sate (see\n> rte_flow_shared_action_update()). Taking a counter as an example: query\n> returns value aggregating all counter increments across all flow rules\n> sharing the counter.\n>\n> PMD support\n> ===\n> The support of introduced API is pure PMD specific design and\n> responsibility for each action type (see struct rte_flow_ops).\n>\n> testpmd\n> ===\n> In order to utilize introduced API testpmd cli may implement following\n> extension\n> create/update/destroy/query shared action accordingly\n>\n> flow shared_action create {port_id} [index] {action}\n> flow shared_action update {port_id} {index} {action}\n> flow shared_action destroy {port_id} {index}\n> flow shared_action query {port_id} {index}\n>\n> testpmd example\n> ===\n>\n> configure rss to queues 1 & 2\n>\n> testpmd> flow shared_action create 0 100 rss 1 2\n>\n> create flow rule utilizing shared action\n>\n> testpmd> flow create 0 ingress \\\n> pattern eth dst is 0c:42:a1:15:fd:ac / ipv6 / tcp / end \\\n> actions shared 100 end / end\n>\n> add 2 more queues\n>\n> testpmd> flow shared_action modify 0 100 rss 1 2 3 4\n>\n> example\n> ===\n>\n> struct rte_flow_action actions[2];\n> struct rte_flow_action action;\n> /* skipped: initialize action */\n> struct rte_flow_shared_action *handle = rte_flow_shared_action_create(\n> port_id, &action, &error);\n> actions[0].type = RTE_FLOW_ACTION_TYPE_SHARED;\n> actions[0].conf = handle;\n> actions[1].type = RTE_FLOW_ACTION_TYPE_END;\n> /* skipped: init attr0 & pattern0 args */\n> struct rte_flow *flow0 = rte_flow_create(port_id, &attr0, pattern0,\n> actions, error);\n> /* create more rules reusing shared action */\n> struct rte_flow *flow1 = rte_flow_create(port_id, &attr1, pattern1,\n> actions, error);\n> /* skipped: for flows 2 till N */\n> struct rte_flow *flowN = rte_flow_create(port_id, &attrN, patternN,\n> actions, error);\n> /* update shared action */\n> struct rte_flow_action updated_action;\n> /*\n> * skipped: initialize updated_action according to desired action\n> * configuration change\n> */\n> rte_flow_shared_action_update(port_id, handle, &updated_action, error);\n> /*\n> * from now on all flows 1 till N will act according to configuration of\n> * updated_action\n> */\n> /* skipped: destroy all flows 1 till N */\n> rte_flow_shared_action_destroy(port_id, handle, error);\n>\n> Signed-off-by: Andrey Vesnovaty <andreyv@mellanox.com>\n> ---\n> lib/librte_ethdev/rte_ethdev_version.map | 6 +\n> lib/librte_ethdev/rte_flow.c | 81 +++++++++++++\n> lib/librte_ethdev/rte_flow.h | 148 ++++++++++++++++++++++-\n> lib/librte_ethdev/rte_flow_driver.h | 22 ++++\n> 4 files changed, 256 insertions(+), 1 deletion(-)\n>\n> diff --git a/lib/librte_ethdev/rte_ethdev_version.map\n> b/lib/librte_ethdev/rte_ethdev_version.map\n> index 7155056045..119d84976a 100644\n> --- a/lib/librte_ethdev/rte_ethdev_version.map\n> +++ b/lib/librte_ethdev/rte_ethdev_version.map\n> @@ -241,4 +241,10 @@ EXPERIMENTAL {\n> __rte_ethdev_trace_rx_burst;\n> __rte_ethdev_trace_tx_burst;\n> rte_flow_get_aged_flows;\n> +\n> + # added in 20.08\n> + rte_flow_shared_action_create;\n> + rte_flow_shared_action_destroy;\n> + rte_flow_shared_action_update;\n> + rte_flow_shared_action_query;\n> };\n> diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\n> index 1685be5f73..0ac4d31a13 100644\n> --- a/lib/librte_ethdev/rte_flow.c\n> +++ b/lib/librte_ethdev/rte_flow.c\n> @@ -1250,3 +1250,84 @@ rte_flow_get_aged_flows(uint16_t port_id, void\n> **contexts,\n> RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> NULL, rte_strerror(ENOTSUP));\n> }\n> +\n> +struct rte_flow_shared_action *\n> +rte_flow_shared_action_create(uint16_t port_id,\n> + const struct rte_flow_action *action,\n>\nIt will be good to have an attributes argument here.\nSome hardware devices may have ingress and egress resource pools.\nSo a 'direction' attribute can help share the resource effectively.\n\n\n\n> + struct rte_flow_error *error)\n> +{\n> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> + struct rte_flow_shared_action *shared_action;\n> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> +\n> + if (unlikely(!ops))\n> + return NULL;\n> + if (likely(!!ops->shared_action_create)) {\n> + shared_action = ops->shared_action_create(dev, action,\n> error);\n> + if (shared_action == NULL)\n> + flow_err(port_id, -rte_errno, error);\n> + return shared_action;\n> + }\n> + rte_flow_error_set(error, ENOSYS, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> + NULL, rte_strerror(ENOSYS));\n> + return NULL;\n> +}\n> +\n> +int\n> +rte_flow_shared_action_destroy(uint16_t port_id,\n> + struct rte_flow_shared_action *action,\n> + struct rte_flow_error *error)\n> +{\n> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> +\n> + if (unlikely(!ops))\n> + return -rte_errno;\n> + if (likely(!!ops->shared_action_destroy))\n> + return flow_err(port_id,\n> + ops->shared_action_destroy(dev, action,\n> error),\n> + error);\n> + return rte_flow_error_set(error, ENOSYS,\n> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> + NULL, rte_strerror(ENOSYS));\n> +}\n> +\n> +int\n> +rte_flow_shared_action_update(uint16_t port_id,\n> + struct rte_flow_shared_action *action,\n> + const struct rte_flow_action *update,\n> + struct rte_flow_error *error)\n> +{\n> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> +\n> + if (unlikely(!ops))\n> + return -rte_errno;\n> + if (likely(!!ops->shared_action_update))\n> + return flow_err(port_id, ops->shared_action_update(dev,\n> action,\n> + update, error),\n> + error);\n> + return rte_flow_error_set(error, ENOSYS,\n> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> + NULL, rte_strerror(ENOSYS));\n> +}\n> +\n> +int\n> +rte_flow_shared_action_query(uint16_t port_id,\n> + const struct rte_flow_shared_action *action,\n> + void *data,\n> + struct rte_flow_error *error)\n> +{\n> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> +\n> + if (unlikely(!ops))\n> + return -rte_errno;\n> + if (likely(!!ops->shared_action_query))\n> + return flow_err(port_id, ops->shared_action_query(dev,\n> action,\n> + data, error),\n> + error);\n> + return rte_flow_error_set(error, ENOSYS,\n> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> + NULL, rte_strerror(ENOSYS));\n> +}\n> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\n> index b0e4199192..257456b14a 100644\n> --- a/lib/librte_ethdev/rte_flow.h\n> +++ b/lib/librte_ethdev/rte_flow.h\n> @@ -1681,7 +1681,8 @@ enum rte_flow_action_type {\n> /**\n> * Enables counters for this flow rule.\n> *\n> - * These counters can be retrieved and reset through\n> rte_flow_query(),\n> + * These counters can be retrieved and reset through\n> rte_flow_query() or\n> + * rte_flow_shared_action_query() if the action provided via\n> handle,\n> * see struct rte_flow_query_count.\n> *\n> * See struct rte_flow_action_count.\n> @@ -2099,6 +2100,14 @@ enum rte_flow_action_type {\n> * see enum RTE_ETH_EVENT_FLOW_AGED\n> */\n> RTE_FLOW_ACTION_TYPE_AGE,\n> +\n> + /**\n> + * Describes action shared a cross multiple flow rules.\n> + *\n> + * Enables multiple rules reference the same action by handle (see\n> + * struct rte_flow_shared_action).\n> + */\n> + RTE_FLOW_ACTION_TYPE_SHARED,\n> };\n>\n> /**\n> @@ -2660,6 +2669,20 @@ struct rte_flow_action_set_dscp {\n> uint8_t dscp;\n> };\n>\n> +\n> +/**\n> + * RTE_FLOW_ACTION_TYPE_SHARED\n> + *\n> + * Opaque type returned after successfully creating a shared action.\n> + *\n> + * This handle can be used to manage and query the related action:\n> + * - share it a cross multiple flow rules\n> + * - update action configuration\n> + * - query action data\n> + * - destroy action\n> + */\n> +struct rte_flow_shared_action;\n> +\n> /* Mbuf dynamic field offset for metadata. */\n> extern int32_t rte_flow_dynf_metadata_offs;\n>\n> @@ -3324,6 +3347,129 @@ int\n> rte_flow_get_aged_flows(uint16_t port_id, void **contexts,\n> uint32_t nb_contexts, struct rte_flow_error\n> *error);\n>\n> +/**\n> + * @warning\n> + * @b EXPERIMENTAL: this API may change without prior notice.\n> + *\n> + * Create shared action for reuse in multiple flow rules.\n> + *\n> + * @param[in] port_id\n> + * The port identifier of the Ethernet device.\n> + * @param[in] action\n> + * Action configuration for shared action creation.\n> + * @param[out] error\n> + * Perform verbose error reporting if not NULL. PMDs initialize this\n> + * structure in case of error only.\n> + * @return\n> + * A valid handle in case of success, NULL otherwise and rte_errno is\n> set\n> + * to one of the error codes defined:\n> + * - (ENOSYS) if underlying device does not support this functionality.\n> + * - (EIO) if underlying device is removed.\n> + * - (EINVAL) if *action* invalid.\n> + * - (ENOTSUP) if *action* valid but unsupported.\n> + */\n> +__rte_experimental\n> +struct rte_flow_shared_action *\n> +rte_flow_shared_action_create(uint16_t port_id,\n> + const struct rte_flow_action *action,\n> + struct rte_flow_error *error);\n> +\n> +/**\n> + * @warning\n> + * @b EXPERIMENTAL: this API may change without prior notice.\n> + *\n> + * Destroys the shared action by handle.\n> + *\n> + * @param[in] port_id\n> + * The port identifier of the Ethernet device.\n> + * @param[in] action\n> + * Handle for the shared action to be destroyed.\n> + * @param[out] error\n> + * Perform verbose error reporting if not NULL. PMDs initialize this\n> + * structure in case of error only.\n> + * @return\n> + * - (0) if success.\n> + * - (-ENOSYS) if underlying device does not support this functionality.\n> + * - (-EIO) if underlying device is removed.\n> + * - (-ENOENT) if action pointed by *action* handle was not found.\n> + * - (-ETOOMANYREFS) if action pointed by *action* handle still used by\n> one or\n> + * more rules\n> + * rte_errno is also set.\n> + */\n> +__rte_experimental\n> +int\n> +rte_flow_shared_action_destroy(uint16_t port_id,\n> + struct rte_flow_shared_action *action,\n> + struct rte_flow_error *error);\n> +\n> +/**\n> + * @warning\n> + * @b EXPERIMENTAL: this API may change without prior notice.\n> + *\n> + * Updates inplace the shared action configuration pointed by *action*\n> handle\n> + * with the configuration provided as *update* argument.\n> + * The update of the shared action configuration effects all flow rules\n> reusing\n> + * the action via handle.\n> + *\n> + * @param[in] port_id\n> + * The port identifier of the Ethernet device.\n> + * @param[in] action\n> + * Handle for the shared action to be updated.\n> + * @param[in] update\n> + * Action specification used to modify the action pointed by handle.\n> + * *update* should be of same type with the action pointed by the\n> *action*\n> + * handle argument, otherwise considered as invalid.\n> + * @param[out] error\n> + * Perform verbose error reporting if not NULL. PMDs initialize this\n> + * structure in case of error only.\n> + * @return\n> + * - (0) if success.\n> + * - (-ENOSYS) if underlying device does not support this functionality.\n> + * - (-EIO) if underlying device is removed.\n> + * - (-EINVAL) if *update* invalid.\n> + * - (-ENOTSUP) if *update* valid but unsupported.\n> + * - (-ENOENT) if action pointed by *ctx* was not found.\n> + * rte_errno is also set.\n> + */\n> +__rte_experimental\n> +int\n> +rte_flow_shared_action_update(uint16_t port_id,\n> + struct rte_flow_shared_action *action,\n> + const struct rte_flow_action *update,\n> + struct rte_flow_error *error);\n> +\n> +/**\n> + * @warning\n> + * @b EXPERIMENTAL: this API may change without prior notice.\n> + *\n> + * Query the shared action by handle.\n> + *\n> + * This function allows retrieving action-specific data such as counters.\n> + * Data is gathered by special action which may be present/referenced in\n> + * more than one flow rule definition.\n> + *\n> + * \\see RTE_FLOW_ACTION_TYPE_COUNT\n> + *\n> + * @param port_id\n> + * Port identifier of Ethernet device.\n> + * @param[in] action\n> + * Handle for the shared action to query.\n> + * @param[in, out] data\n> + * Pointer to storage for the associated query data type.\n> + * @param[out] error\n> + * Perform verbose error reporting if not NULL. PMDs initialize this\n> + * structure in case of error only.\n> + *\n> + * @return\n> + * 0 on success, a negative errno value otherwise and rte_errno is set.\n> + */\n> +__rte_experimental\n> +int\n> +rte_flow_shared_action_query(uint16_t port_id,\n> + const struct rte_flow_shared_action *action,\n> + void *data,\n> + struct rte_flow_error *error);\n> +\n> #ifdef __cplusplus\n> }\n> #endif\n> diff --git a/lib/librte_ethdev/rte_flow_driver.h\n> b/lib/librte_ethdev/rte_flow_driver.h\n> index 881cc469b7..a2cae1b53c 100644\n> --- a/lib/librte_ethdev/rte_flow_driver.h\n> +++ b/lib/librte_ethdev/rte_flow_driver.h\n> @@ -107,6 +107,28 @@ struct rte_flow_ops {\n> void **context,\n> uint32_t nb_contexts,\n> struct rte_flow_error *err);\n> + /** See rte_flow_shared_action_create() */\n> + struct rte_flow_shared_action *(*shared_action_create)\n> + (struct rte_eth_dev *dev,\n> + const struct rte_flow_action *action,\n> + struct rte_flow_error *error);\n> + /** See rte_flow_shared_action_destroy() */\n> + int (*shared_action_destroy)\n> + (struct rte_eth_dev *dev,\n> + struct rte_flow_shared_action *shared_action,\n> + struct rte_flow_error *error);\n> + /** See rte_flow_shared_action_update() */\n> + int (*shared_action_update)\n> + (struct rte_eth_dev *dev,\n> + struct rte_flow_shared_action *shared_action,\n> + const struct rte_flow_action *update,\n> + struct rte_flow_error *error);\n> + /** See rte_flow_shared_action_query() */\n> + int (*shared_action_query)\n> + (struct rte_eth_dev *dev,\n> + const struct rte_flow_shared_action *shared_action,\n> + void *data,\n> + struct rte_flow_error *error);\n> };\n>\n> /**\n> --\n> 2.26.2\n>\n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C6579A04C3;\n\tSat, 12 Sep 2020 04:18:24 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9D5141C1BA;\n\tSat, 12 Sep 2020 04:18:23 +0200 (CEST)", "from mail-oi1-f195.google.com (mail-oi1-f195.google.com\n [209.85.167.195]) by dpdk.org (Postfix) with ESMTP id CA7781C0DA\n for <dev@dpdk.org>; Sat, 12 Sep 2020 04:18:21 +0200 (CEST)", "by mail-oi1-f195.google.com with SMTP id u126so11335738oif.13\n for <dev@dpdk.org>; Fri, 11 Sep 2020 19:18:21 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=tmM0/iETagZ58FeOnguxP3lOBkfctWbvXsct0qQyZXg=;\n b=ViWXFlCb313UF3hXo4Ukq/seNEN1IlWjLovcUNN9tYUctnrwfGM35ZTQ+W62IQ3PDB\n QC3tkqZajfp3uQcHzy94pzLX+TYL/G5z0wis+CoFBltg1nhnHFnFTJwxSx6TgTRBRuVP\n JqT5NaUVaNGY2cecqvMxTVbYY5ee8c9kNfEsA=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=tmM0/iETagZ58FeOnguxP3lOBkfctWbvXsct0qQyZXg=;\n b=jvf+Lo04krXP4sXGY6wUm2IbfPDHFjFb0Li5ShMu+97b7/zcM9O4G+Pta87FIMDO6W\n XStAaKGTItUBLlUEHzvmKaSffh6AfarskUnGp7dtUpaJzUpA7od9++9op9AQk3FQNcyS\n 7/Cnae5KYhmeLgQdZ+q93bQMgVdXoNUjZF1hhYfAzRdM/q3x5Fzdex0nSfn4IfzxviNW\n 7LRygb/Hwv81gMNmnV10pXDi/j3ZcSf91lra7fc9hngifOVIFxzNKxdLSOz/7OajbPim\n 9VueQca9ciNTlmFxd7nHT6jamSM0AmzJaT36YLmQYYzvPw2WQlu9QVJhuMcMuEzrg8vz\n tZxA==", "X-Gm-Message-State": "AOAM5316ioUEReq22RmYZfrdBASmxKZJsHh9zCxi81L070Nh65004VSj\n IQmxUNAPVuxqGA1XOjh7rr8Z84o/Md9qZrlazQspYw==", "X-Google-Smtp-Source": "\n ABdhPJyJ1SZOuWHH3kX+RRdk8QAx5jjIWQhKtoT3kqqAZXTFTn3scinyNhBVgnh1WvYY8qj0wnJb4uvnpzmKxsV5QZ8=", "X-Received": "by 2002:aca:f417:: with SMTP id s23mr2937948oih.168.1599877100784;\n Fri, 11 Sep 2020 19:18:20 -0700 (PDT)", "MIME-Version": "1.0", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>", "In-Reply-To": "<20200708213946.30108-2-andreyv@mellanox.com>", "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "Date": "Fri, 11 Sep 2020 19:18:04 -0700", "Message-ID": "\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>", "To": "Andrey Vesnovaty <andreyv@mellanox.com>", "Cc": "dpdk-dev <dev@dpdk.org>, jer@marvell.com,\n Jerin Jacob <jerinjacobk@gmail.com>,\n Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@intel.com>,\n Stephen Hemminger <stephen@networkplumber.org>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Ori Kam <orika@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>,\n andrey.vesnovaty@gmail.com, Ray Kinsella <mdr@ashroe.eu>,\n Neil Horman <nhorman@tuxdriver.com>,\n Andrew Rybchenko <arybchenko@solarflare.com>", "Content-Type": "text/plain; charset=\"UTF-8\"", "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 118749, "web_url": "https://patches.dpdk.org/comment/118749/", "msgid": "<MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com", "date": "2020-09-15T11:50:51", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 1969, "url": "https://patches.dpdk.org/api/people/1969/?format=api", "name": "Andrey Vesnovaty", "email": "andreyv@nvidia.com" }, "content": "Hi Ajit, PSB.\n\nThanks,\nAndrey\n\n> -----Original Message-----\n> From: Ajit Khaparde <ajit.khaparde@broadcom.com>\n> Sent: Saturday, September 12, 2020 5:18 AM\n> To: Andrey Vesnovaty <andreyv@mellanox.com>\n> Cc: dpdk-dev <dev@dpdk.org>; jer@marvell.com; Jerin Jacob\n> <jerinjacobk@gmail.com>; NBU-Contact-Thomas Monjalon\n> <thomas@monjalon.net>; Ferruh Yigit <ferruh.yigit@intel.com>; Stephen\n> Hemminger <stephen@networkplumber.org>; Bruce Richardson\n> <bruce.richardson@intel.com>; Ori Kam <orika@mellanox.com>; Viacheslav\n> Ovsiienko <viacheslavo@mellanox.com>; andrey.vesnovaty@gmail.com; Ray\n> Kinsella <mdr@ashroe.eu>; Neil Horman <nhorman@tuxdriver.com>; Andrew\n> Rybchenko <arybchenko@solarflare.com>\n> Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> \n> \n> \n> On Wed, Jul 8, 2020 at 2:40 PM Andrey Vesnovaty <andreyv@mellanox.com\n> <mailto:andreyv@mellanox.com> > wrote:\n> \n> \n> \tFrom: Andrey Vesnovaty <andrey.vesnovaty@gmail.com\n> <mailto:andrey.vesnovaty@gmail.com> >\n> \n> \tThis commit introduces extension of DPDK flow action API enabling\n> \tsharing of single rte_flow_action in multiple flows. The API intended for\n> \tPMDs where multiple HW offloaded flows can reuse the same HW\n> \tessence/object representing flow action and modification of such an\n> \tessence/object effects all the rules using it.\n> \n> \tMotivation and example\n> \t===\n> \tAdding or removing one or more queues to RSS used by multiple flow\n> rules\n> \timposes per rule toll for current DPDK flow API; the scenario requires\n> \tfor each flow sharing cloned RSS action:\n> \t- call `rte_flow_destroy()`\n> \t- call `rte_flow_create()` with modified RSS action\n> \n> \tAPI for sharing action and its in-place update benefits:\n> \t- reduce the overhead of multiple RSS flow rules reconfiguration\n> \t- optimize resource utilization by sharing action across of multiple\n> \t flows\n> \n> \tChange description\n> \t===\n> \n> \tShared action\n> \t===\n> \tIn order to represent flow action shared by multiple flows new action\n> \ttype RTE_FLOW_ACTION_TYPE_SHARED is introduced (see `enum\n> \trte_flow_action_type`).\n> \tActually the introduced API decouples action from any specific flow and\n> \tenables sharing of single action by its handle across multiple flows.\n> \n> \tShared action create/use/destroy\n> \t===\n> \tShared action may be reused by some or none flow rules at any given\n> \tmoment, i.e. shared action reside outside of the context of any flow.\n> \tShared action represent HW resources/objects used for action\n> offloading\n> \timplementation.\n> \tAPI for shared action create (see `rte_flow_shared_action_create()`):\n> \t- should allocate HW resources and make related initializations required\n> \t for shared action implementation.\n> \t- make necessary preparations to maintain shared access to\n> \t the action resources, configuration and state.\n> \tAPI for shared action destroy (see `rte_flow_shared_action_destroy()`)\n> \tshould release HW resources and make related cleanups required for\n> shared\n> \taction implementation.\n> \n> \tIn order to share some flow action reuse the handle of type\n> \t`struct rte_flow_shared_action` returned by\n> \trte_flow_shared_action_create() as a `conf` field of\n> \t`struct rte_flow_action` (see \"example\" section).\n> \n> \tIf some shared action not used by any flow rule all resources allocated\n> \tby the shared action can be released by\n> rte_flow_shared_action_destroy()\n> \t(see \"example\" section). The shared action handle passed as argument\n> to\n> \tdestroy API should not be used any further i.e. result of the usage is\n> \tundefined.\n> \n> \tShared action re-configuration\n> \t===\n> \tShared action behavior defined by its configuration can be updated via\n> \trte_flow_shared_action_update() (see \"example\" section). The shared\n> \taction update operation modifies HW related resources/objects\n> allocated\n> \ton the action creation. The number of operations performed by the\n> update\n> \toperation should not be dependent on number of flows sharing the\n> related\n> \taction. On return of shared action update API action behavior should be\n> \taccording to updated configuration for all flows sharing the action.\n> \n> \tShared action query\n> \t===\n> \tProvide separate API to query shared action sate (see\n> \trte_flow_shared_action_update()). Taking a counter as an example:\n> query\n> \treturns value aggregating all counter increments across all flow rules\n> \tsharing the counter.\n> \n> \tPMD support\n> \t===\n> \tThe support of introduced API is pure PMD specific design and\n> \tresponsibility for each action type (see struct rte_flow_ops).\n> \n> \ttestpmd\n> \t===\n> \tIn order to utilize introduced API testpmd cli may implement following\n> \textension\n> \tcreate/update/destroy/query shared action accordingly\n> \n> \tflow shared_action create {port_id} [index] {action}\n> \tflow shared_action update {port_id} {index} {action}\n> \tflow shared_action destroy {port_id} {index}\n> \tflow shared_action query {port_id} {index}\n> \n> \ttestpmd example\n> \t===\n> \n> \tconfigure rss to queues 1 & 2\n> \n> \ttestpmd> flow shared_action create 0 100 rss 1 2\n> \n> \tcreate flow rule utilizing shared action\n> \n> \ttestpmd> flow create 0 ingress \\\n> \t pattern eth dst is 0c:42:a1:15:fd:ac / ipv6 / tcp / end \\\n> \t actions shared 100 end / end\n> \n> \tadd 2 more queues\n> \n> \ttestpmd> flow shared_action modify 0 100 rss 1 2 3 4\n> \n> \texample\n> \t===\n> \n> \tstruct rte_flow_action actions[2];\n> \tstruct rte_flow_action action;\n> \t/* skipped: initialize action */\n> \tstruct rte_flow_shared_action *handle =\n> rte_flow_shared_action_create(\n> \t port_id, &action, &error);\n> \tactions[0].type = RTE_FLOW_ACTION_TYPE_SHARED;\n> \tactions[0].conf = handle;\n> \tactions[1].type = RTE_FLOW_ACTION_TYPE_END;\n> \t/* skipped: init attr0 & pattern0 args */\n> \tstruct rte_flow *flow0 = rte_flow_create(port_id, &attr0, pattern0,\n> \t actions, error);\n> \t/* create more rules reusing shared action */\n> \tstruct rte_flow *flow1 = rte_flow_create(port_id, &attr1, pattern1,\n> \t actions, error);\n> \t/* skipped: for flows 2 till N */\n> \tstruct rte_flow *flowN = rte_flow_create(port_id, &attrN, patternN,\n> \t actions, error);\n> \t/* update shared action */\n> \tstruct rte_flow_action updated_action;\n> \t/*\n> \t * skipped: initialize updated_action according to desired action\n> \t * configuration change\n> \t */\n> \trte_flow_shared_action_update(port_id, handle, &updated_action,\n> error);\n> \t/*\n> \t * from now on all flows 1 till N will act according to configuration of\n> \t * updated_action\n> \t */\n> \t/* skipped: destroy all flows 1 till N */\n> \trte_flow_shared_action_destroy(port_id, handle, error);\n> \n> \tSigned-off-by: Andrey Vesnovaty <andreyv@mellanox.com\n> <mailto:andreyv@mellanox.com> >\n> \t---\n> \t lib/librte_ethdev/rte_ethdev_version.map | 6 +\n> \t lib/librte_ethdev/rte_flow.c | 81 +++++++++++++\n> \t lib/librte_ethdev/rte_flow.h | 148 ++++++++++++++++++++++-\n> \t lib/librte_ethdev/rte_flow_driver.h | 22 ++++\n> \t 4 files changed, 256 insertions(+), 1 deletion(-)\n> \n> \tdiff --git a/lib/librte_ethdev/rte_ethdev_version.map\n> b/lib/librte_ethdev/rte_ethdev_version.map\n> \tindex 7155056045..119d84976a 100644\n> \t--- a/lib/librte_ethdev/rte_ethdev_version.map\n> \t+++ b/lib/librte_ethdev/rte_ethdev_version.map\n> \t@@ -241,4 +241,10 @@ EXPERIMENTAL {\n> \t __rte_ethdev_trace_rx_burst;\n> \t __rte_ethdev_trace_tx_burst;\n> \t rte_flow_get_aged_flows;\n> \t+\n> \t+ # added in 20.08\n> \t+ rte_flow_shared_action_create;\n> \t+ rte_flow_shared_action_destroy;\n> \t+ rte_flow_shared_action_update;\n> \t+ rte_flow_shared_action_query;\n> \t };\n> \tdiff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\n> \tindex 1685be5f73..0ac4d31a13 100644\n> \t--- a/lib/librte_ethdev/rte_flow.c\n> \t+++ b/lib/librte_ethdev/rte_flow.c\n> \t@@ -1250,3 +1250,84 @@ rte_flow_get_aged_flows(uint16_t port_id,\n> void **contexts,\n> \t RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t NULL, rte_strerror(ENOTSUP));\n> \t }\n> \t+\n> \t+struct rte_flow_shared_action *\n> \t+rte_flow_shared_action_create(uint16_t port_id,\n> \t+ const struct rte_flow_action *action,\n> \n> \n> It will be good to have an attributes argument here.\n> Some hardware devices may have ingress and egress resource pools.\n> So a 'direction' attribute can help share the resource effectively.\n\nI understand the idea of HW ingress/egress resource separation.\nUnfortunately on shared action creation it's not defined if it will be used\nin ingress or egress flow or both.\nIs the suggestion is to restrict usage of shared action to single direction? \n\n> \n> \n> \n> \t+ struct rte_flow_error *error)\n> \t+{\n> \t+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t+ struct rte_flow_shared_action *shared_action;\n> \t+ const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> \t+\n> \t+ if (unlikely(!ops))\n> \t+ return NULL;\n> \t+ if (likely(!!ops->shared_action_create)) {\n> \t+ shared_action = ops->shared_action_create(dev, action,\n> error);\n> \t+ if (shared_action == NULL)\n> \t+ flow_err(port_id, -rte_errno, error);\n> \t+ return shared_action;\n> \t+ }\n> \t+ rte_flow_error_set(error, ENOSYS,\n> RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t+ NULL, rte_strerror(ENOSYS));\n> \t+ return NULL;\n> \t+}\n> \t+\n> \t+int\n> \t+rte_flow_shared_action_destroy(uint16_t port_id,\n> \t+ struct rte_flow_shared_action *action,\n> \t+ struct rte_flow_error *error)\n> \t+{\n> \t+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t+ const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> \t+\n> \t+ if (unlikely(!ops))\n> \t+ return -rte_errno;\n> \t+ if (likely(!!ops->shared_action_destroy))\n> \t+ return flow_err(port_id,\n> \t+ ops->shared_action_destroy(dev, action, error),\n> \t+ error);\n> \t+ return rte_flow_error_set(error, ENOSYS,\n> \t+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t+ NULL, rte_strerror(ENOSYS));\n> \t+}\n> \t+\n> \t+int\n> \t+rte_flow_shared_action_update(uint16_t port_id,\n> \t+ struct rte_flow_shared_action *action,\n> \t+ const struct rte_flow_action *update,\n> \t+ struct rte_flow_error *error)\n> \t+{\n> \t+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t+ const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> \t+\n> \t+ if (unlikely(!ops))\n> \t+ return -rte_errno;\n> \t+ if (likely(!!ops->shared_action_update))\n> \t+ return flow_err(port_id, ops->shared_action_update(dev,\n> action,\n> \t+ update, error),\n> \t+ error);\n> \t+ return rte_flow_error_set(error, ENOSYS,\n> \t+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t+ NULL, rte_strerror(ENOSYS));\n> \t+}\n> \t+\n> \t+int\n> \t+rte_flow_shared_action_query(uint16_t port_id,\n> \t+ const struct rte_flow_shared_action *action,\n> \t+ void *data,\n> \t+ struct rte_flow_error *error)\n> \t+{\n> \t+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t+ const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);\n> \t+\n> \t+ if (unlikely(!ops))\n> \t+ return -rte_errno;\n> \t+ if (likely(!!ops->shared_action_query))\n> \t+ return flow_err(port_id, ops->shared_action_query(dev,\n> action,\n> \t+ data, error),\n> \t+ error);\n> \t+ return rte_flow_error_set(error, ENOSYS,\n> \t+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t+ NULL, rte_strerror(ENOSYS));\n> \t+}\n> \tdiff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\n> \tindex b0e4199192..257456b14a 100644\n> \t--- a/lib/librte_ethdev/rte_flow.h\n> \t+++ b/lib/librte_ethdev/rte_flow.h\n> \t@@ -1681,7 +1681,8 @@ enum rte_flow_action_type {\n> \t /**\n> \t * Enables counters for this flow rule.\n> \t *\n> \t- * These counters can be retrieved and reset through\n> rte_flow_query(),\n> \t+ * These counters can be retrieved and reset through\n> rte_flow_query() or\n> \t+ * rte_flow_shared_action_query() if the action provided via\n> handle,\n> \t * see struct rte_flow_query_count.\n> \t *\n> \t * See struct rte_flow_action_count.\n> \t@@ -2099,6 +2100,14 @@ enum rte_flow_action_type {\n> \t * see enum RTE_ETH_EVENT_FLOW_AGED\n> \t */\n> \t RTE_FLOW_ACTION_TYPE_AGE,\n> \t+\n> \t+ /**\n> \t+ * Describes action shared a cross multiple flow rules.\n> \t+ *\n> \t+ * Enables multiple rules reference the same action by handle (see\n> \t+ * struct rte_flow_shared_action).\n> \t+ */\n> \t+ RTE_FLOW_ACTION_TYPE_SHARED,\n> \t };\n> \n> \t /**\n> \t@@ -2660,6 +2669,20 @@ struct rte_flow_action_set_dscp {\n> \t uint8_t dscp;\n> \t };\n> \n> \t+\n> \t+/**\n> \t+ * RTE_FLOW_ACTION_TYPE_SHARED\n> \t+ *\n> \t+ * Opaque type returned after successfully creating a shared action.\n> \t+ *\n> \t+ * This handle can be used to manage and query the related action:\n> \t+ * - share it a cross multiple flow rules\n> \t+ * - update action configuration\n> \t+ * - query action data\n> \t+ * - destroy action\n> \t+ */\n> \t+struct rte_flow_shared_action;\n> \t+\n> \t /* Mbuf dynamic field offset for metadata. */\n> \t extern int32_t rte_flow_dynf_metadata_offs;\n> \n> \t@@ -3324,6 +3347,129 @@ int\n> \t rte_flow_get_aged_flows(uint16_t port_id, void **contexts,\n> \t uint32_t nb_contexts, struct rte_flow_error *error);\n> \n> \t+/**\n> \t+ * @warning\n> \t+ * @b EXPERIMENTAL: this API may change without prior notice.\n> \t+ *\n> \t+ * Create shared action for reuse in multiple flow rules.\n> \t+ *\n> \t+ * @param[in] port_id\n> \t+ * The port identifier of the Ethernet device.\n> \t+ * @param[in] action\n> \t+ * Action configuration for shared action creation.\n> \t+ * @param[out] error\n> \t+ * Perform verbose error reporting if not NULL. PMDs initialize this\n> \t+ * structure in case of error only.\n> \t+ * @return\n> \t+ * A valid handle in case of success, NULL otherwise and rte_errno is\n> set\n> \t+ * to one of the error codes defined:\n> \t+ * - (ENOSYS) if underlying device does not support this functionality.\n> \t+ * - (EIO) if underlying device is removed.\n> \t+ * - (EINVAL) if *action* invalid.\n> \t+ * - (ENOTSUP) if *action* valid but unsupported.\n> \t+ */\n> \t+__rte_experimental\n> \t+struct rte_flow_shared_action *\n> \t+rte_flow_shared_action_create(uint16_t port_id,\n> \t+ const struct rte_flow_action *action,\n> \t+ struct rte_flow_error *error);\n> \t+\n> \t+/**\n> \t+ * @warning\n> \t+ * @b EXPERIMENTAL: this API may change without prior notice.\n> \t+ *\n> \t+ * Destroys the shared action by handle.\n> \t+ *\n> \t+ * @param[in] port_id\n> \t+ * The port identifier of the Ethernet device.\n> \t+ * @param[in] action\n> \t+ * Handle for the shared action to be destroyed.\n> \t+ * @param[out] error\n> \t+ * Perform verbose error reporting if not NULL. PMDs initialize this\n> \t+ * structure in case of error only.\n> \t+ * @return\n> \t+ * - (0) if success.\n> \t+ * - (-ENOSYS) if underlying device does not support this functionality.\n> \t+ * - (-EIO) if underlying device is removed.\n> \t+ * - (-ENOENT) if action pointed by *action* handle was not found.\n> \t+ * - (-ETOOMANYREFS) if action pointed by *action* handle still used\n> by one or\n> \t+ * more rules\n> \t+ * rte_errno is also set.\n> \t+ */\n> \t+__rte_experimental\n> \t+int\n> \t+rte_flow_shared_action_destroy(uint16_t port_id,\n> \t+ struct rte_flow_shared_action *action,\n> \t+ struct rte_flow_error *error);\n> \t+\n> \t+/**\n> \t+ * @warning\n> \t+ * @b EXPERIMENTAL: this API may change without prior notice.\n> \t+ *\n> \t+ * Updates inplace the shared action configuration pointed by *action*\n> handle\n> \t+ * with the configuration provided as *update* argument.\n> \t+ * The update of the shared action configuration effects all flow rules\n> reusing\n> \t+ * the action via handle.\n> \t+ *\n> \t+ * @param[in] port_id\n> \t+ * The port identifier of the Ethernet device.\n> \t+ * @param[in] action\n> \t+ * Handle for the shared action to be updated.\n> \t+ * @param[in] update\n> \t+ * Action specification used to modify the action pointed by handle.\n> \t+ * *update* should be of same type with the action pointed by the\n> *action*\n> \t+ * handle argument, otherwise considered as invalid.\n> \t+ * @param[out] error\n> \t+ * Perform verbose error reporting if not NULL. PMDs initialize this\n> \t+ * structure in case of error only.\n> \t+ * @return\n> \t+ * - (0) if success.\n> \t+ * - (-ENOSYS) if underlying device does not support this functionality.\n> \t+ * - (-EIO) if underlying device is removed.\n> \t+ * - (-EINVAL) if *update* invalid.\n> \t+ * - (-ENOTSUP) if *update* valid but unsupported.\n> \t+ * - (-ENOENT) if action pointed by *ctx* was not found.\n> \t+ * rte_errno is also set.\n> \t+ */\n> \t+__rte_experimental\n> \t+int\n> \t+rte_flow_shared_action_update(uint16_t port_id,\n> \t+ struct rte_flow_shared_action *action,\n> \t+ const struct rte_flow_action *update,\n> \t+ struct rte_flow_error *error);\n> \t+\n> \t+/**\n> \t+ * @warning\n> \t+ * @b EXPERIMENTAL: this API may change without prior notice.\n> \t+ *\n> \t+ * Query the shared action by handle.\n> \t+ *\n> \t+ * This function allows retrieving action-specific data such as counters.\n> \t+ * Data is gathered by special action which may be present/referenced\n> in\n> \t+ * more than one flow rule definition.\n> \t+ *\n> \t+ * \\see RTE_FLOW_ACTION_TYPE_COUNT\n> \t+ *\n> \t+ * @param port_id\n> \t+ * Port identifier of Ethernet device.\n> \t+ * @param[in] action\n> \t+ * Handle for the shared action to query.\n> \t+ * @param[in, out] data\n> \t+ * Pointer to storage for the associated query data type.\n> \t+ * @param[out] error\n> \t+ * Perform verbose error reporting if not NULL. PMDs initialize this\n> \t+ * structure in case of error only.\n> \t+ *\n> \t+ * @return\n> \t+ * 0 on success, a negative errno value otherwise and rte_errno is set.\n> \t+ */\n> \t+__rte_experimental\n> \t+int\n> \t+rte_flow_shared_action_query(uint16_t port_id,\n> \t+ const struct rte_flow_shared_action *action,\n> \t+ void *data,\n> \t+ struct rte_flow_error *error);\n> \t+\n> \t #ifdef __cplusplus\n> \t }\n> \t #endif\n> \tdiff --git a/lib/librte_ethdev/rte_flow_driver.h\n> b/lib/librte_ethdev/rte_flow_driver.h\n> \tindex 881cc469b7..a2cae1b53c 100644\n> \t--- a/lib/librte_ethdev/rte_flow_driver.h\n> \t+++ b/lib/librte_ethdev/rte_flow_driver.h\n> \t@@ -107,6 +107,28 @@ struct rte_flow_ops {\n> \t void **context,\n> \t uint32_t nb_contexts,\n> \t struct rte_flow_error *err);\n> \t+ /** See rte_flow_shared_action_create() */\n> \t+ struct rte_flow_shared_action *(*shared_action_create)\n> \t+ (struct rte_eth_dev *dev,\n> \t+ const struct rte_flow_action *action,\n> \t+ struct rte_flow_error *error);\n> \t+ /** See rte_flow_shared_action_destroy() */\n> \t+ int (*shared_action_destroy)\n> \t+ (struct rte_eth_dev *dev,\n> \t+ struct rte_flow_shared_action *shared_action,\n> \t+ struct rte_flow_error *error);\n> \t+ /** See rte_flow_shared_action_update() */\n> \t+ int (*shared_action_update)\n> \t+ (struct rte_eth_dev *dev,\n> \t+ struct rte_flow_shared_action *shared_action,\n> \t+ const struct rte_flow_action *update,\n> \t+ struct rte_flow_error *error);\n> \t+ /** See rte_flow_shared_action_query() */\n> \t+ int (*shared_action_query)\n> \t+ (struct rte_eth_dev *dev,\n> \t+ const struct rte_flow_shared_action *shared_action,\n> \t+ void *data,\n> \t+ struct rte_flow_error *error);\n> \t };\n> \n> \t /**\n> \t--\n> \t2.26.2\n> \n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 800F5A04C7;\n\tTue, 15 Sep 2020 13:51:08 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3D9481BE8E;\n\tTue, 15 Sep 2020 13:51:08 +0200 (CEST)", "from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com\n [216.228.121.143]) by dpdk.org (Postfix) with ESMTP id 9C652E07\n for <dev@dpdk.org>; Tue, 15 Sep 2020 13:51:06 +0200 (CEST)", "from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by\n hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA)\n id <B5f60aa1b0002>; Tue, 15 Sep 2020 04:48:43 -0700", "from hqmail.nvidia.com ([172.20.161.6])\n by hqpgpgate101.nvidia.com (PGP Universal service);\n Tue, 15 Sep 2020 04:51:04 -0700", "from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 15 Sep\n 2020 11:50:53 +0000", "from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176)\n by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id\n 15.0.1473.3 via Frontend Transport; Tue, 15 Sep 2020 11:50:53 +0000", "from MWHPR1201MB2525.namprd12.prod.outlook.com\n (2603:10b6:300:e0::19) by MW3PR12MB4460.namprd12.prod.outlook.com\n (2603:10b6:303:2f::7) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Tue, 15 Sep\n 2020 11:50:51 +0000", "from MWHPR1201MB2525.namprd12.prod.outlook.com\n ([fe80::3ccb:ec09:9346:54b1]) by MWHPR1201MB2525.namprd12.prod.outlook.com\n ([fe80::3ccb:ec09:9346:54b1%7]) with mapi id 15.20.3370.019; Tue, 15 Sep 2020\n 11:50:51 +0000" ], "X-PGP-Universal": "processed;\n by hqpgpgate101.nvidia.com on Tue, 15 Sep 2020 04:51:04 -0700", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=KSbxv+Ka2HDJmc3q2lY+XOeWTbsRvEkqZlm6euW+rbtFnirWBDgDjMySXwundGQ1SyLT0RLA5lSdOaQ3MZATK6+MuQ+vu0G+ZpDcreaBzR20VMZQtpRZ1wobiTsqL5ABv9JObUhv5fW/UNNo04tuo/CtYTFgJVgkUPIUtAgsH5QU7TquFDE75osTZf7IICb/uL4hRp5w/8mCjLlmH++L6hP8kRMGBdNOhHFIBVoT2K89bIztlTKObWn3m1ms3oiEalODVLnvQwMHxX5RuvVBCgLvZYuz3cxtGHo8IYDhUu4+KaGFdHImofLXwb55ov6M7A0IrnQmQRMsPSoy7sbZhw==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=rCcsGFbwRUjzY901DedOu2MvrGsxU2rsLSuv0t9wEX0=;\n b=CKKSPzPw4YgIbJ7OqkESRcl2oiaN23Pf+9OU87oL4bB+BmAbPFFdACWDBqWJEXjiN21hMoupnlbSejoOFMUXX1NGplx2N5EqY5FhNyVs5EM6IChvawqze5BTstlD5Zau/bB1CBNkbsFrjklkanVYVWTeJrb2pRTz9a71yE1EsH1VzmkCVQ6C45yGzLRJztwW3TWpEeXV168J6KYUCfwhnk6lokYnr6ghsRxycTzguQ3GcW2UKEloSPGy+OWZKoBFX21dvDuESORVdCeIOnfNrr5j29e2MLguTLOm8gwHHdlHIpjRTymr6Q1m+HipBVgbXGkDUWYHwXIiiEz1t66oSA==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none", "From": "Andrey Vesnovaty <andreyv@nvidia.com>", "To": "Ajit Khaparde <ajit.khaparde@broadcom.com>, NBU-Contact-Thomas Monjalon\n <thomas@monjalon.net>, Ori Kam <orika@nvidia.com>, Slava Ovsiienko\n <viacheslavo@nvidia.com>, \"jerinj@marvell.com\" <jerinj@marvell.com>, \"Andrew\n Rybchenko\" <arybchenko@solarflare.com>", "CC": "dpdk-dev <dev@dpdk.org>, \"jer@marvell.com\" <jer@marvell.com>, Jerin Jacob\n <jerinjacobk@gmail.com>, NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>, Stephen Hemminger\n <stephen@networkplumber.org>, Bruce Richardson <bruce.richardson@intel.com>,\n Ori Kam <orika@mellanox.com>, Viacheslav Ovsiienko\n <viacheslavo@mellanox.com>, \"andrey.vesnovaty@gmail.com\"\n <andrey.vesnovaty@gmail.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman\n <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>", "Thread-Topic": "[dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "Thread-Index": "AQHWac+xdJPDU/OvwEKNpRAY5MGzB6lkgkQAgAVRfgA=", "Date": "Tue, 15 Sep 2020 11:50:51 +0000", "Message-ID": "\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>", "In-Reply-To": "\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "broadcom.com; dkim=none (message not signed)\n header.d=none;broadcom.com; dmarc=none action=none header.from=nvidia.com;", "x-originating-ip": "[87.71.167.214]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "2b60b7ba-1c91-4547-49d6-08d8596d9880", "x-ms-traffictypediagnostic": "MW3PR12MB4460:", "x-ld-processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MW3PR12MB4460714F493919B265FEACA2DB200@MW3PR12MB4460.namprd12.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:2331;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n 1uChMnGEid9oBmRFkX6zkTgE8zQh+lg/QfbeGBpC6KgfIe+Ffy/nmpn136k+c10SSsNzttEjwJcgW7pdeqFSImOIAx/oRCDqNq1JBeIS3s8DpiQHlkvSvEcY8cpoKR+IEDacKf/C308D8DIfUf3UnWRjpKLf5VMciw5txwWbny+L8eUT6YcIHzKi3/I8iRWbX9DSbtwh9VQz0kbhH/v6eBO3qJDkcq8vxUW3Z9ARQ3N1q2A+fZ50IyGl8nb4G4/70KTmZZNurfeCA3RpaNBuneh2Hr1NTH9gVR7yhFDv8wy2el93+PrbzZOnr2ZunEHpAZGxl4PmGd16v6nuGRswmQ==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MWHPR1201MB2525.namprd12.prod.outlook.com; PTR:;\n CAT:NONE;\n SFS:(4636009)(366004)(396003)(376002)(346002)(39860400002)(136003)(6506007)(478600001)(4326008)(8936002)(316002)(86362001)(53546011)(76116006)(83380400001)(54906003)(66946007)(66476007)(64756008)(66446008)(30864003)(107886003)(110136005)(66556008)(26005)(186003)(8676002)(71200400001)(9686003)(2906002)(33656002)(7416002)(5660300002)(55016002)(52536014)(7696005)(579004);\n DIR:OUT; SFP:1101;", "x-ms-exchange-antispam-messagedata": "\n OV4opXCuJ4dxgbEZKmpfySfFSISfUH6YK1pPHgdijXBSTk0Xn7ItOYWfRrKERGAv9zrQdyvzQEP5fXT8t3zvI76QPIZ8DN9rSrdCXAzIKab5aZGEVhwH0ruCwhf6Jm5cKeN1cEFd6TZ2FklmM5XPU9YLOKFyNy2vcKiQ/dg/K6B+2CU0YiFEi5Nyaf8y9Y0H1Lz205uNX8BgOHEbDegv5OMeDHmjtCxZXQErm0NY+ZFGavDiJffL+i4sITD39SBeGqYtVJGvUF7HMpR9j9Fq9kI8fZTmfU6+Jt9lRFMjOb58BHlC+viSTxYb0sbG6mUk6E0Z+eqXagstNqakn3WgaPDe+Cms08F/6tX5blsduiDDyYKNKkgGP+AK9CJRjv+RCEj13n9URybMDfk1Ird5D03vENjd2tRePJJg35Tmt7FTy/EnYjbTpPuyQtDMJ46zZ6yL9xQCVl/KqGVTpxRFTS11bCHRXEucrrFN0OQ0DGY24sGR/eXos7MfllLVQwNKYgu2g1RdGnvYin7bvC3apypXpu/ov2iiBmhreYwOO81YqQdqNVzi3gneahc29mNn6ZhhcuNoJnteNX17MC9d3SWvC1l02a1Xpi3EsY25aSjjNZaxt95+kx3nNRomsAoKmoKoKAUTK3K7DzXRyUw2ew==", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "\n MWHPR1201MB2525.namprd12.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 2b60b7ba-1c91-4547-49d6-08d8596d9880", "X-MS-Exchange-CrossTenant-originalarrivaltime": "15 Sep 2020 11:50:51.5567 (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": "\n C9Phjx3GfXu1QmVOoq5Q+pQH8a4H7jdDKKgPH852M6a34ycXlZdxFoomoJcRP1lczUysBja5Or7/dl8HlNMdnw==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MW3PR12MB4460", "X-OriginatorOrg": "Nvidia.com", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;\n t=1600170523; bh=rCcsGFbwRUjzY901DedOu2MvrGsxU2rsLSuv0t9wEX0=;\n h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature:\n ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:\n Thread-Index:Date:Message-ID:References:In-Reply-To:\n Accept-Language:Content-Language:X-MS-Has-Attach:\n X-MS-TNEF-Correlator:authentication-results:x-originating-ip:\n x-ms-publictraffictype:x-ms-office365-filtering-correlation-id:\n x-ms-traffictypediagnostic:x-ld-processed:\n x-ms-exchange-transport-forked:x-microsoft-antispam-prvs:\n x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck:\n x-microsoft-antispam:x-microsoft-antispam-message-info:\n x-forefront-antispam-report:x-ms-exchange-antispam-messagedata:\n Content-Type:Content-Transfer-Encoding:MIME-Version:\n X-MS-Exchange-CrossTenant-AuthAs:\n X-MS-Exchange-CrossTenant-AuthSource:\n X-MS-Exchange-CrossTenant-Network-Message-Id:\n X-MS-Exchange-CrossTenant-originalarrivaltime:\n X-MS-Exchange-CrossTenant-fromentityheader:\n X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype:\n X-MS-Exchange-CrossTenant-userprincipalname:\n X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg;\n b=pRzirKwDjtvq2fsomlruVATh1wHcnVu9RrACCv/dyS2n6LeLiPy4BGMNu+95q1sV/\n f/PL8eFUllOdsImFas4na5YAK3txwBMnlQlqE65KCYnxl4X3UfTkDJjBiP3ZQjukgy\n yJW2SYIdVpDUTvNpLt7Be6P5waNFw5pQssbpO6KBC+4CpV5BujEmAv2T33PuqY7p00\n Y4SOS7/iUER9Y33qyOHviAiS5WTp7ETShb+jTZDIOzUo49w+2eeKb6+HrE8pkU/+/r\n Xd27BX/N/uZGpSi+WSbA3ygN/mcHeDTYxEwHRGSxYs+5HQ/4jlsxgZRvnH8SqGXlEW\n 8bwj32YqRzedQ==", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 118771, "web_url": "https://patches.dpdk.org/comment/118771/", "msgid": "<CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com", "date": "2020-09-15T15:49:07", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 501, "url": "https://patches.dpdk.org/api/people/501/?format=api", "name": "Ajit Khaparde", "email": "ajit.khaparde@broadcom.com" }, "content": "On Tue, Sep 15, 2020 at 4:51 AM Andrey Vesnovaty <andreyv@nvidia.com> wrote:\n\n> Hi Ajit, PSB.\n>\n> Thanks,\n> Andrey\n>\n> > -----Original Message-----\n> > From: Ajit Khaparde <ajit.khaparde@broadcom.com>\n> > Sent: Saturday, September 12, 2020 5:18 AM\n> > To: Andrey Vesnovaty <andreyv@mellanox.com>\n> > Cc: dpdk-dev <dev@dpdk.org>; jer@marvell.com; Jerin Jacob\n> > <jerinjacobk@gmail.com>; NBU-Contact-Thomas Monjalon\n> > <thomas@monjalon.net>; Ferruh Yigit <ferruh.yigit@intel.com>; Stephen\n> > Hemminger <stephen@networkplumber.org>; Bruce Richardson\n> > <bruce.richardson@intel.com>; Ori Kam <orika@mellanox.com>; Viacheslav\n> > Ovsiienko <viacheslavo@mellanox.com>; andrey.vesnovaty@gmail.com; Ray\n> > Kinsella <mdr@ashroe.eu>; Neil Horman <nhorman@tuxdriver.com>; Andrew\n> > Rybchenko <arybchenko@solarflare.com>\n> > Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> >\n> >\n> >\n> > On Wed, Jul 8, 2020 at 2:40 PM Andrey Vesnovaty <andreyv@mellanox.com\n> > <mailto:andreyv@mellanox.com> > wrote:\n> >\n> >\n> > From: Andrey Vesnovaty <andrey.vesnovaty@gmail.com\n> > <mailto:andrey.vesnovaty@gmail.com> >\n> >\n> > This commit introduces extension of DPDK flow action API enabling\n> > sharing of single rte_flow_action in multiple flows. The API\n> intended for\n> > PMDs where multiple HW offloaded flows can reuse the same HW\n> > essence/object representing flow action and modification of such an\n> > essence/object effects all the rules using it.\n> >\n> > Motivation and example\n> > ===\n> > Adding or removing one or more queues to RSS used by multiple flow\n> > rules\n> > imposes per rule toll for current DPDK flow API; the scenario\n> requires\n> > for each flow sharing cloned RSS action:\n> > - call `rte_flow_destroy()`\n> > - call `rte_flow_create()` with modified RSS action\n> >\n> > API for sharing action and its in-place update benefits:\n> > - reduce the overhead of multiple RSS flow rules reconfiguration\n> > - optimize resource utilization by sharing action across of\n> multiple\n> > flows\n> >\n> > Change description\n> > ===\n> >\n> > Shared action\n> > ===\n> > In order to represent flow action shared by multiple flows new\n> action\n> > type RTE_FLOW_ACTION_TYPE_SHARED is introduced (see `enum\n> > rte_flow_action_type`).\n> > Actually the introduced API decouples action from any specific\n> flow and\n> > enables sharing of single action by its handle across multiple\n> flows.\n> >\n> > Shared action create/use/destroy\n> > ===\n> > Shared action may be reused by some or none flow rules at any given\n> > moment, i.e. shared action reside outside of the context of any\n> flow.\n> > Shared action represent HW resources/objects used for action\n> > offloading\n> > implementation.\n> > API for shared action create (see\n> `rte_flow_shared_action_create()`):\n> > - should allocate HW resources and make related initializations\n> required\n> > for shared action implementation.\n> > - make necessary preparations to maintain shared access to\n> > the action resources, configuration and state.\n> > API for shared action destroy (see\n> `rte_flow_shared_action_destroy()`)\n> > should release HW resources and make related cleanups required for\n> > shared\n> > action implementation.\n> >\n> > In order to share some flow action reuse the handle of type\n> > `struct rte_flow_shared_action` returned by\n> > rte_flow_shared_action_create() as a `conf` field of\n> > `struct rte_flow_action` (see \"example\" section).\n> >\n> > If some shared action not used by any flow rule all resources\n> allocated\n> > by the shared action can be released by\n> > rte_flow_shared_action_destroy()\n> > (see \"example\" section). The shared action handle passed as\n> argument\n> > to\n> > destroy API should not be used any further i.e. result of the\n> usage is\n> > undefined.\n> >\n> > Shared action re-configuration\n> > ===\n> > Shared action behavior defined by its configuration can be updated\n> via\n> > rte_flow_shared_action_update() (see \"example\" section). The shared\n> > action update operation modifies HW related resources/objects\n> > allocated\n> > on the action creation. The number of operations performed by the\n> > update\n> > operation should not be dependent on number of flows sharing the\n> > related\n> > action. On return of shared action update API action behavior\n> should be\n> > according to updated configuration for all flows sharing the\n> action.\n> >\n> > Shared action query\n> > ===\n> > Provide separate API to query shared action sate (see\n> > rte_flow_shared_action_update()). Taking a counter as an example:\n> > query\n> > returns value aggregating all counter increments across all flow\n> rules\n> > sharing the counter.\n> >\n> > PMD support\n> > ===\n> > The support of introduced API is pure PMD specific design and\n> > responsibility for each action type (see struct rte_flow_ops).\n> >\n> > testpmd\n> > ===\n> > In order to utilize introduced API testpmd cli may implement\n> following\n> > extension\n> > create/update/destroy/query shared action accordingly\n> >\n> > flow shared_action create {port_id} [index] {action}\n> > flow shared_action update {port_id} {index} {action}\n> > flow shared_action destroy {port_id} {index}\n> > flow shared_action query {port_id} {index}\n> >\n> > testpmd example\n> > ===\n> >\n> > configure rss to queues 1 & 2\n> >\n> > testpmd> flow shared_action create 0 100 rss 1 2\n> >\n> > create flow rule utilizing shared action\n> >\n> > testpmd> flow create 0 ingress \\\n> > pattern eth dst is 0c:42:a1:15:fd:ac / ipv6 / tcp / end \\\n> > actions shared 100 end / end\n> >\n> > add 2 more queues\n> >\n> > testpmd> flow shared_action modify 0 100 rss 1 2 3 4\n> >\n> > example\n> > ===\n> >\n> > struct rte_flow_action actions[2];\n> > struct rte_flow_action action;\n> > /* skipped: initialize action */\n> > struct rte_flow_shared_action *handle =\n> > rte_flow_shared_action_create(\n> > port_id, &action, &error);\n> > actions[0].type = RTE_FLOW_ACTION_TYPE_SHARED;\n> > actions[0].conf = handle;\n> > actions[1].type = RTE_FLOW_ACTION_TYPE_END;\n> > /* skipped: init attr0 & pattern0 args */\n> > struct rte_flow *flow0 = rte_flow_create(port_id, &attr0, pattern0,\n> > actions, error);\n> > /* create more rules reusing shared action */\n> > struct rte_flow *flow1 = rte_flow_create(port_id, &attr1, pattern1,\n> > actions, error);\n> > /* skipped: for flows 2 till N */\n> > struct rte_flow *flowN = rte_flow_create(port_id, &attrN, patternN,\n> > actions, error);\n> > /* update shared action */\n> > struct rte_flow_action updated_action;\n> > /*\n> > * skipped: initialize updated_action according to desired action\n> > * configuration change\n> > */\n> > rte_flow_shared_action_update(port_id, handle, &updated_action,\n> > error);\n> > /*\n> > * from now on all flows 1 till N will act according to\n> configuration of\n> > * updated_action\n> > */\n> > /* skipped: destroy all flows 1 till N */\n> > rte_flow_shared_action_destroy(port_id, handle, error);\n> >\n> > Signed-off-by: Andrey Vesnovaty <andreyv@mellanox.com\n> > <mailto:andreyv@mellanox.com> >\n> > ---\n> > lib/librte_ethdev/rte_ethdev_version.map | 6 +\n> > lib/librte_ethdev/rte_flow.c | 81 +++++++++++++\n> > lib/librte_ethdev/rte_flow.h | 148\n> ++++++++++++++++++++++-\n> > lib/librte_ethdev/rte_flow_driver.h | 22 ++++\n> > 4 files changed, 256 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/lib/librte_ethdev/rte_ethdev_version.map\n> > b/lib/librte_ethdev/rte_ethdev_version.map\n> > index 7155056045..119d84976a 100644\n> > --- a/lib/librte_ethdev/rte_ethdev_version.map\n> > +++ b/lib/librte_ethdev/rte_ethdev_version.map\n> > @@ -241,4 +241,10 @@ EXPERIMENTAL {\n> > __rte_ethdev_trace_rx_burst;\n> > __rte_ethdev_trace_tx_burst;\n> > rte_flow_get_aged_flows;\n> > +\n> > + # added in 20.08\n> > + rte_flow_shared_action_create;\n> > + rte_flow_shared_action_destroy;\n> > + rte_flow_shared_action_update;\n> > + rte_flow_shared_action_query;\n> > };\n> > diff --git a/lib/librte_ethdev/rte_flow.c\n> b/lib/librte_ethdev/rte_flow.c\n> > index 1685be5f73..0ac4d31a13 100644\n> > --- a/lib/librte_ethdev/rte_flow.c\n> > +++ b/lib/librte_ethdev/rte_flow.c\n> > @@ -1250,3 +1250,84 @@ rte_flow_get_aged_flows(uint16_t port_id,\n> > void **contexts,\n> > RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > NULL, rte_strerror(ENOTSUP));\n> > }\n> > +\n> > +struct rte_flow_shared_action *\n> > +rte_flow_shared_action_create(uint16_t port_id,\n> > + const struct rte_flow_action *action,\n> >\n> >\n> > It will be good to have an attributes argument here.\n> > Some hardware devices may have ingress and egress resource pools.\n> > So a 'direction' attribute can help share the resource effectively.\n>\n> I understand the idea of HW ingress/egress resource separation.\n> Unfortunately on shared action creation it's not defined if it will be used\n> in ingress or egress flow or both.\n> Is the suggestion is to restrict usage of shared action to single\n> direction?\n>\nIn a way, it is more to add flexibility to this proposal.\nSpecifying the direction explicitly is better than PMD parsing the actions\nand determining if it is for ingress or egress.\n\nIf hardware does not have specific pools for either ingress or egress,\nthe PMD can ignore the attribute.\nSo it will be upto the PMD and the underlying hardware to use the\ndirection attribute - if necessary.\n\n\n> >\n> >\n> >\n> > + struct rte_flow_error *error)\n> > +{\n> > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > + struct rte_flow_shared_action *shared_action;\n> > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> > +\n> > + if (unlikely(!ops))\n> > + return NULL;\n> > + if (likely(!!ops->shared_action_create)) {\n> > + shared_action = ops->shared_action_create(dev,\n> action,\n> > error);\n> > + if (shared_action == NULL)\n> > + flow_err(port_id, -rte_errno, error);\n> > + return shared_action;\n> > + }\n> > + rte_flow_error_set(error, ENOSYS,\n> > RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > + NULL, rte_strerror(ENOSYS));\n> > + return NULL;\n> > +}\n> > +\n> > +int\n> > +rte_flow_shared_action_destroy(uint16_t port_id,\n> > + struct rte_flow_shared_action\n> *action,\n> > + struct rte_flow_error *error)\n> > +{\n> > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> > +\n> > + if (unlikely(!ops))\n> > + return -rte_errno;\n> > + if (likely(!!ops->shared_action_destroy))\n> > + return flow_err(port_id,\n> > + ops->shared_action_destroy(dev,\n> action, error),\n> > + error);\n> > + return rte_flow_error_set(error, ENOSYS,\n> > + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > + NULL, rte_strerror(ENOSYS));\n> > +}\n> > +\n> > +int\n> > +rte_flow_shared_action_update(uint16_t port_id,\n> > + struct rte_flow_shared_action\n> *action,\n> > + const struct rte_flow_action *update,\n> > + struct rte_flow_error *error)\n> > +{\n> > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> > +\n> > + if (unlikely(!ops))\n> > + return -rte_errno;\n> > + if (likely(!!ops->shared_action_update))\n> > + return flow_err(port_id,\n> ops->shared_action_update(dev,\n> > action,\n> > + update, error),\n> > + error);\n> > + return rte_flow_error_set(error, ENOSYS,\n> > + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > + NULL, rte_strerror(ENOSYS));\n> > +}\n> > +\n> > +int\n> > +rte_flow_shared_action_query(uint16_t port_id,\n> > + const struct rte_flow_shared_action\n> *action,\n> > + void *data,\n> > + struct rte_flow_error *error)\n> > +{\n> > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> > +\n> > + if (unlikely(!ops))\n> > + return -rte_errno;\n> > + if (likely(!!ops->shared_action_query))\n> > + return flow_err(port_id,\n> ops->shared_action_query(dev,\n> > action,\n> > + data, error),\n> > + error);\n> > + return rte_flow_error_set(error, ENOSYS,\n> > + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > + NULL, rte_strerror(ENOSYS));\n> > +}\n> > diff --git a/lib/librte_ethdev/rte_flow.h\n> b/lib/librte_ethdev/rte_flow.h\n> > index b0e4199192..257456b14a 100644\n> > --- a/lib/librte_ethdev/rte_flow.h\n> > +++ b/lib/librte_ethdev/rte_flow.h\n> > @@ -1681,7 +1681,8 @@ enum rte_flow_action_type {\n> > /**\n> > * Enables counters for this flow rule.\n> > *\n> > - * These counters can be retrieved and reset through\n> > rte_flow_query(),\n> > + * These counters can be retrieved and reset through\n> > rte_flow_query() or\n> > + * rte_flow_shared_action_query() if the action provided\n> via\n> > handle,\n> > * see struct rte_flow_query_count.\n> > *\n> > * See struct rte_flow_action_count.\n> > @@ -2099,6 +2100,14 @@ enum rte_flow_action_type {\n> > * see enum RTE_ETH_EVENT_FLOW_AGED\n> > */\n> > RTE_FLOW_ACTION_TYPE_AGE,\n> > +\n> > + /**\n> > + * Describes action shared a cross multiple flow rules.\n> > + *\n> > + * Enables multiple rules reference the same action by\n> handle (see\n> > + * struct rte_flow_shared_action).\n> > + */\n> > + RTE_FLOW_ACTION_TYPE_SHARED,\n> > };\n> >\n> > /**\n> > @@ -2660,6 +2669,20 @@ struct rte_flow_action_set_dscp {\n> > uint8_t dscp;\n> > };\n> >\n> > +\n> > +/**\n> > + * RTE_FLOW_ACTION_TYPE_SHARED\n> > + *\n> > + * Opaque type returned after successfully creating a shared\n> action.\n> > + *\n> > + * This handle can be used to manage and query the related action:\n> > + * - share it a cross multiple flow rules\n> > + * - update action configuration\n> > + * - query action data\n> > + * - destroy action\n> > + */\n> > +struct rte_flow_shared_action;\n> > +\n> > /* Mbuf dynamic field offset for metadata. */\n> > extern int32_t rte_flow_dynf_metadata_offs;\n> >\n> > @@ -3324,6 +3347,129 @@ int\n> > rte_flow_get_aged_flows(uint16_t port_id, void **contexts,\n> > uint32_t nb_contexts, struct\n> rte_flow_error *error);\n> >\n> > +/**\n> > + * @warning\n> > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > + *\n> > + * Create shared action for reuse in multiple flow rules.\n> > + *\n> > + * @param[in] port_id\n> > + * The port identifier of the Ethernet device.\n> > + * @param[in] action\n> > + * Action configuration for shared action creation.\n> > + * @param[out] error\n> > + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> > + * structure in case of error only.\n> > + * @return\n> > + * A valid handle in case of success, NULL otherwise and\n> rte_errno is\n> > set\n> > + * to one of the error codes defined:\n> > + * - (ENOSYS) if underlying device does not support this\n> functionality.\n> > + * - (EIO) if underlying device is removed.\n> > + * - (EINVAL) if *action* invalid.\n> > + * - (ENOTSUP) if *action* valid but unsupported.\n> > + */\n> > +__rte_experimental\n> > +struct rte_flow_shared_action *\n> > +rte_flow_shared_action_create(uint16_t port_id,\n> > + const struct rte_flow_action *action,\n> > + struct rte_flow_error *error);\n> > +\n> > +/**\n> > + * @warning\n> > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > + *\n> > + * Destroys the shared action by handle.\n> > + *\n> > + * @param[in] port_id\n> > + * The port identifier of the Ethernet device.\n> > + * @param[in] action\n> > + * Handle for the shared action to be destroyed.\n> > + * @param[out] error\n> > + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> > + * structure in case of error only.\n> > + * @return\n> > + * - (0) if success.\n> > + * - (-ENOSYS) if underlying device does not support this\n> functionality.\n> > + * - (-EIO) if underlying device is removed.\n> > + * - (-ENOENT) if action pointed by *action* handle was not\n> found.\n> > + * - (-ETOOMANYREFS) if action pointed by *action* handle still\n> used\n> > by one or\n> > + * more rules\n> > + * rte_errno is also set.\n> > + */\n> > +__rte_experimental\n> > +int\n> > +rte_flow_shared_action_destroy(uint16_t port_id,\n> > + struct rte_flow_shared_action\n> *action,\n> > + struct rte_flow_error *error);\n> > +\n> > +/**\n> > + * @warning\n> > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > + *\n> > + * Updates inplace the shared action configuration pointed by\n> *action*\n> > handle\n> > + * with the configuration provided as *update* argument.\n> > + * The update of the shared action configuration effects all flow\n> rules\n> > reusing\n> > + * the action via handle.\n> > + *\n> > + * @param[in] port_id\n> > + * The port identifier of the Ethernet device.\n> > + * @param[in] action\n> > + * Handle for the shared action to be updated.\n> > + * @param[in] update\n> > + * Action specification used to modify the action pointed by\n> handle.\n> > + * *update* should be of same type with the action pointed by\n> the\n> > *action*\n> > + * handle argument, otherwise considered as invalid.\n> > + * @param[out] error\n> > + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> > + * structure in case of error only.\n> > + * @return\n> > + * - (0) if success.\n> > + * - (-ENOSYS) if underlying device does not support this\n> functionality.\n> > + * - (-EIO) if underlying device is removed.\n> > + * - (-EINVAL) if *update* invalid.\n> > + * - (-ENOTSUP) if *update* valid but unsupported.\n> > + * - (-ENOENT) if action pointed by *ctx* was not found.\n> > + * rte_errno is also set.\n> > + */\n> > +__rte_experimental\n> > +int\n> > +rte_flow_shared_action_update(uint16_t port_id,\n> > + struct rte_flow_shared_action\n> *action,\n> > + const struct rte_flow_action *update,\n> > + struct rte_flow_error *error);\n> > +\n> > +/**\n> > + * @warning\n> > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > + *\n> > + * Query the shared action by handle.\n> > + *\n> > + * This function allows retrieving action-specific data such as\n> counters.\n> > + * Data is gathered by special action which may be\n> present/referenced\n> > in\n> > + * more than one flow rule definition.\n> > + *\n> > + * \\see RTE_FLOW_ACTION_TYPE_COUNT\n> > + *\n> > + * @param port_id\n> > + * Port identifier of Ethernet device.\n> > + * @param[in] action\n> > + * Handle for the shared action to query.\n> > + * @param[in, out] data\n> > + * Pointer to storage for the associated query data type.\n> > + * @param[out] error\n> > + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> > + * structure in case of error only.\n> > + *\n> > + * @return\n> > + * 0 on success, a negative errno value otherwise and rte_errno\n> is set.\n> > + */\n> > +__rte_experimental\n> > +int\n> > +rte_flow_shared_action_query(uint16_t port_id,\n> > + const struct rte_flow_shared_action\n> *action,\n> > + void *data,\n> > + struct rte_flow_error *error);\n> > +\n> > #ifdef __cplusplus\n> > }\n> > #endif\n> > diff --git a/lib/librte_ethdev/rte_flow_driver.h\n> > b/lib/librte_ethdev/rte_flow_driver.h\n> > index 881cc469b7..a2cae1b53c 100644\n> > --- a/lib/librte_ethdev/rte_flow_driver.h\n> > +++ b/lib/librte_ethdev/rte_flow_driver.h\n> > @@ -107,6 +107,28 @@ struct rte_flow_ops {\n> > void **context,\n> > uint32_t nb_contexts,\n> > struct rte_flow_error *err);\n> > + /** See rte_flow_shared_action_create() */\n> > + struct rte_flow_shared_action *(*shared_action_create)\n> > + (struct rte_eth_dev *dev,\n> > + const struct rte_flow_action *action,\n> > + struct rte_flow_error *error);\n> > + /** See rte_flow_shared_action_destroy() */\n> > + int (*shared_action_destroy)\n> > + (struct rte_eth_dev *dev,\n> > + struct rte_flow_shared_action *shared_action,\n> > + struct rte_flow_error *error);\n> > + /** See rte_flow_shared_action_update() */\n> > + int (*shared_action_update)\n> > + (struct rte_eth_dev *dev,\n> > + struct rte_flow_shared_action *shared_action,\n> > + const struct rte_flow_action *update,\n> > + struct rte_flow_error *error);\n> > + /** See rte_flow_shared_action_query() */\n> > + int (*shared_action_query)\n> > + (struct rte_eth_dev *dev,\n> > + const struct rte_flow_shared_action\n> *shared_action,\n> > + void *data,\n> > + struct rte_flow_error *error);\n> > };\n> >\n> > /**\n> > --\n> > 2.26.2\n> >\n> >\n>\n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 336E8A04C7;\n\tTue, 15 Sep 2020 17:49:29 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F11001C0DC;\n\tTue, 15 Sep 2020 17:49:27 +0200 (CEST)", "from mail-ot1-f68.google.com (mail-ot1-f68.google.com\n [209.85.210.68]) by dpdk.org (Postfix) with ESMTP id 7B7F71C0D2\n for <dev@dpdk.org>; Tue, 15 Sep 2020 17:49:25 +0200 (CEST)", "by mail-ot1-f68.google.com with SMTP id w25so3673249otk.8\n for <dev@dpdk.org>; Tue, 15 Sep 2020 08:49:25 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=X0tHOxS4Mf7d3Z1zHVxvKaCcFgSKxBn3ekpytG9hImw=;\n b=GcnnBg2XOz77WF4B64rX3m0OPw+ye1N/Ylp1c2kAmniTzVVYi9V1WNk8xJXwaWbo96\n ixAb9VB/dk28mTyUDdLLSn2BFSpZkRG/m20MZ9YklI7c129cdZrewTJjYHzMHGsyR9JC\n e9h9bvW3Oxa615VOSpMWDPxUUtGrCHTe+RLlc=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=X0tHOxS4Mf7d3Z1zHVxvKaCcFgSKxBn3ekpytG9hImw=;\n b=iFWclug6Z6YlaGq3vOJCCJYuWjtXVpQ79lLzWPTSi+Z1wCMz5sBKkUR7UM5zg2sdDc\n psPYe6IW1gnbtF8oqNZjag3Ki5+v81SYvEGgtsN8IH/6OcxSqj+xtGLYfInpAYD9C1ap\n PGequ5sl8zslyfgypXYq3c6W1mAWdy281KHpPJLV2Pui2DLZ9+6Yw7RFtwJUu9MByrkW\n QshhTXEFPNz0G8etoB7FouyFG0clB5gYIdi40JvQogPkb6leOvvtQTLskEzo4WpygvV9\n 9SLy9s57in7RchTTQJTtkvZcK2aCGRd3p5Hu5cwm2F7eyyGyodYAN+g24EyEfJvr7r4a\n KqLQ==", "X-Gm-Message-State": "AOAM531/LyORN0/0YyjMeF0CeUehjyXhk4VUq2ogjihVJaJ1C8+tNA5o\n WX7TUt/LVSEUob+P2vpfyU/IWTNvi31rC8GcIA5VBA==", "X-Google-Smtp-Source": "\n ABdhPJxZaLhkd7NQrN4xM5RCQ1xd8oC85JzM39WiOeOIU7JPuf2p+hpLbOVR1B5Ck2Yv6UpNGV6SmjqqEPsqKwg46Ek=", "X-Received": "by 2002:a9d:ae7:: with SMTP id 94mr14015762otq.283.1600184964531;\n Tue, 15 Sep 2020 08:49:24 -0700 (PDT)", "MIME-Version": "1.0", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>", "In-Reply-To": "\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>", "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "Date": "Tue, 15 Sep 2020 08:49:07 -0700", "Message-ID": "\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>", "To": "Andrey Vesnovaty <andreyv@nvidia.com>", "Cc": "NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,\n Ori Kam <orika@nvidia.com>, Slava Ovsiienko <viacheslavo@nvidia.com>,\n \"jerinj@marvell.com\" <jerinj@marvell.com>,\n Andrew Rybchenko <arybchenko@solarflare.com>, dpdk-dev <dev@dpdk.org>,\n \"jer@marvell.com\" <jer@marvell.com>, Jerin Jacob <jerinjacobk@gmail.com>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Stephen Hemminger <stephen@networkplumber.org>,\n Bruce Richardson <bruce.richardson@intel.com>, Ori Kam <orika@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>,\n \"andrey.vesnovaty@gmail.com\" <andrey.vesnovaty@gmail.com>,\n Ray Kinsella <mdr@ashroe.eu>,\n Neil Horman <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>,\n Samik Gupta <samik.gupta@broadcom.com>", "Content-Type": "text/plain; charset=\"UTF-8\"", "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 118845, "web_url": "https://patches.dpdk.org/comment/118845/", "msgid": "<MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com", "date": "2020-09-16T15:52:18", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 1969, "url": "https://patches.dpdk.org/api/people/1969/?format=api", "name": "Andrey Vesnovaty", "email": "andreyv@nvidia.com" }, "content": "Hi Ajit\n\nFor shared action configuration I have following suggestion:\n \nstruct rte_flow_shared_action_conf {\n\tuint32_t no_ingress: 1;\n\tuint32_t no_egress: 1;\n};\n/*...*/\nrte_flow_shared_action_create(..., const struct rte_flow_shared_action_conf *conf, ...);\n\nWhat do you think?\n\nThanks,\nAndrey\n\n> -----Original Message-----\n> From: Ajit Khaparde <ajit.khaparde@broadcom.com>\n> Sent: Tuesday, September 15, 2020 6:49 PM\n> To: Andrey Vesnovaty <andreyv@nvidia.com>\n> Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Ori Kam\n> <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;\n> jerinj@marvell.com; Andrew Rybchenko <arybchenko@solarflare.com>; dpdk-\n> dev <dev@dpdk.org>; jer@marvell.com; Jerin Jacob <jerinjacobk@gmail.com>;\n> Ferruh Yigit <ferruh.yigit@intel.com>; Stephen Hemminger\n> <stephen@networkplumber.org>; Bruce Richardson\n> <bruce.richardson@intel.com>; Ori Kam <orika@mellanox.com>; Viacheslav\n> Ovsiienko <viacheslavo@mellanox.com>; andrey.vesnovaty@gmail.com; Ray\n> Kinsella <mdr@ashroe.eu>; Neil Horman <nhorman@tuxdriver.com>; Thomas\n> Monjalon <tmonjalon@nvidia.com>; Samik Gupta\n> <samik.gupta@broadcom.com>\n> Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> \n> \n> \n> On Tue, Sep 15, 2020 at 4:51 AM Andrey Vesnovaty <andreyv@nvidia.com\n> <mailto:andreyv@nvidia.com> > wrote:\n> \n> \n> \tHi Ajit, PSB.\n> \n> \tThanks,\n> \tAndrey\n> \n> \t> -----Original Message-----\n> \t> From: Ajit Khaparde <ajit.khaparde@broadcom.com\n> <mailto:ajit.khaparde@broadcom.com> >\n> \t> Sent: Saturday, September 12, 2020 5:18 AM\n> \t> To: Andrey Vesnovaty <andreyv@mellanox.com\n> <mailto:andreyv@mellanox.com> >\n> \t> Cc: dpdk-dev <dev@dpdk.org <mailto:dev@dpdk.org> >;\n> jer@marvell.com <mailto:jer@marvell.com> ; Jerin Jacob\n> \t> <jerinjacobk@gmail.com <mailto:jerinjacobk@gmail.com> >; NBU-\n> Contact-Thomas Monjalon\n> \t> <thomas@monjalon.net <mailto:thomas@monjalon.net> >; Ferruh\n> Yigit <ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com> >; Stephen\n> \t> Hemminger <stephen@networkplumber.org\n> <mailto:stephen@networkplumber.org> >; Bruce Richardson\n> \t> <bruce.richardson@intel.com <mailto:bruce.richardson@intel.com>\n> >; Ori Kam <orika@mellanox.com <mailto:orika@mellanox.com> >; Viacheslav\n> \t> Ovsiienko <viacheslavo@mellanox.com\n> <mailto:viacheslavo@mellanox.com> >; andrey.vesnovaty@gmail.com\n> <mailto:andrey.vesnovaty@gmail.com> ; Ray\n> \t> Kinsella <mdr@ashroe.eu <mailto:mdr@ashroe.eu> >; Neil Horman\n> <nhorman@tuxdriver.com <mailto:nhorman@tuxdriver.com> >; Andrew\n> \t> Rybchenko <arybchenko@solarflare.com\n> <mailto:arybchenko@solarflare.com> >\n> \t> Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action\n> API\n> \t>\n> \t>\n> \t>\n> \t> On Wed, Jul 8, 2020 at 2:40 PM Andrey Vesnovaty\n> <andreyv@mellanox.com <mailto:andreyv@mellanox.com>\n> \t> <mailto:andreyv@mellanox.com <mailto:andreyv@mellanox.com> >\n> > wrote:\n> \t>\n> \t>\n> \t> From: Andrey Vesnovaty <andrey.vesnovaty@gmail.com\n> <mailto:andrey.vesnovaty@gmail.com>\n> \t> <mailto:andrey.vesnovaty@gmail.com\n> <mailto:andrey.vesnovaty@gmail.com> > >\n> \t>\n> \t> This commit introduces extension of DPDK flow action API enabling\n> \t> sharing of single rte_flow_action in multiple flows. The API\n> intended for\n> \t> PMDs where multiple HW offloaded flows can reuse the same HW\n> \t> essence/object representing flow action and modification of such\n> an\n> \t> essence/object effects all the rules using it.\n> \t>\n> \t> Motivation and example\n> \t> ===\n> \t> Adding or removing one or more queues to RSS used by multiple\n> flow\n> \t> rules\n> \t> imposes per rule toll for current DPDK flow API; the scenario\n> requires\n> \t> for each flow sharing cloned RSS action:\n> \t> - call `rte_flow_destroy()`\n> \t> - call `rte_flow_create()` with modified RSS action\n> \t>\n> \t> API for sharing action and its in-place update benefits:\n> \t> - reduce the overhead of multiple RSS flow rules reconfiguration\n> \t> - optimize resource utilization by sharing action across of multiple\n> \t> flows\n> \t>\n> \t> Change description\n> \t> ===\n> \t>\n> \t> Shared action\n> \t> ===\n> \t> In order to represent flow action shared by multiple flows new\n> action\n> \t> type RTE_FLOW_ACTION_TYPE_SHARED is introduced (see `enum\n> \t> rte_flow_action_type`).\n> \t> Actually the introduced API decouples action from any specific flow\n> and\n> \t> enables sharing of single action by its handle across multiple flows.\n> \t>\n> \t> Shared action create/use/destroy\n> \t> ===\n> \t> Shared action may be reused by some or none flow rules at any\n> given\n> \t> moment, i.e. shared action reside outside of the context of any\n> flow.\n> \t> Shared action represent HW resources/objects used for action\n> \t> offloading\n> \t> implementation.\n> \t> API for shared action create (see\n> `rte_flow_shared_action_create()`):\n> \t> - should allocate HW resources and make related initializations\n> required\n> \t> for shared action implementation.\n> \t> - make necessary preparations to maintain shared access to\n> \t> the action resources, configuration and state.\n> \t> API for shared action destroy (see\n> `rte_flow_shared_action_destroy()`)\n> \t> should release HW resources and make related cleanups required\n> for\n> \t> shared\n> \t> action implementation.\n> \t>\n> \t> In order to share some flow action reuse the handle of type\n> \t> `struct rte_flow_shared_action` returned by\n> \t> rte_flow_shared_action_create() as a `conf` field of\n> \t> `struct rte_flow_action` (see \"example\" section).\n> \t>\n> \t> If some shared action not used by any flow rule all resources\n> allocated\n> \t> by the shared action can be released by\n> \t> rte_flow_shared_action_destroy()\n> \t> (see \"example\" section). The shared action handle passed as\n> argument\n> \t> to\n> \t> destroy API should not be used any further i.e. result of the usage is\n> \t> undefined.\n> \t>\n> \t> Shared action re-configuration\n> \t> ===\n> \t> Shared action behavior defined by its configuration can be updated\n> via\n> \t> rte_flow_shared_action_update() (see \"example\" section). The\n> shared\n> \t> action update operation modifies HW related resources/objects\n> \t> allocated\n> \t> on the action creation. The number of operations performed by\n> the\n> \t> update\n> \t> operation should not be dependent on number of flows sharing the\n> \t> related\n> \t> action. On return of shared action update API action behavior\n> should be\n> \t> according to updated configuration for all flows sharing the action.\n> \t>\n> \t> Shared action query\n> \t> ===\n> \t> Provide separate API to query shared action sate (see\n> \t> rte_flow_shared_action_update()). Taking a counter as an\n> example:\n> \t> query\n> \t> returns value aggregating all counter increments across all flow\n> rules\n> \t> sharing the counter.\n> \t>\n> \t> PMD support\n> \t> ===\n> \t> The support of introduced API is pure PMD specific design and\n> \t> responsibility for each action type (see struct rte_flow_ops).\n> \t>\n> \t> testpmd\n> \t> ===\n> \t> In order to utilize introduced API testpmd cli may implement\n> following\n> \t> extension\n> \t> create/update/destroy/query shared action accordingly\n> \t>\n> \t> flow shared_action create {port_id} [index] {action}\n> \t> flow shared_action update {port_id} {index} {action}\n> \t> flow shared_action destroy {port_id} {index}\n> \t> flow shared_action query {port_id} {index}\n> \t>\n> \t> testpmd example\n> \t> ===\n> \t>\n> \t> configure rss to queues 1 & 2\n> \t>\n> \t> testpmd> flow shared_action create 0 100 rss 1 2\n> \t>\n> \t> create flow rule utilizing shared action\n> \t>\n> \t> testpmd> flow create 0 ingress \\\n> \t> pattern eth dst is 0c:42:a1:15:fd:ac / ipv6 / tcp / end \\\n> \t> actions shared 100 end / end\n> \t>\n> \t> add 2 more queues\n> \t>\n> \t> testpmd> flow shared_action modify 0 100 rss 1 2 3 4\n> \t>\n> \t> example\n> \t> ===\n> \t>\n> \t> struct rte_flow_action actions[2];\n> \t> struct rte_flow_action action;\n> \t> /* skipped: initialize action */\n> \t> struct rte_flow_shared_action *handle =\n> \t> rte_flow_shared_action_create(\n> \t> port_id, &action, &error);\n> \t> actions[0].type = RTE_FLOW_ACTION_TYPE_SHARED;\n> \t> actions[0].conf = handle;\n> \t> actions[1].type = RTE_FLOW_ACTION_TYPE_END;\n> \t> /* skipped: init attr0 & pattern0 args */\n> \t> struct rte_flow *flow0 = rte_flow_create(port_id, &attr0,\n> pattern0,\n> \t> actions, error);\n> \t> /* create more rules reusing shared action */\n> \t> struct rte_flow *flow1 = rte_flow_create(port_id, &attr1,\n> pattern1,\n> \t> actions, error);\n> \t> /* skipped: for flows 2 till N */\n> \t> struct rte_flow *flowN = rte_flow_create(port_id, &attrN,\n> patternN,\n> \t> actions, error);\n> \t> /* update shared action */\n> \t> struct rte_flow_action updated_action;\n> \t> /*\n> \t> * skipped: initialize updated_action according to desired action\n> \t> * configuration change\n> \t> */\n> \t> rte_flow_shared_action_update(port_id, handle,\n> &updated_action,\n> \t> error);\n> \t> /*\n> \t> * from now on all flows 1 till N will act according to configuration\n> of\n> \t> * updated_action\n> \t> */\n> \t> /* skipped: destroy all flows 1 till N */\n> \t> rte_flow_shared_action_destroy(port_id, handle, error);\n> \t>\n> \t> Signed-off-by: Andrey Vesnovaty <andreyv@mellanox.com\n> <mailto:andreyv@mellanox.com>\n> \t> <mailto:andreyv@mellanox.com <mailto:andreyv@mellanox.com> >\n> >\n> \t> ---\n> \t> lib/librte_ethdev/rte_ethdev_version.map | 6 +\n> \t> lib/librte_ethdev/rte_flow.c | 81 +++++++++++++\n> \t> lib/librte_ethdev/rte_flow.h | 148\n> ++++++++++++++++++++++-\n> \t> lib/librte_ethdev/rte_flow_driver.h | 22 ++++\n> \t> 4 files changed, 256 insertions(+), 1 deletion(-)\n> \t>\n> \t> diff --git a/lib/librte_ethdev/rte_ethdev_version.map\n> \t> b/lib/librte_ethdev/rte_ethdev_version.map\n> \t> index 7155056045..119d84976a 100644\n> \t> --- a/lib/librte_ethdev/rte_ethdev_version.map\n> \t> +++ b/lib/librte_ethdev/rte_ethdev_version.map\n> \t> @@ -241,4 +241,10 @@ EXPERIMENTAL {\n> \t> __rte_ethdev_trace_rx_burst;\n> \t> __rte_ethdev_trace_tx_burst;\n> \t> rte_flow_get_aged_flows;\n> \t> +\n> \t> + # added in 20.08\n> \t> + rte_flow_shared_action_create;\n> \t> + rte_flow_shared_action_destroy;\n> \t> + rte_flow_shared_action_update;\n> \t> + rte_flow_shared_action_query;\n> \t> };\n> \t> diff --git a/lib/librte_ethdev/rte_flow.c\n> b/lib/librte_ethdev/rte_flow.c\n> \t> index 1685be5f73..0ac4d31a13 100644\n> \t> --- a/lib/librte_ethdev/rte_flow.c\n> \t> +++ b/lib/librte_ethdev/rte_flow.c\n> \t> @@ -1250,3 +1250,84 @@ rte_flow_get_aged_flows(uint16_t\n> port_id,\n> \t> void **contexts,\n> \t> RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t> NULL, rte_strerror(ENOTSUP));\n> \t> }\n> \t> +\n> \t> +struct rte_flow_shared_action *\n> \t> +rte_flow_shared_action_create(uint16_t port_id,\n> \t> + const struct rte_flow_action *action,\n> \t>\n> \t>\n> \t> It will be good to have an attributes argument here.\n> \t> Some hardware devices may have ingress and egress resource pools.\n> \t> So a 'direction' attribute can help share the resource effectively.\n> \n> \tI understand the idea of HW ingress/egress resource separation.\n> \tUnfortunately on shared action creation it's not defined if it will be used\n> \tin ingress or egress flow or both.\n> \tIs the suggestion is to restrict usage of shared action to single direction?\n> \n> \n> In a way, it is more to add flexibility to this proposal.\n> Specifying the direction explicitly is better than PMD parsing the actions\n> and determining if it is for ingress or egress.\n> \n> If hardware does not have specific pools for either ingress or egress,\n> the PMD can ignore the attribute.\n> So it will be upto the PMD and the underlying hardware to use the\n> direction attribute - if necessary.\n> \n> \n> \n> \n> \t>\n> \t>\n> \t>\n> \t> + struct rte_flow_error *error)\n> \t> +{\n> \t> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t> + struct rte_flow_shared_action *shared_action;\n> \t> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> \t> +\n> \t> + if (unlikely(!ops))\n> \t> + return NULL;\n> \t> + if (likely(!!ops->shared_action_create)) {\n> \t> + shared_action = ops->shared_action_create(dev, action,\n> \t> error);\n> \t> + if (shared_action == NULL)\n> \t> + flow_err(port_id, -rte_errno, error);\n> \t> + return shared_action;\n> \t> + }\n> \t> + rte_flow_error_set(error, ENOSYS,\n> \t> RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t> + NULL, rte_strerror(ENOSYS));\n> \t> + return NULL;\n> \t> +}\n> \t> +\n> \t> +int\n> \t> +rte_flow_shared_action_destroy(uint16_t port_id,\n> \t> + struct rte_flow_shared_action *action,\n> \t> + struct rte_flow_error *error)\n> \t> +{\n> \t> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> \t> +\n> \t> + if (unlikely(!ops))\n> \t> + return -rte_errno;\n> \t> + if (likely(!!ops->shared_action_destroy))\n> \t> + return flow_err(port_id,\n> \t> + ops->shared_action_destroy(dev, action, error),\n> \t> + error);\n> \t> + return rte_flow_error_set(error, ENOSYS,\n> \t> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t> + NULL, rte_strerror(ENOSYS));\n> \t> +}\n> \t> +\n> \t> +int\n> \t> +rte_flow_shared_action_update(uint16_t port_id,\n> \t> + struct rte_flow_shared_action *action,\n> \t> + const struct rte_flow_action *update,\n> \t> + struct rte_flow_error *error)\n> \t> +{\n> \t> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> \t> +\n> \t> + if (unlikely(!ops))\n> \t> + return -rte_errno;\n> \t> + if (likely(!!ops->shared_action_update))\n> \t> + return flow_err(port_id, ops->shared_action_update(dev,\n> \t> action,\n> \t> + update, error),\n> \t> + error);\n> \t> + return rte_flow_error_set(error, ENOSYS,\n> \t> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t> + NULL, rte_strerror(ENOSYS));\n> \t> +}\n> \t> +\n> \t> +int\n> \t> +rte_flow_shared_action_query(uint16_t port_id,\n> \t> + const struct rte_flow_shared_action *action,\n> \t> + void *data,\n> \t> + struct rte_flow_error *error)\n> \t> +{\n> \t> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> \t> + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> error);\n> \t> +\n> \t> + if (unlikely(!ops))\n> \t> + return -rte_errno;\n> \t> + if (likely(!!ops->shared_action_query))\n> \t> + return flow_err(port_id, ops->shared_action_query(dev,\n> \t> action,\n> \t> + data, error),\n> \t> + error);\n> \t> + return rte_flow_error_set(error, ENOSYS,\n> \t> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> \t> + NULL, rte_strerror(ENOSYS));\n> \t> +}\n> \t> diff --git a/lib/librte_ethdev/rte_flow.h\n> b/lib/librte_ethdev/rte_flow.h\n> \t> index b0e4199192..257456b14a 100644\n> \t> --- a/lib/librte_ethdev/rte_flow.h\n> \t> +++ b/lib/librte_ethdev/rte_flow.h\n> \t> @@ -1681,7 +1681,8 @@ enum rte_flow_action_type {\n> \t> /**\n> \t> * Enables counters for this flow rule.\n> \t> *\n> \t> - * These counters can be retrieved and reset through\n> \t> rte_flow_query(),\n> \t> + * These counters can be retrieved and reset through\n> \t> rte_flow_query() or\n> \t> + * rte_flow_shared_action_query() if the action provided via\n> \t> handle,\n> \t> * see struct rte_flow_query_count.\n> \t> *\n> \t> * See struct rte_flow_action_count.\n> \t> @@ -2099,6 +2100,14 @@ enum rte_flow_action_type {\n> \t> * see enum RTE_ETH_EVENT_FLOW_AGED\n> \t> */\n> \t> RTE_FLOW_ACTION_TYPE_AGE,\n> \t> +\n> \t> + /**\n> \t> + * Describes action shared a cross multiple flow rules.\n> \t> + *\n> \t> + * Enables multiple rules reference the same action by handle\n> (see\n> \t> + * struct rte_flow_shared_action).\n> \t> + */\n> \t> + RTE_FLOW_ACTION_TYPE_SHARED,\n> \t> };\n> \t>\n> \t> /**\n> \t> @@ -2660,6 +2669,20 @@ struct rte_flow_action_set_dscp {\n> \t> uint8_t dscp;\n> \t> };\n> \t>\n> \t> +\n> \t> +/**\n> \t> + * RTE_FLOW_ACTION_TYPE_SHARED\n> \t> + *\n> \t> + * Opaque type returned after successfully creating a shared\n> action.\n> \t> + *\n> \t> + * This handle can be used to manage and query the related\n> action:\n> \t> + * - share it a cross multiple flow rules\n> \t> + * - update action configuration\n> \t> + * - query action data\n> \t> + * - destroy action\n> \t> + */\n> \t> +struct rte_flow_shared_action;\n> \t> +\n> \t> /* Mbuf dynamic field offset for metadata. */\n> \t> extern int32_t rte_flow_dynf_metadata_offs;\n> \t>\n> \t> @@ -3324,6 +3347,129 @@ int\n> \t> rte_flow_get_aged_flows(uint16_t port_id, void **contexts,\n> \t> uint32_t nb_contexts, struct rte_flow_error *error);\n> \t>\n> \t> +/**\n> \t> + * @warning\n> \t> + * @b EXPERIMENTAL: this API may change without prior notice.\n> \t> + *\n> \t> + * Create shared action for reuse in multiple flow rules.\n> \t> + *\n> \t> + * @param[in] port_id\n> \t> + * The port identifier of the Ethernet device.\n> \t> + * @param[in] action\n> \t> + * Action configuration for shared action creation.\n> \t> + * @param[out] error\n> \t> + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> \t> + * structure in case of error only.\n> \t> + * @return\n> \t> + * A valid handle in case of success, NULL otherwise and\n> rte_errno is\n> \t> set\n> \t> + * to one of the error codes defined:\n> \t> + * - (ENOSYS) if underlying device does not support this\n> functionality.\n> \t> + * - (EIO) if underlying device is removed.\n> \t> + * - (EINVAL) if *action* invalid.\n> \t> + * - (ENOTSUP) if *action* valid but unsupported.\n> \t> + */\n> \t> +__rte_experimental\n> \t> +struct rte_flow_shared_action *\n> \t> +rte_flow_shared_action_create(uint16_t port_id,\n> \t> + const struct rte_flow_action *action,\n> \t> + struct rte_flow_error *error);\n> \t> +\n> \t> +/**\n> \t> + * @warning\n> \t> + * @b EXPERIMENTAL: this API may change without prior notice.\n> \t> + *\n> \t> + * Destroys the shared action by handle.\n> \t> + *\n> \t> + * @param[in] port_id\n> \t> + * The port identifier of the Ethernet device.\n> \t> + * @param[in] action\n> \t> + * Handle for the shared action to be destroyed.\n> \t> + * @param[out] error\n> \t> + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> \t> + * structure in case of error only.\n> \t> + * @return\n> \t> + * - (0) if success.\n> \t> + * - (-ENOSYS) if underlying device does not support this\n> functionality.\n> \t> + * - (-EIO) if underlying device is removed.\n> \t> + * - (-ENOENT) if action pointed by *action* handle was not\n> found.\n> \t> + * - (-ETOOMANYREFS) if action pointed by *action* handle still\n> used\n> \t> by one or\n> \t> + * more rules\n> \t> + * rte_errno is also set.\n> \t> + */\n> \t> +__rte_experimental\n> \t> +int\n> \t> +rte_flow_shared_action_destroy(uint16_t port_id,\n> \t> + struct rte_flow_shared_action *action,\n> \t> + struct rte_flow_error *error);\n> \t> +\n> \t> +/**\n> \t> + * @warning\n> \t> + * @b EXPERIMENTAL: this API may change without prior notice.\n> \t> + *\n> \t> + * Updates inplace the shared action configuration pointed by\n> *action*\n> \t> handle\n> \t> + * with the configuration provided as *update* argument.\n> \t> + * The update of the shared action configuration effects all flow\n> rules\n> \t> reusing\n> \t> + * the action via handle.\n> \t> + *\n> \t> + * @param[in] port_id\n> \t> + * The port identifier of the Ethernet device.\n> \t> + * @param[in] action\n> \t> + * Handle for the shared action to be updated.\n> \t> + * @param[in] update\n> \t> + * Action specification used to modify the action pointed by\n> handle.\n> \t> + * *update* should be of same type with the action pointed by\n> the\n> \t> *action*\n> \t> + * handle argument, otherwise considered as invalid.\n> \t> + * @param[out] error\n> \t> + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> \t> + * structure in case of error only.\n> \t> + * @return\n> \t> + * - (0) if success.\n> \t> + * - (-ENOSYS) if underlying device does not support this\n> functionality.\n> \t> + * - (-EIO) if underlying device is removed.\n> \t> + * - (-EINVAL) if *update* invalid.\n> \t> + * - (-ENOTSUP) if *update* valid but unsupported.\n> \t> + * - (-ENOENT) if action pointed by *ctx* was not found.\n> \t> + * rte_errno is also set.\n> \t> + */\n> \t> +__rte_experimental\n> \t> +int\n> \t> +rte_flow_shared_action_update(uint16_t port_id,\n> \t> + struct rte_flow_shared_action *action,\n> \t> + const struct rte_flow_action *update,\n> \t> + struct rte_flow_error *error);\n> \t> +\n> \t> +/**\n> \t> + * @warning\n> \t> + * @b EXPERIMENTAL: this API may change without prior notice.\n> \t> + *\n> \t> + * Query the shared action by handle.\n> \t> + *\n> \t> + * This function allows retrieving action-specific data such as\n> counters.\n> \t> + * Data is gathered by special action which may be\n> present/referenced\n> \t> in\n> \t> + * more than one flow rule definition.\n> \t> + *\n> \t> + * \\see RTE_FLOW_ACTION_TYPE_COUNT\n> \t> + *\n> \t> + * @param port_id\n> \t> + * Port identifier of Ethernet device.\n> \t> + * @param[in] action\n> \t> + * Handle for the shared action to query.\n> \t> + * @param[in, out] data\n> \t> + * Pointer to storage for the associated query data type.\n> \t> + * @param[out] error\n> \t> + * Perform verbose error reporting if not NULL. PMDs initialize\n> this\n> \t> + * structure in case of error only.\n> \t> + *\n> \t> + * @return\n> \t> + * 0 on success, a negative errno value otherwise and rte_errno\n> is set.\n> \t> + */\n> \t> +__rte_experimental\n> \t> +int\n> \t> +rte_flow_shared_action_query(uint16_t port_id,\n> \t> + const struct rte_flow_shared_action *action,\n> \t> + void *data,\n> \t> + struct rte_flow_error *error);\n> \t> +\n> \t> #ifdef __cplusplus\n> \t> }\n> \t> #endif\n> \t> diff --git a/lib/librte_ethdev/rte_flow_driver.h\n> \t> b/lib/librte_ethdev/rte_flow_driver.h\n> \t> index 881cc469b7..a2cae1b53c 100644\n> \t> --- a/lib/librte_ethdev/rte_flow_driver.h\n> \t> +++ b/lib/librte_ethdev/rte_flow_driver.h\n> \t> @@ -107,6 +107,28 @@ struct rte_flow_ops {\n> \t> void **context,\n> \t> uint32_t nb_contexts,\n> \t> struct rte_flow_error *err);\n> \t> + /** See rte_flow_shared_action_create() */\n> \t> + struct rte_flow_shared_action *(*shared_action_create)\n> \t> + (struct rte_eth_dev *dev,\n> \t> + const struct rte_flow_action *action,\n> \t> + struct rte_flow_error *error);\n> \t> + /** See rte_flow_shared_action_destroy() */\n> \t> + int (*shared_action_destroy)\n> \t> + (struct rte_eth_dev *dev,\n> \t> + struct rte_flow_shared_action *shared_action,\n> \t> + struct rte_flow_error *error);\n> \t> + /** See rte_flow_shared_action_update() */\n> \t> + int (*shared_action_update)\n> \t> + (struct rte_eth_dev *dev,\n> \t> + struct rte_flow_shared_action *shared_action,\n> \t> + const struct rte_flow_action *update,\n> \t> + struct rte_flow_error *error);\n> \t> + /** See rte_flow_shared_action_query() */\n> \t> + int (*shared_action_query)\n> \t> + (struct rte_eth_dev *dev,\n> \t> + const struct rte_flow_shared_action *shared_action,\n> \t> + void *data,\n> \t> + struct rte_flow_error *error);\n> \t> };\n> \t>\n> \t> /**\n> \t> --\n> \t> 2.26.2\n> \t>\n> \t>\n> \n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 348C2A04B5;\n\tWed, 16 Sep 2020 17:52:38 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EFF141C2FA;\n\tWed, 16 Sep 2020 17:52:36 +0200 (CEST)", "from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com\n [216.228.121.64]) by dpdk.org (Postfix) with ESMTP id 9B7091C2ED\n for <dev@dpdk.org>; Wed, 16 Sep 2020 17:52:34 +0200 (CEST)", "from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by\n hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA)\n id <B5f6234960000>; Wed, 16 Sep 2020 08:51:51 -0700", "from hqmail.nvidia.com ([172.20.161.6])\n by hqpgpgate101.nvidia.com (PGP Universal service);\n Wed, 16 Sep 2020 08:52:33 -0700", "from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL111.nvidia.com\n (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 16 Sep\n 2020 15:52:20 +0000", "from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100)\n by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id\n 15.0.1473.3 via Frontend Transport; Wed, 16 Sep 2020 15:52:20 +0000", "from MWHPR1201MB2525.namprd12.prod.outlook.com\n (2603:10b6:300:e0::19) by MWHPR12MB1551.namprd12.prod.outlook.com\n (2603:10b6:301:9::23) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Wed, 16 Sep\n 2020 15:52:18 +0000", "from MWHPR1201MB2525.namprd12.prod.outlook.com\n ([fe80::3ccb:ec09:9346:54b1]) by MWHPR1201MB2525.namprd12.prod.outlook.com\n ([fe80::3ccb:ec09:9346:54b1%7]) with mapi id 15.20.3370.019; Wed, 16 Sep 2020\n 15:52:18 +0000" ], "X-PGP-Universal": "processed;\n by hqpgpgate101.nvidia.com on Wed, 16 Sep 2020 08:52:33 -0700", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=L/U1DLgPedyrLrNDOgxGMo3WKYv98WsW0jLcRVMh1MH/YaoU4JdLWTIAkSf+s3oy7OYeN9OyN7l42XBlS1SWbze+3Dj2tr6NpmBShvai1hKziPdeVsT2vCOOhUYtkoCDd56M+DVHLMWTduH4nNKc8pINVXkaeyz4ks+8XgslWWBupgWpEGf7xRfCofkWx6YHYau407YVc2RffeQKxWuTcESCwDPjdSG2dIfYQFsW2iGfF90e5zBGUPSxSvjQoYB3F16TZzlvAt5/e8FqkeJOLqwzynP0NHgnFwowd+v7YqhGQtJftHQ06CfZOUJ29DmIMhiVdyD2TFlwAlGQQDyIdA==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=QG3hUefm/Ic2Es54maMKz2ZBZZG1P4L0/6UyG1RhzEQ=;\n b=WMS50V82DPI7CSFs+ZJKoJ2/6Xc8LjssLoV2nZhWXTQhB1kWF8xrPrrITQ77u9zwdMZJXKvZcyyg5VJnbE2FCZApj7X+9lg6bSJMK/huZlaNKi4sRg5nz2mnOwcZBSsATmXf/M7itXBuAy8jrWx9fLEw8sx5OrKxYLe3uJG4N8x6UOiu9oTpaXCU3gL3ngPU8aE1YEzVu+SuYtuRDYX9WXn3GecYhaRSmbPig1S/QnHBgbqYmhKDbP8ecFb8iPgKNQe2Vv0VZrW+PJmdr7csELJsgpURcPm2mazJRUhkBpK4pJ1xQse9NyrdsHGjw3SFtQA/s4odmxvqFercrrCYfg==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none", "From": "Andrey Vesnovaty <andreyv@nvidia.com>", "To": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "CC": "NBU-Contact-Thomas Monjalon <thomas@monjalon.net>, Ori Kam\n <orika@nvidia.com>, Slava Ovsiienko <viacheslavo@nvidia.com>,\n \"jerinj@marvell.com\" <jerinj@marvell.com>, Andrew Rybchenko\n <arybchenko@solarflare.com>, dpdk-dev <dev@dpdk.org>, \"jer@marvell.com\"\n <jer@marvell.com>, Jerin Jacob <jerinjacobk@gmail.com>, Ferruh Yigit\n <ferruh.yigit@intel.com>, Stephen Hemminger <stephen@networkplumber.org>,\n Bruce Richardson <bruce.richardson@intel.com>, Ori Kam <orika@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>, \"andrey.vesnovaty@gmail.com\"\n <andrey.vesnovaty@gmail.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman\n <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>, Samik Gupta\n <samik.gupta@broadcom.com>", "Thread-Topic": "[dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "Thread-Index": "AQHWac+xdJPDU/OvwEKNpRAY5MGzB6lkgkQAgAVRfgCAAEgbgIABkC3A", "Date": "Wed, 16 Sep 2020 15:52:18 +0000", "Message-ID": "\n <MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>", "In-Reply-To": "\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "broadcom.com; dkim=none (message not signed)\n header.d=none;broadcom.com; dmarc=none action=none header.from=nvidia.com;", "x-originating-ip": "[87.71.167.214]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "3f05187a-de59-4f32-c3ba-08d85a587d9b", "x-ms-traffictypediagnostic": "MWHPR12MB1551:", "x-ld-processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MWHPR12MB15512DFE9D8DA0ED1C9B5564DB210@MWHPR12MB1551.namprd12.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:2331;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n QPhFKmht3zzw2pzTdlKvDE4dj+QB7HypD6+1hV643hfdZ0vIIoh6tbssz+wwsxBVesgewsl8CBFkJ8jJTaqkdAOI5EvRXKwMPQ8nigFKMP0GsIshTHZyCHMZFECVGtNtyNG5WGfGbewKpwg5T4cB+T/iTRMcLN8V06hK68TIRp9KJHqJL9q0SW5ZPPd6ETME5UcDbkQvg3mSCiNve0w85zI5i4NC4ly2VjZwA1ECEJIwb3mheHxVz0yaBg6XiOErJSBR0m5hEWCg99D45NoIvh18PDWnfzKggrEKyJ9Gw93aeE0MW2Ffl/DLUPceQQ3KNaaD3j7NzIejHzcs+UIYN/bAwEqLIQ6OHu8YH5pW1LOfLd7snNogbFRp//43l0GE", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MWHPR1201MB2525.namprd12.prod.outlook.com; PTR:;\n CAT:NONE;\n SFS:(4636009)(396003)(366004)(39860400002)(346002)(136003)(376002)(64756008)(7416002)(5660300002)(26005)(66946007)(8936002)(71200400001)(52536014)(76116006)(316002)(186003)(30864003)(478600001)(66446008)(6916009)(8676002)(7696005)(33656002)(4326008)(2906002)(55016002)(6506007)(53546011)(66556008)(66476007)(9686003)(54906003)(83380400001)(86362001)(579004)(559001);\n DIR:OUT; SFP:1101;", "x-ms-exchange-antispam-messagedata": "\n Tvuh7HT6e7Nyd9/b6j6JLjHyz21urpZA/WsAVxrvJUMsoAasJdi3LUc4OWxweKahlgNLkm66G7FemKTw3urxpLnPQlwEIBGhm/fhGwdiew5GJjexZKM0JjH4r8WsldlL5jaGv8kREnjpNaN+ljpjDW4Qz39L5tPlzZOMVWf6MAcDqmmrTh2p7mzzrrLSdS7VsR1m419vEljk/H7rNcnw7/9HQpiviXxEsFkA1lGn84VODpt4ANg83CmPb4m7B0TBoBA9uMLOJxT0loV0bDFq7yOQySmQs9OK+bvISAYCMz0MEHodELIMYUBOzSNvJf9AxJuRPG/tvT/CKF8nL4Yh3JXqAMqQ5ZJ2lwlxNXsRH67AD9x6cUtk0OfQecgpNmx6utUtlyCGDExF/GhXCtTprdP4186tmKkwL0kYu4M7UaBz5BKzkMmQnCtxdj5tsLf3bQyxEjKAL5wN9EEdZLIsgwU+xPIlTcIwr5PSJuwHVn21yse+aQzv+rOgmPvBDCoYfBhHTQPUg5zvhxWhF86NTWJroksmALrVvOZ05qH8TuDcuQernhvlbNNxZ+JQTLnrfG19s3CIYuAofQNFxTJ+lEppTgEfFC8L/R1OqLHNO4muUNxYRbIzeiRulu4rgV2Pkzzs0ZaRxG/ZwS/T8wjJ5w==", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "\n MWHPR1201MB2525.namprd12.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 3f05187a-de59-4f32-c3ba-08d85a587d9b", "X-MS-Exchange-CrossTenant-originalarrivaltime": "16 Sep 2020 15:52:18.1088 (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": "\n RXGATljnyilB5Xuzk6ceys265BM8Uotrj5Qbj010V0hUFHYYjeLXF5fqtVp0iwSu99Cns5Bh4gFIaqH58+t2vw==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MWHPR12MB1551", "X-OriginatorOrg": "Nvidia.com", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;\n t=1600271511; bh=QG3hUefm/Ic2Es54maMKz2ZBZZG1P4L0/6UyG1RhzEQ=;\n h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature:\n ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:\n Thread-Index:Date:Message-ID:References:In-Reply-To:\n Accept-Language:Content-Language:X-MS-Has-Attach:\n X-MS-TNEF-Correlator:authentication-results:x-originating-ip:\n x-ms-publictraffictype:x-ms-office365-filtering-correlation-id:\n x-ms-traffictypediagnostic:x-ld-processed:\n x-ms-exchange-transport-forked:x-microsoft-antispam-prvs:\n x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck:\n x-microsoft-antispam:x-microsoft-antispam-message-info:\n x-forefront-antispam-report:x-ms-exchange-antispam-messagedata:\n Content-Type:Content-Transfer-Encoding:MIME-Version:\n X-MS-Exchange-CrossTenant-AuthAs:\n X-MS-Exchange-CrossTenant-AuthSource:\n X-MS-Exchange-CrossTenant-Network-Message-Id:\n X-MS-Exchange-CrossTenant-originalarrivaltime:\n X-MS-Exchange-CrossTenant-fromentityheader:\n X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype:\n X-MS-Exchange-CrossTenant-userprincipalname:\n X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg;\n b=jZNDlRQ06fRNlWvXrqaH1nn5g+sPSEjQ/mM0n5cnXfYQSmYf5RTDn8RRIh4iApd4O\n +SJEJnD2LPuBu/LeXuBKwj968RHc/PFUujyp4ge1cB/LsA69LdOkkFqS2Emn4Vnob8\n vb3MhKIgrTkIpDYAsEFir2sgjoROC6GPHzpmJT3FiaEEjb5rWKhY1ZAGfRmrUUHtwB\n ZugAACbvgfoSLukP9CYAs41XttWoQm9KdgX6T3zx7P2xT72Q5xfVDd7L4cuyXam4AM\n TGXr8h3VruTXT2h2+58qMmumuZTQ5szO9pFGniW5cB3XaRd8HYwG6Op2ditSWixdpM\n GfiPG9LPQMp1Q==", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 118864, "web_url": "https://patches.dpdk.org/comment/118864/", "msgid": "<CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com", "date": "2020-09-16T19:20:17", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 501, "url": "https://patches.dpdk.org/api/people/501/?format=api", "name": "Ajit Khaparde", "email": "ajit.khaparde@broadcom.com" }, "content": "On Wed, Sep 16, 2020 at 8:52 AM Andrey Vesnovaty <andreyv@nvidia.com> wrote:\n>\n> Hi Ajit\n>\n> For shared action configuration I have following suggestion:\n>\n> struct rte_flow_shared_action_conf {\n> uint32_t no_ingress: 1;\n> uint32_t no_egress: 1;\n> };\n> /*...*/\n> rte_flow_shared_action_create(..., const struct rte_flow_shared_action_conf *conf, ...);\n>\n> What do you think?\nAndrey, I think this is good.\nApplication can specify the direction and PMD can decide whether if\nit needs to honor it or ignore it.\nPlease send the updated version of the patch.\n\nThanks\n\nAjit\n>\n> Thanks,\n> Andrey\n>\n> > -----Original Message-----\n> > From: Ajit Khaparde <ajit.khaparde@broadcom.com>\n> > Sent: Tuesday, September 15, 2020 6:49 PM\n> > To: Andrey Vesnovaty <andreyv@nvidia.com>\n> > Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Ori Kam\n> > <orika@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>;\n> > jerinj@marvell.com; Andrew Rybchenko <arybchenko@solarflare.com>; dpdk-\n> > dev <dev@dpdk.org>; jer@marvell.com; Jerin Jacob <jerinjacobk@gmail.com>;\n> > Ferruh Yigit <ferruh.yigit@intel.com>; Stephen Hemminger\n> > <stephen@networkplumber.org>; Bruce Richardson\n> > <bruce.richardson@intel.com>; Ori Kam <orika@mellanox.com>; Viacheslav\n> > Ovsiienko <viacheslavo@mellanox.com>; andrey.vesnovaty@gmail.com; Ray\n> > Kinsella <mdr@ashroe.eu>; Neil Horman <nhorman@tuxdriver.com>; Thomas\n> > Monjalon <tmonjalon@nvidia.com>; Samik Gupta\n> > <samik.gupta@broadcom.com>\n> > Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> >\n> >\n> >\n> > On Tue, Sep 15, 2020 at 4:51 AM Andrey Vesnovaty <andreyv@nvidia.com\n> > <mailto:andreyv@nvidia.com> > wrote:\n> >\n> >\n> > Hi Ajit, PSB.\n> >\n> > Thanks,\n> > Andrey\n> >\n> > > -----Original Message-----\n> > > From: Ajit Khaparde <ajit.khaparde@broadcom.com\n> > <mailto:ajit.khaparde@broadcom.com> >\n> > > Sent: Saturday, September 12, 2020 5:18 AM\n> > > To: Andrey Vesnovaty <andreyv@mellanox.com\n> > <mailto:andreyv@mellanox.com> >\n> > > Cc: dpdk-dev <dev@dpdk.org <mailto:dev@dpdk.org> >;\n> > jer@marvell.com <mailto:jer@marvell.com> ; Jerin Jacob\n> > > <jerinjacobk@gmail.com <mailto:jerinjacobk@gmail.com> >; NBU-\n> > Contact-Thomas Monjalon\n> > > <thomas@monjalon.net <mailto:thomas@monjalon.net> >; Ferruh\n> > Yigit <ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com> >; Stephen\n> > > Hemminger <stephen@networkplumber.org\n> > <mailto:stephen@networkplumber.org> >; Bruce Richardson\n> > > <bruce.richardson@intel.com <mailto:bruce.richardson@intel.com>\n> > >; Ori Kam <orika@mellanox.com <mailto:orika@mellanox.com> >; Viacheslav\n> > > Ovsiienko <viacheslavo@mellanox.com\n> > <mailto:viacheslavo@mellanox.com> >; andrey.vesnovaty@gmail.com\n> > <mailto:andrey.vesnovaty@gmail.com> ; Ray\n> > > Kinsella <mdr@ashroe.eu <mailto:mdr@ashroe.eu> >; Neil Horman\n> > <nhorman@tuxdriver.com <mailto:nhorman@tuxdriver.com> >; Andrew\n> > > Rybchenko <arybchenko@solarflare.com\n> > <mailto:arybchenko@solarflare.com> >\n> > > Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action\n> > API\n> > >\n> > >\n> > >\n> > > On Wed, Jul 8, 2020 at 2:40 PM Andrey Vesnovaty\n> > <andreyv@mellanox.com <mailto:andreyv@mellanox.com>\n> > > <mailto:andreyv@mellanox.com <mailto:andreyv@mellanox.com> >\n> > > wrote:\n> > >\n> > >\n> > > From: Andrey Vesnovaty <andrey.vesnovaty@gmail.com\n> > <mailto:andrey.vesnovaty@gmail.com>\n> > > <mailto:andrey.vesnovaty@gmail.com\n> > <mailto:andrey.vesnovaty@gmail.com> > >\n> > >\n> > > This commit introduces extension of DPDK flow action API enabling\n> > > sharing of single rte_flow_action in multiple flows. The API\n> > intended for\n> > > PMDs where multiple HW offloaded flows can reuse the same HW\n> > > essence/object representing flow action and modification of such\n> > an\n> > > essence/object effects all the rules using it.\n> > >\n> > > Motivation and example\n> > > ===\n> > > Adding or removing one or more queues to RSS used by multiple\n> > flow\n> > > rules\n> > > imposes per rule toll for current DPDK flow API; the scenario\n> > requires\n> > > for each flow sharing cloned RSS action:\n> > > - call `rte_flow_destroy()`\n> > > - call `rte_flow_create()` with modified RSS action\n> > >\n> > > API for sharing action and its in-place update benefits:\n> > > - reduce the overhead of multiple RSS flow rules reconfiguration\n> > > - optimize resource utilization by sharing action across of multiple\n> > > flows\n> > >\n> > > Change description\n> > > ===\n> > >\n> > > Shared action\n> > > ===\n> > > In order to represent flow action shared by multiple flows new\n> > action\n> > > type RTE_FLOW_ACTION_TYPE_SHARED is introduced (see `enum\n> > > rte_flow_action_type`).\n> > > Actually the introduced API decouples action from any specific flow\n> > and\n> > > enables sharing of single action by its handle across multiple flows.\n> > >\n> > > Shared action create/use/destroy\n> > > ===\n> > > Shared action may be reused by some or none flow rules at any\n> > given\n> > > moment, i.e. shared action reside outside of the context of any\n> > flow.\n> > > Shared action represent HW resources/objects used for action\n> > > offloading\n> > > implementation.\n> > > API for shared action create (see\n> > `rte_flow_shared_action_create()`):\n> > > - should allocate HW resources and make related initializations\n> > required\n> > > for shared action implementation.\n> > > - make necessary preparations to maintain shared access to\n> > > the action resources, configuration and state.\n> > > API for shared action destroy (see\n> > `rte_flow_shared_action_destroy()`)\n> > > should release HW resources and make related cleanups required\n> > for\n> > > shared\n> > > action implementation.\n> > >\n> > > In order to share some flow action reuse the handle of type\n> > > `struct rte_flow_shared_action` returned by\n> > > rte_flow_shared_action_create() as a `conf` field of\n> > > `struct rte_flow_action` (see \"example\" section).\n> > >\n> > > If some shared action not used by any flow rule all resources\n> > allocated\n> > > by the shared action can be released by\n> > > rte_flow_shared_action_destroy()\n> > > (see \"example\" section). The shared action handle passed as\n> > argument\n> > > to\n> > > destroy API should not be used any further i.e. result of the usage is\n> > > undefined.\n> > >\n> > > Shared action re-configuration\n> > > ===\n> > > Shared action behavior defined by its configuration can be updated\n> > via\n> > > rte_flow_shared_action_update() (see \"example\" section). The\n> > shared\n> > > action update operation modifies HW related resources/objects\n> > > allocated\n> > > on the action creation. The number of operations performed by\n> > the\n> > > update\n> > > operation should not be dependent on number of flows sharing the\n> > > related\n> > > action. On return of shared action update API action behavior\n> > should be\n> > > according to updated configuration for all flows sharing the action.\n> > >\n> > > Shared action query\n> > > ===\n> > > Provide separate API to query shared action sate (see\n> > > rte_flow_shared_action_update()). Taking a counter as an\n> > example:\n> > > query\n> > > returns value aggregating all counter increments across all flow\n> > rules\n> > > sharing the counter.\n> > >\n> > > PMD support\n> > > ===\n> > > The support of introduced API is pure PMD specific design and\n> > > responsibility for each action type (see struct rte_flow_ops).\n> > >\n> > > testpmd\n> > > ===\n> > > In order to utilize introduced API testpmd cli may implement\n> > following\n> > > extension\n> > > create/update/destroy/query shared action accordingly\n> > >\n> > > flow shared_action create {port_id} [index] {action}\n> > > flow shared_action update {port_id} {index} {action}\n> > > flow shared_action destroy {port_id} {index}\n> > > flow shared_action query {port_id} {index}\n> > >\n> > > testpmd example\n> > > ===\n> > >\n> > > configure rss to queues 1 & 2\n> > >\n> > > testpmd> flow shared_action create 0 100 rss 1 2\n> > >\n> > > create flow rule utilizing shared action\n> > >\n> > > testpmd> flow create 0 ingress \\\n> > > pattern eth dst is 0c:42:a1:15:fd:ac / ipv6 / tcp / end \\\n> > > actions shared 100 end / end\n> > >\n> > > add 2 more queues\n> > >\n> > > testpmd> flow shared_action modify 0 100 rss 1 2 3 4\n> > >\n> > > example\n> > > ===\n> > >\n> > > struct rte_flow_action actions[2];\n> > > struct rte_flow_action action;\n> > > /* skipped: initialize action */\n> > > struct rte_flow_shared_action *handle =\n> > > rte_flow_shared_action_create(\n> > > port_id, &action, &error);\n> > > actions[0].type = RTE_FLOW_ACTION_TYPE_SHARED;\n> > > actions[0].conf = handle;\n> > > actions[1].type = RTE_FLOW_ACTION_TYPE_END;\n> > > /* skipped: init attr0 & pattern0 args */\n> > > struct rte_flow *flow0 = rte_flow_create(port_id, &attr0,\n> > pattern0,\n> > > actions, error);\n> > > /* create more rules reusing shared action */\n> > > struct rte_flow *flow1 = rte_flow_create(port_id, &attr1,\n> > pattern1,\n> > > actions, error);\n> > > /* skipped: for flows 2 till N */\n> > > struct rte_flow *flowN = rte_flow_create(port_id, &attrN,\n> > patternN,\n> > > actions, error);\n> > > /* update shared action */\n> > > struct rte_flow_action updated_action;\n> > > /*\n> > > * skipped: initialize updated_action according to desired action\n> > > * configuration change\n> > > */\n> > > rte_flow_shared_action_update(port_id, handle,\n> > &updated_action,\n> > > error);\n> > > /*\n> > > * from now on all flows 1 till N will act according to configuration\n> > of\n> > > * updated_action\n> > > */\n> > > /* skipped: destroy all flows 1 till N */\n> > > rte_flow_shared_action_destroy(port_id, handle, error);\n> > >\n> > > Signed-off-by: Andrey Vesnovaty <andreyv@mellanox.com\n> > <mailto:andreyv@mellanox.com>\n> > > <mailto:andreyv@mellanox.com <mailto:andreyv@mellanox.com> >\n> > >\n> > > ---\n> > > lib/librte_ethdev/rte_ethdev_version.map | 6 +\n> > > lib/librte_ethdev/rte_flow.c | 81 +++++++++++++\n> > > lib/librte_ethdev/rte_flow.h | 148\n> > ++++++++++++++++++++++-\n> > > lib/librte_ethdev/rte_flow_driver.h | 22 ++++\n> > > 4 files changed, 256 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/lib/librte_ethdev/rte_ethdev_version.map\n> > > b/lib/librte_ethdev/rte_ethdev_version.map\n> > > index 7155056045..119d84976a 100644\n> > > --- a/lib/librte_ethdev/rte_ethdev_version.map\n> > > +++ b/lib/librte_ethdev/rte_ethdev_version.map\n> > > @@ -241,4 +241,10 @@ EXPERIMENTAL {\n> > > __rte_ethdev_trace_rx_burst;\n> > > __rte_ethdev_trace_tx_burst;\n> > > rte_flow_get_aged_flows;\n> > > +\n> > > + # added in 20.08\n> > > + rte_flow_shared_action_create;\n> > > + rte_flow_shared_action_destroy;\n> > > + rte_flow_shared_action_update;\n> > > + rte_flow_shared_action_query;\n> > > };\n> > > diff --git a/lib/librte_ethdev/rte_flow.c\n> > b/lib/librte_ethdev/rte_flow.c\n> > > index 1685be5f73..0ac4d31a13 100644\n> > > --- a/lib/librte_ethdev/rte_flow.c\n> > > +++ b/lib/librte_ethdev/rte_flow.c\n> > > @@ -1250,3 +1250,84 @@ rte_flow_get_aged_flows(uint16_t\n> > port_id,\n> > > void **contexts,\n> > > RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > > NULL, rte_strerror(ENOTSUP));\n> > > }\n> > > +\n> > > +struct rte_flow_shared_action *\n> > > +rte_flow_shared_action_create(uint16_t port_id,\n> > > + const struct rte_flow_action *action,\n> > >\n> > >\n> > > It will be good to have an attributes argument here.\n> > > Some hardware devices may have ingress and egress resource pools.\n> > > So a 'direction' attribute can help share the resource effectively.\n> >\n> > I understand the idea of HW ingress/egress resource separation.\n> > Unfortunately on shared action creation it's not defined if it will be used\n> > in ingress or egress flow or both.\n> > Is the suggestion is to restrict usage of shared action to single direction?\n> >\n> >\n> > In a way, it is more to add flexibility to this proposal.\n> > Specifying the direction explicitly is better than PMD parsing the actions\n> > and determining if it is for ingress or egress.\n> >\n> > If hardware does not have specific pools for either ingress or egress,\n> > the PMD can ignore the attribute.\n> > So it will be upto the PMD and the underlying hardware to use the\n> > direction attribute - if necessary.\n> >\n> >\n> >\n> >\n> > >\n> > >\n> > >\n> > > + struct rte_flow_error *error)\n> > > +{\n> > > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > > + struct rte_flow_shared_action *shared_action;\n> > > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> > error);\n> > > +\n> > > + if (unlikely(!ops))\n> > > + return NULL;\n> > > + if (likely(!!ops->shared_action_create)) {\n> > > + shared_action = ops->shared_action_create(dev, action,\n> > > error);\n> > > + if (shared_action == NULL)\n> > > + flow_err(port_id, -rte_errno, error);\n> > > + return shared_action;\n> > > + }\n> > > + rte_flow_error_set(error, ENOSYS,\n> > > RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > > + NULL, rte_strerror(ENOSYS));\n> > > + return NULL;\n> > > +}\n> > > +\n> > > +int\n> > > +rte_flow_shared_action_destroy(uint16_t port_id,\n> > > + struct rte_flow_shared_action *action,\n> > > + struct rte_flow_error *error)\n> > > +{\n> > > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> > error);\n> > > +\n> > > + if (unlikely(!ops))\n> > > + return -rte_errno;\n> > > + if (likely(!!ops->shared_action_destroy))\n> > > + return flow_err(port_id,\n> > > + ops->shared_action_destroy(dev, action, error),\n> > > + error);\n> > > + return rte_flow_error_set(error, ENOSYS,\n> > > + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > > + NULL, rte_strerror(ENOSYS));\n> > > +}\n> > > +\n> > > +int\n> > > +rte_flow_shared_action_update(uint16_t port_id,\n> > > + struct rte_flow_shared_action *action,\n> > > + const struct rte_flow_action *update,\n> > > + struct rte_flow_error *error)\n> > > +{\n> > > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> > error);\n> > > +\n> > > + if (unlikely(!ops))\n> > > + return -rte_errno;\n> > > + if (likely(!!ops->shared_action_update))\n> > > + return flow_err(port_id, ops->shared_action_update(dev,\n> > > action,\n> > > + update, error),\n> > > + error);\n> > > + return rte_flow_error_set(error, ENOSYS,\n> > > + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > > + NULL, rte_strerror(ENOSYS));\n> > > +}\n> > > +\n> > > +int\n> > > +rte_flow_shared_action_query(uint16_t port_id,\n> > > + const struct rte_flow_shared_action *action,\n> > > + void *data,\n> > > + struct rte_flow_error *error)\n> > > +{\n> > > + struct rte_eth_dev *dev = &rte_eth_devices[port_id];\n> > > + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id,\n> > error);\n> > > +\n> > > + if (unlikely(!ops))\n> > > + return -rte_errno;\n> > > + if (likely(!!ops->shared_action_query))\n> > > + return flow_err(port_id, ops->shared_action_query(dev,\n> > > action,\n> > > + data, error),\n> > > + error);\n> > > + return rte_flow_error_set(error, ENOSYS,\n> > > + RTE_FLOW_ERROR_TYPE_UNSPECIFIED,\n> > > + NULL, rte_strerror(ENOSYS));\n> > > +}\n> > > diff --git a/lib/librte_ethdev/rte_flow.h\n> > b/lib/librte_ethdev/rte_flow.h\n> > > index b0e4199192..257456b14a 100644\n> > > --- a/lib/librte_ethdev/rte_flow.h\n> > > +++ b/lib/librte_ethdev/rte_flow.h\n> > > @@ -1681,7 +1681,8 @@ enum rte_flow_action_type {\n> > > /**\n> > > * Enables counters for this flow rule.\n> > > *\n> > > - * These counters can be retrieved and reset through\n> > > rte_flow_query(),\n> > > + * These counters can be retrieved and reset through\n> > > rte_flow_query() or\n> > > + * rte_flow_shared_action_query() if the action provided via\n> > > handle,\n> > > * see struct rte_flow_query_count.\n> > > *\n> > > * See struct rte_flow_action_count.\n> > > @@ -2099,6 +2100,14 @@ enum rte_flow_action_type {\n> > > * see enum RTE_ETH_EVENT_FLOW_AGED\n> > > */\n> > > RTE_FLOW_ACTION_TYPE_AGE,\n> > > +\n> > > + /**\n> > > + * Describes action shared a cross multiple flow rules.\n> > > + *\n> > > + * Enables multiple rules reference the same action by handle\n> > (see\n> > > + * struct rte_flow_shared_action).\n> > > + */\n> > > + RTE_FLOW_ACTION_TYPE_SHARED,\n> > > };\n> > >\n> > > /**\n> > > @@ -2660,6 +2669,20 @@ struct rte_flow_action_set_dscp {\n> > > uint8_t dscp;\n> > > };\n> > >\n> > > +\n> > > +/**\n> > > + * RTE_FLOW_ACTION_TYPE_SHARED\n> > > + *\n> > > + * Opaque type returned after successfully creating a shared\n> > action.\n> > > + *\n> > > + * This handle can be used to manage and query the related\n> > action:\n> > > + * - share it a cross multiple flow rules\n> > > + * - update action configuration\n> > > + * - query action data\n> > > + * - destroy action\n> > > + */\n> > > +struct rte_flow_shared_action;\n> > > +\n> > > /* Mbuf dynamic field offset for metadata. */\n> > > extern int32_t rte_flow_dynf_metadata_offs;\n> > >\n> > > @@ -3324,6 +3347,129 @@ int\n> > > rte_flow_get_aged_flows(uint16_t port_id, void **contexts,\n> > > uint32_t nb_contexts, struct rte_flow_error *error);\n> > >\n> > > +/**\n> > > + * @warning\n> > > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > > + *\n> > > + * Create shared action for reuse in multiple flow rules.\n> > > + *\n> > > + * @param[in] port_id\n> > > + * The port identifier of the Ethernet device.\n> > > + * @param[in] action\n> > > + * Action configuration for shared action creation.\n> > > + * @param[out] error\n> > > + * Perform verbose error reporting if not NULL. PMDs initialize\n> > this\n> > > + * structure in case of error only.\n> > > + * @return\n> > > + * A valid handle in case of success, NULL otherwise and\n> > rte_errno is\n> > > set\n> > > + * to one of the error codes defined:\n> > > + * - (ENOSYS) if underlying device does not support this\n> > functionality.\n> > > + * - (EIO) if underlying device is removed.\n> > > + * - (EINVAL) if *action* invalid.\n> > > + * - (ENOTSUP) if *action* valid but unsupported.\n> > > + */\n> > > +__rte_experimental\n> > > +struct rte_flow_shared_action *\n> > > +rte_flow_shared_action_create(uint16_t port_id,\n> > > + const struct rte_flow_action *action,\n> > > + struct rte_flow_error *error);\n> > > +\n> > > +/**\n> > > + * @warning\n> > > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > > + *\n> > > + * Destroys the shared action by handle.\n> > > + *\n> > > + * @param[in] port_id\n> > > + * The port identifier of the Ethernet device.\n> > > + * @param[in] action\n> > > + * Handle for the shared action to be destroyed.\n> > > + * @param[out] error\n> > > + * Perform verbose error reporting if not NULL. PMDs initialize\n> > this\n> > > + * structure in case of error only.\n> > > + * @return\n> > > + * - (0) if success.\n> > > + * - (-ENOSYS) if underlying device does not support this\n> > functionality.\n> > > + * - (-EIO) if underlying device is removed.\n> > > + * - (-ENOENT) if action pointed by *action* handle was not\n> > found.\n> > > + * - (-ETOOMANYREFS) if action pointed by *action* handle still\n> > used\n> > > by one or\n> > > + * more rules\n> > > + * rte_errno is also set.\n> > > + */\n> > > +__rte_experimental\n> > > +int\n> > > +rte_flow_shared_action_destroy(uint16_t port_id,\n> > > + struct rte_flow_shared_action *action,\n> > > + struct rte_flow_error *error);\n> > > +\n> > > +/**\n> > > + * @warning\n> > > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > > + *\n> > > + * Updates inplace the shared action configuration pointed by\n> > *action*\n> > > handle\n> > > + * with the configuration provided as *update* argument.\n> > > + * The update of the shared action configuration effects all flow\n> > rules\n> > > reusing\n> > > + * the action via handle.\n> > > + *\n> > > + * @param[in] port_id\n> > > + * The port identifier of the Ethernet device.\n> > > + * @param[in] action\n> > > + * Handle for the shared action to be updated.\n> > > + * @param[in] update\n> > > + * Action specification used to modify the action pointed by\n> > handle.\n> > > + * *update* should be of same type with the action pointed by\n> > the\n> > > *action*\n> > > + * handle argument, otherwise considered as invalid.\n> > > + * @param[out] error\n> > > + * Perform verbose error reporting if not NULL. PMDs initialize\n> > this\n> > > + * structure in case of error only.\n> > > + * @return\n> > > + * - (0) if success.\n> > > + * - (-ENOSYS) if underlying device does not support this\n> > functionality.\n> > > + * - (-EIO) if underlying device is removed.\n> > > + * - (-EINVAL) if *update* invalid.\n> > > + * - (-ENOTSUP) if *update* valid but unsupported.\n> > > + * - (-ENOENT) if action pointed by *ctx* was not found.\n> > > + * rte_errno is also set.\n> > > + */\n> > > +__rte_experimental\n> > > +int\n> > > +rte_flow_shared_action_update(uint16_t port_id,\n> > > + struct rte_flow_shared_action *action,\n> > > + const struct rte_flow_action *update,\n> > > + struct rte_flow_error *error);\n> > > +\n> > > +/**\n> > > + * @warning\n> > > + * @b EXPERIMENTAL: this API may change without prior notice.\n> > > + *\n> > > + * Query the shared action by handle.\n> > > + *\n> > > + * This function allows retrieving action-specific data such as\n> > counters.\n> > > + * Data is gathered by special action which may be\n> > present/referenced\n> > > in\n> > > + * more than one flow rule definition.\n> > > + *\n> > > + * \\see RTE_FLOW_ACTION_TYPE_COUNT\n> > > + *\n> > > + * @param port_id\n> > > + * Port identifier of Ethernet device.\n> > > + * @param[in] action\n> > > + * Handle for the shared action to query.\n> > > + * @param[in, out] data\n> > > + * Pointer to storage for the associated query data type.\n> > > + * @param[out] error\n> > > + * Perform verbose error reporting if not NULL. PMDs initialize\n> > this\n> > > + * structure in case of error only.\n> > > + *\n> > > + * @return\n> > > + * 0 on success, a negative errno value otherwise and rte_errno\n> > is set.\n> > > + */\n> > > +__rte_experimental\n> > > +int\n> > > +rte_flow_shared_action_query(uint16_t port_id,\n> > > + const struct rte_flow_shared_action *action,\n> > > + void *data,\n> > > + struct rte_flow_error *error);\n> > > +\n> > > #ifdef __cplusplus\n> > > }\n> > > #endif\n> > > diff --git a/lib/librte_ethdev/rte_flow_driver.h\n> > > b/lib/librte_ethdev/rte_flow_driver.h\n> > > index 881cc469b7..a2cae1b53c 100644\n> > > --- a/lib/librte_ethdev/rte_flow_driver.h\n> > > +++ b/lib/librte_ethdev/rte_flow_driver.h\n> > > @@ -107,6 +107,28 @@ struct rte_flow_ops {\n> > > void **context,\n> > > uint32_t nb_contexts,\n> > > struct rte_flow_error *err);\n> > > + /** See rte_flow_shared_action_create() */\n> > > + struct rte_flow_shared_action *(*shared_action_create)\n> > > + (struct rte_eth_dev *dev,\n> > > + const struct rte_flow_action *action,\n> > > + struct rte_flow_error *error);\n> > > + /** See rte_flow_shared_action_destroy() */\n> > > + int (*shared_action_destroy)\n> > > + (struct rte_eth_dev *dev,\n> > > + struct rte_flow_shared_action *shared_action,\n> > > + struct rte_flow_error *error);\n> > > + /** See rte_flow_shared_action_update() */\n> > > + int (*shared_action_update)\n> > > + (struct rte_eth_dev *dev,\n> > > + struct rte_flow_shared_action *shared_action,\n> > > + const struct rte_flow_action *update,\n> > > + struct rte_flow_error *error);\n> > > + /** See rte_flow_shared_action_query() */\n> > > + int (*shared_action_query)\n> > > + (struct rte_eth_dev *dev,\n> > > + const struct rte_flow_shared_action *shared_action,\n> > > + void *data,\n> > > + struct rte_flow_error *error);\n> > > };\n> > >\n> > > /**\n> > > --\n> > > 2.26.2\n> > >\n> > >\n> >\n> >\n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 19062A04B5;\n\tWed, 16 Sep 2020 21:20:38 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CA96A1D179;\n\tWed, 16 Sep 2020 21:20:36 +0200 (CEST)", "from mail-oi1-f195.google.com (mail-oi1-f195.google.com\n [209.85.167.195]) by dpdk.org (Postfix) with ESMTP id 385091D174\n for <dev@dpdk.org>; Wed, 16 Sep 2020 21:20:34 +0200 (CEST)", "by mail-oi1-f195.google.com with SMTP id c13so9385342oiy.6\n for <dev@dpdk.org>; Wed, 16 Sep 2020 12:20:34 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=kE23a6LxHO5rX/vV9TX0kHTe2uhzV11A/BambhXdb/s=;\n b=ZyvMUlx/EpKJYvRZsPs4P8F656hO7EQ34lPthRJpxt9AnAzqRBtIZEgMBrt7CH69Sd\n G+Sh/UtzQQfzQTAsL5tFG+Oamn8MSXaI/4DRGl2mR+RTbM5fn0yUmv4tOBDA5zwPO73D\n L8XwNGNZH2a97lL10u8012bgTILXQUhXJX+Zg=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=kE23a6LxHO5rX/vV9TX0kHTe2uhzV11A/BambhXdb/s=;\n b=MACR/3SGvnBj66S1qU0hQFkAAGjQrA99wgEkkJOTS/W0IRanXGaLBLJ/wg6AaRGMz8\n XZg+U3A0v7IwZOOHMRwg+9WOUrrKjxA8mh/zdKXFkHEJSINIgewcNtOo8bP1mdFtMT+b\n kIiGlK8WC+2fDd5OW5yn2SY2N9kjNa7Sxy997Ers4wFaJDEorGI+rl0xAPyF47dUlDB1\n dWrCvPzaLKpPa95USk6yC4pVI6/lLzn3oO1wHLS3clYvNinEW6v5NDKzFe5XkV5NG7H3\n G1janwaUDj2KP3Qv0Qy0N2hvyFrczToldRq0o65AZ5t8ndUfmpfccp3J3/7byMDgvul9\n cB0Q==", "X-Gm-Message-State": "AOAM532SiaoowNkyfCW77r1wdSQq9zPZAzqAfSG+RAm8WewHm0f2rgT4\n nlwtshKi4kdXdGcm2b7KAaoltSmO6BYVYAXkRvy4og==", "X-Google-Smtp-Source": "\n ABdhPJzx/9gyhKz9QO/Yn/9hZXfzydDBsfV3mlhRH9PaYpsQpcegX7QeIc6iu24zZgxf/902DkPoIRQh2HboDKUXGRA=", "X-Received": "by 2002:a05:6808:5ca:: with SMTP id\n d10mr4194849oij.27.1600284033426;\n Wed, 16 Sep 2020 12:20:33 -0700 (PDT)", "MIME-Version": "1.0", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>\n <MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>", "In-Reply-To": "\n <MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>", "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "Date": "Wed, 16 Sep 2020 12:20:17 -0700", "Message-ID": "\n <CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com>", "To": "Andrey Vesnovaty <andreyv@nvidia.com>", "Cc": "NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,\n Ori Kam <orika@nvidia.com>, Slava Ovsiienko <viacheslavo@nvidia.com>,\n \"jerinj@marvell.com\" <jerinj@marvell.com>,\n Andrew Rybchenko <arybchenko@solarflare.com>, dpdk-dev <dev@dpdk.org>,\n \"jer@marvell.com\" <jer@marvell.com>, Jerin Jacob <jerinjacobk@gmail.com>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Stephen Hemminger <stephen@networkplumber.org>,\n Bruce Richardson <bruce.richardson@intel.com>, Ori Kam <orika@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>,\n \"andrey.vesnovaty@gmail.com\" <andrey.vesnovaty@gmail.com>,\n Ray Kinsella <mdr@ashroe.eu>,\n Neil Horman <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>,\n Samik Gupta <samik.gupta@broadcom.com>", "Content-Type": "text/plain; charset=\"UTF-8\"", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 118992, "web_url": "https://patches.dpdk.org/comment/118992/", "msgid": "<e24d0489-526e-b576-a770-9ced86d55ae4@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/e24d0489-526e-b576-a770-9ced86d55ae4@solarflare.com", "date": "2020-09-17T15:33:46", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 607, "url": "https://patches.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.com" }, "content": "On 9/16/20 10:20 PM, Ajit Khaparde wrote:\n> On Wed, Sep 16, 2020 at 8:52 AM Andrey Vesnovaty <andreyv@nvidia.com> wrote:\n>>\n>> Hi Ajit\n>>\n>> For shared action configuration I have following suggestion:\n>>\n>> struct rte_flow_shared_action_conf {\n>> uint32_t no_ingress: 1;\n>> uint32_t no_egress: 1;\n>> };\n>> /*...*/\n>> rte_flow_shared_action_create(..., const struct rte_flow_shared_action_conf *conf, ...);\n>>\n>> What do you think?\n> Andrey, I think this is good.\n> Application can specify the direction and PMD can decide whether if\n> it needs to honor it or ignore it.\n> Please send the updated version of the patch.\n\nPersonally I dislike negative flags, offloads, fields etc.\nDon't we have a policy to avoid it. At least we have it for\noffloads. I see no string reasons here to use negative\ninstead of positive here.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 32D7EA04C0;\n\tThu, 17 Sep 2020 17:34:15 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1E6EE1D67A;\n\tThu, 17 Sep 2020 17:34:15 +0200 (CEST)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 53D2D1D449\n for <dev@dpdk.org>; Thu, 17 Sep 2020 17:34:13 +0200 (CEST)", "from mx1-us1.ppe-hosted.com (unknown [10.110.50.144])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n EA0E7200D8; Thu, 17 Sep 2020 15:34:12 +0000 (UTC)", "from us4-mdac16-60.at1.mdlocal (unknown [10.110.50.153])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id E7268800A9;\n Thu, 17 Sep 2020 15:34:12 +0000 (UTC)", "from mx1-us1.ppe-hosted.com (unknown [10.110.49.107])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 64F4E40060;\n Thu, 17 Sep 2020 15:34:12 +0000 (UTC)", "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 9155B28008A;\n Thu, 17 Sep 2020 15:34:08 +0000 (UTC)", "from [127.0.0.27] (10.17.10.39) by ukex01.SolarFlarecom.com\n (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Sep\n 2020 16:33:52 +0100" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "To": "Ajit Khaparde <ajit.khaparde@broadcom.com>, Andrey Vesnovaty\n <andreyv@nvidia.com>", "CC": "NBU-Contact-Thomas Monjalon <thomas@monjalon.net>, Ori Kam\n <orika@nvidia.com>, Slava Ovsiienko <viacheslavo@nvidia.com>,\n \"jerinj@marvell.com\" <jerinj@marvell.com>, Andrew Rybchenko\n <arybchenko@solarflare.com>, dpdk-dev <dev@dpdk.org>, \"jer@marvell.com\"\n <jer@marvell.com>, Jerin Jacob <jerinjacobk@gmail.com>, Ferruh Yigit\n <ferruh.yigit@intel.com>, Stephen Hemminger <stephen@networkplumber.org>,\n Bruce Richardson <bruce.richardson@intel.com>, Ori Kam <orika@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>, \"andrey.vesnovaty@gmail.com\"\n <andrey.vesnovaty@gmail.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman\n <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>, Samik Gupta\n <samik.gupta@broadcom.com>", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>\n <MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com>", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "Message-ID": "<e24d0489-526e-b576-a770-9ced86d55ae4@solarflare.com>", "Date": "Thu, 17 Sep 2020 18:33:46 +0300", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n Thunderbird/68.12.0", "MIME-Version": "1.0", "In-Reply-To": "\n <CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com>", "Content-Type": "text/plain; charset=\"utf-8\"; format=flowed", "Content-Language": "en-US", "Content-Transfer-Encoding": "7bit", "X-Originating-IP": "[10.17.10.39]", "X-ClientProxiedBy": "ocex03.SolarFlarecom.com (10.20.40.36) To\n ukex01.SolarFlarecom.com (10.17.10.4)", "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.6.1012-25670.006", "X-TM-AS-Result": "No-7.179800-8.000000-10", "X-TMASE-MatchedRID": "VPleTT1nwdR0nsJmoztmWPZvT2zYoYOwC/ExpXrHizyPiMW+3YzkgrqS\n NKTkl986XQS0szagh4NHvPWyFe6hU/3OUDZboT0w1JdCMvZkkjI6En2bnefhoIe/yi1B5QhCZJ2\n 3hwfoyRtqlM/UPbbakoWSkHf6Tb2DhJOsiG/B2u+KR0fcRBoRNa/WVJNdLUTFQzcrLK1tq+ejxY\n yRBa/qJQPTK4qtAgwIIC0OoeD/hCbQLWxBF9DMQcRB0bsfrpPIx1FPlNAAmcDUrUBLaYGH4wXMy\n JNxaW7EDxFGFpr2S9fMvxJiu6zy0Z6oP1a0mRIj", "X-TM-AS-User-Approved-Sender": "Yes", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10--7.179800-8.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25670.006", "X-MDID": "1600356852-Uup9mdC4YBCC", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 119000, "web_url": "https://patches.dpdk.org/comment/119000/", "msgid": "<MN2PR12MB4286DBE84D53C62BA5E8D87AD63E0@MN2PR12MB4286.namprd12.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MN2PR12MB4286DBE84D53C62BA5E8D87AD63E0@MN2PR12MB4286.namprd12.prod.outlook.com", "date": "2020-09-17T16:02:59", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 1869, "url": "https://patches.dpdk.org/api/people/1869/?format=api", "name": "Ori Kam", "email": "orika@nvidia.com" }, "content": "> -----Original Message-----\n> From: Andrew Rybchenko <arybchenko@solarflare.com>\n> Sent: Thursday, September 17, 2020 6:34 PM\n> <samik.gupta@broadcom.com>\n> Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> \n> On 9/16/20 10:20 PM, Ajit Khaparde wrote:\n> > On Wed, Sep 16, 2020 at 8:52 AM Andrey Vesnovaty <andreyv@nvidia.com>\n> wrote:\n> >>\n> >> Hi Ajit\n> >>\n> >> For shared action configuration I have following suggestion:\n> >>\n> >> struct rte_flow_shared_action_conf {\n> >> uint32_t no_ingress: 1;\n> >> uint32_t no_egress: 1;\n> >> };\n> >> /*...*/\n> >> rte_flow_shared_action_create(..., const struct\n> rte_flow_shared_action_conf *conf, ...);\n> >>\n> >> What do you think?\n> > Andrey, I think this is good.\n> > Application can specify the direction and PMD can decide whether if\n> > it needs to honor it or ignore it.\n> > Please send the updated version of the patch.\n> \n> Personally I dislike negative flags, offloads, fields etc.\n> Don't we have a policy to avoid it. At least we have it for\n> offloads. I see no string reasons here to use negative\n> instead of positive here.\n\nAgree I think it is better to use positive values and the same names as the\nattribute in the flow.", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EA465A04C0;\n\tThu, 17 Sep 2020 18:03:14 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6DB541D6A1;\n\tThu, 17 Sep 2020 18:03:14 +0200 (CEST)", "from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com\n [216.228.121.64]) by dpdk.org (Postfix) with ESMTP id A5BFA1D69A\n for <dev@dpdk.org>; Thu, 17 Sep 2020 18:03:13 +0200 (CEST)", "from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by\n hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA)\n id <B5f6388950000>; Thu, 17 Sep 2020 09:02:29 -0700", "from hqmail.nvidia.com ([172.20.161.6])\n by hqpgpgate101.nvidia.com (PGP Universal service);\n Thu, 17 Sep 2020 09:03:12 -0700", "from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 17 Sep\n 2020 16:03:00 +0000", "from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177)\n by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id\n 15.0.1473.3 via Frontend Transport; Thu, 17 Sep 2020 16:03:00 +0000", "from MN2PR12MB4286.namprd12.prod.outlook.com (2603:10b6:208:199::22)\n by MN2PR12MB4190.namprd12.prod.outlook.com (2603:10b6:208:1dd::24)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11; Thu, 17 Sep\n 2020 16:02:59 +0000", "from MN2PR12MB4286.namprd12.prod.outlook.com\n ([fe80::61fd:a36e:cf4f:2d3f]) by MN2PR12MB4286.namprd12.prod.outlook.com\n ([fe80::61fd:a36e:cf4f:2d3f%9]) with mapi id 15.20.3370.019; Thu, 17 Sep 2020\n 16:02:59 +0000" ], "X-PGP-Universal": "processed;\n by hqpgpgate101.nvidia.com on Thu, 17 Sep 2020 09:03:12 -0700", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=Uqjq5yCqySACcj33Dr6juhZmGVO3WC+OIKFf1P3n3YjEXteMrBeV0lZ+v6ZZU/Cx8hCn9CyUGkbZ3H2jlbNtaFbkn4WBpazVt4DRkkvd86PZe8LBGKRAMYD/k7xo9cseZeGSxcfHa2DnU4f0cVD9vOtVpq//1+d5p2UwUOIAHtBdRZxjfeL6TuZvGhRbMRgnFlCKt+qWiuRsO1Y/nk4BJeE3UdztpXeGHuyGZbdZHGVuX+07qWLgx9FTTb30KTtbf82FKW/ITZnLxCfgy0cfjAr6h+XGPYLPseBBq9EpLpA3+F/JuU1gqsrfDs7OIkoRgGkeh6fo0ieqlFQh5Kp3eA==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=k6KobvsBFDaxh45SFvDEONGuqYoT4/VXpCvTxZ5OKtI=;\n b=gMxsjSPwZ1ZUI0aRETpnZOE+i7vR17MIbAq/eWq5hRg8kPb4MwYf5Hk8SDUZ059ao+LrsC9WlH6xWgbiWn6cVptFZ8okUPt1dTz5WlQkC9UD/EHuu1fRduUMWuwdNOFEEJPd1gToiR9Sjbp7NeSZeyUTmwB5SkbTMfzn/2oDp2TVAK9no3U4urWNf+oYygKyLF+ktQm0XzvJylm8WfO7x2bk25L7jxcdJt1D11za0H7mcG161Xi+Nt+BUY0XC5rUbwMp5CGXxMWzPYXw8F4OSwNyDrOaBiqefLcxwuIATu8D1rWWkNuezgsYB8k8TA2WTFyTgYeHHrjkvMJCd8LeqQ==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none", "From": "Ori Kam <orika@nvidia.com>", "To": "Andrew Rybchenko <arybchenko@solarflare.com>, Ajit Khaparde\n <ajit.khaparde@broadcom.com>, Andrey Vesnovaty <andreyv@nvidia.com>", "CC": "NBU-Contact-Thomas Monjalon <thomas@monjalon.net>, Slava Ovsiienko\n <viacheslavo@nvidia.com>, \"jerinj@marvell.com\" <jerinj@marvell.com>, dpdk-dev\n <dev@dpdk.org>, \"jer@marvell.com\" <jer@marvell.com>, Jerin Jacob\n <jerinjacobk@gmail.com>, Ferruh Yigit <ferruh.yigit@intel.com>, \"Stephen\n Hemminger\" <stephen@networkplumber.org>, Bruce Richardson\n <bruce.richardson@intel.com>, Ori Kam <orika@mellanox.com>, \"Viacheslav\n Ovsiienko\" <viacheslavo@mellanox.com>, \"andrey.vesnovaty@gmail.com\"\n <andrey.vesnovaty@gmail.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman\n <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>, Samik Gupta\n <samik.gupta@broadcom.com>", "Thread-Topic": "[dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "Thread-Index": "\n AQHWaeifkXkYp7qJhUe/rpuipid4K6lkghIAgAVXB4CAAEKTgIABkzgAgAA6HICAAVMLAIAAB9HA", "Date": "Thu, 17 Sep 2020 16:02:59 +0000", "Message-ID": "\n <MN2PR12MB4286DBE84D53C62BA5E8D87AD63E0@MN2PR12MB4286.namprd12.prod.outlook.com>", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>\n <MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com>\n <e24d0489-526e-b576-a770-9ced86d55ae4@solarflare.com>", "In-Reply-To": "<e24d0489-526e-b576-a770-9ced86d55ae4@solarflare.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "solarflare.com; dkim=none (message not signed)\n header.d=none;solarflare.com; dmarc=none action=none header.from=nvidia.com;", "x-originating-ip": "[147.236.152.129]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "c90236d8-cf7c-4ceb-27a8-08d85b232612", "x-ms-traffictypediagnostic": "MN2PR12MB4190:", "x-ld-processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MN2PR12MB419006675AAEE8F3C7D545DAD63E0@MN2PR12MB4190.namprd12.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:5516;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n 7v2hQOw3N/O+QexFC/PAQEn3VgDdhlVewCKzuGnZmGEZGcIsUJJPUYtcgyORDfi/KoaESY/vII4/py9PsDvSHoAIZT7dmm9c/Kabbj6Gbsa7YopQ+uie76zeGy3jD4BhgTCPVR6f1215kasQj7RaIoW/cDDaf055OpG2+qiaF6YG41heD/XmGvcKK9OhKA8jB/0glKhyF2LBhY+OslwEy7uGhzTQ9CR9ShCTg+KQL8fvkwIsLUrAkynMZT2HB6YHbrfT2rvd+wBUdrP2fYVIi8z6f6t/3wJNGeOqmcuprA5ZBC/jl5kHy3M23ROGT9RZW4HX/bJGuleG992HOCJgPA==", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MN2PR12MB4286.namprd12.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(4636009)(136003)(366004)(346002)(376002)(396003)(39860400002)(186003)(55016002)(9686003)(7696005)(6506007)(76116006)(33656002)(53546011)(478600001)(66946007)(86362001)(26005)(4326008)(316002)(2906002)(52536014)(8676002)(110136005)(66446008)(8936002)(5660300002)(83380400001)(54906003)(71200400001)(66556008)(7416002)(64756008)(66476007)(6636002);\n DIR:OUT; SFP:1101;", "x-ms-exchange-antispam-messagedata": "\n o4xh0nQJZcULnBVkY8yqtrh7ODnoPFgllOvUluLnK4Ogah935+iDQK+cKonqGABk07ytp9+G5s65wrqwl7hJQ1+qUYrLSVO0crEAmvMoamBpjJNAJ1e1CFNS59HxMyho+ykIfs5WFCWjQ6jg2F/cnklfFsEJwVBF4GP3qKMKxsFbA1T7DF+GEIp+0YeW9VTy2rrb5zF/MiIOtx/voqqaNY9ONPXSExNujntlZoUp54uX6/mL+dIGwXLh1/RgElu2f9q0IosvJ7TCf+vS16UknbXcVcPzmXDtyw6n0LWxrMVA5Rt90viIPzHEHidaGDbqQgxzI04G9ZwLjyrB0+zPhyijdqBrwrljAnpHTQ6Gapy3GXkye1BegUnlxigqOtq9cVz2XSOrnBX95jSJ+N4WTOj7z3DqqU9g4A4dFwEYzGavvVGWtsQkS0GuiJaBdczPhpJn7J3tS++ZNJmjgRoHYjAlMEqcLH0vO4UdMJk6/DibsYDE9grvfEARZvvVM35w5IysVTSnX2/CuMfeogfW4fnj+3DkGMdPwJB7O/lzS62uy4ED5pFGY4ebWbS39/LVqOHLkMwjWZNg6UyASDnZfufxJiRODI8Wo7CAL7GlhbSWoR8rmM7dHVfBTwLryG9d8QfpVcP3DRx1ND/5Vt92lA==", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "MN2PR12MB4286.namprd12.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n c90236d8-cf7c-4ceb-27a8-08d85b232612", "X-MS-Exchange-CrossTenant-originalarrivaltime": "17 Sep 2020 16:02:59.2317 (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": "\n yQi4CXegqyXAUOPIEBWt+rgtN+cAh0OjgxP8l+hoENoR2TVwWzez6h2PpQfHDHSO3QFo8INMTZKJx8r4AaE0CA==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MN2PR12MB4190", "X-OriginatorOrg": "Nvidia.com", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;\n t=1600358549; bh=k6KobvsBFDaxh45SFvDEONGuqYoT4/VXpCvTxZ5OKtI=;\n h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature:\n ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:\n Thread-Index:Date:Message-ID:References:In-Reply-To:\n Accept-Language:Content-Language:X-MS-Has-Attach:\n X-MS-TNEF-Correlator:authentication-results:x-originating-ip:\n x-ms-publictraffictype:x-ms-office365-filtering-correlation-id:\n x-ms-traffictypediagnostic:x-ld-processed:\n x-ms-exchange-transport-forked:x-microsoft-antispam-prvs:\n x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck:\n x-microsoft-antispam:x-microsoft-antispam-message-info:\n x-forefront-antispam-report:x-ms-exchange-antispam-messagedata:\n Content-Type:Content-Transfer-Encoding:MIME-Version:\n X-MS-Exchange-CrossTenant-AuthAs:\n X-MS-Exchange-CrossTenant-AuthSource:\n X-MS-Exchange-CrossTenant-Network-Message-Id:\n X-MS-Exchange-CrossTenant-originalarrivaltime:\n X-MS-Exchange-CrossTenant-fromentityheader:\n X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype:\n X-MS-Exchange-CrossTenant-userprincipalname:\n X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg;\n b=nAzBXsmDW06hit4Q5g+KUusxwixoQ3Wr/Q24aHUV7tt6RPj11aH0iW8GYuNdIHKJh\n DzdWVAp/mxOKQmTxTWU3K6VD8ozdy4cK7Or3b2IbbE0Dv9DD1OBd3UNyllwxjKxJwq\n nurkydUXXQzzY1jOkgg12/uAVzFn7mRmxluC6B9ebWnNLnzGx0VntJjE2r5DuiHDfb\n dDoYP/ytBPXJzA2SCbhBLqnMpYcuGKQtv+ynA4v79DL1ho1vUiy+pdU3ANJqip0ICw\n 79uaEp/yqcYH80ZwI1kw3DXEaEQ6nTZxwx+7oH7P8LLtQvoufUO3KK0QXkweLh2xjy\n 2Pg3wnsiObqZg==", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 119569, "web_url": "https://patches.dpdk.org/comment/119569/", "msgid": "<CACZ4nhtQob5_pu129GFCORe=kxTV9NRKYZfRN4x7j2w-SLaWGw@mail.gmail.com>", "list_archive_url": "https://inbox.dpdk.org/dev/CACZ4nhtQob5_pu129GFCORe=kxTV9NRKYZfRN4x7j2w-SLaWGw@mail.gmail.com", "date": "2020-09-24T19:25:11", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 501, "url": "https://patches.dpdk.org/api/people/501/?format=api", "name": "Ajit Khaparde", "email": "ajit.khaparde@broadcom.com" }, "content": "On Thu, Sep 17, 2020 at 9:03 AM Ori Kam <orika@nvidia.com> wrote:\n>\n>\n>\n> > -----Original Message-----\n> > From: Andrew Rybchenko <arybchenko@solarflare.com>\n> > Sent: Thursday, September 17, 2020 6:34 PM\n> > <samik.gupta@broadcom.com>\n> > Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> >\n> > On 9/16/20 10:20 PM, Ajit Khaparde wrote:\n> > > On Wed, Sep 16, 2020 at 8:52 AM Andrey Vesnovaty <andreyv@nvidia.com>\n> > wrote:\n> > >>\n> > >> Hi Ajit\n> > >>\n> > >> For shared action configuration I have following suggestion:\n> > >>\n> > >> struct rte_flow_shared_action_conf {\n> > >> uint32_t no_ingress: 1;\n> > >> uint32_t no_egress: 1;\n> > >> };\n> > >> /*...*/\n> > >> rte_flow_shared_action_create(..., const struct\n> > rte_flow_shared_action_conf *conf, ...);\n> > >>\n> > >> What do you think?\n> > > Andrey, I think this is good.\n> > > Application can specify the direction and PMD can decide whether if\n> > > it needs to honor it or ignore it.\n> > > Please send the updated version of the patch.\n> >\n> > Personally I dislike negative flags, offloads, fields etc.\n> > Don't we have a policy to avoid it. At least we have it for\n> > offloads. I see no string reasons here to use negative\n> > instead of positive here.\n>\n> Agree I think it is better to use positive values and the same names as the\n> attribute in the flow.\nHas a new version of the patch been submitted? Thanks\n\n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 32D5CA04BB;\n\tThu, 24 Sep 2020 21:25:31 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A632E1DEFA;\n\tThu, 24 Sep 2020 21:25:29 +0200 (CEST)", "from mail-ot1-f68.google.com (mail-ot1-f68.google.com\n [209.85.210.68]) by dpdk.org (Postfix) with ESMTP id AD2591DEEF\n for <dev@dpdk.org>; Thu, 24 Sep 2020 21:25:28 +0200 (CEST)", "by mail-ot1-f68.google.com with SMTP id h17so32645otr.1\n for <dev@dpdk.org>; Thu, 24 Sep 2020 12:25:28 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=/7xDyik8MRv+1IwZPwXjNzvMO/5QMjqbTu9k44UJ6ps=;\n b=ZDruG45w8u3Wu9FoNYom/akoeRJdyhX0kxLYdpxPyVYIX9WaAmIJuqbZr6WdhmIOC9\n Yov7k4qK5TbaLqPPUL9eO8p/vY4DR3bawIlV2aYaKT3cCkw9KKWlXvyqL/Bae+a3Y3hH\n 5z8y/2FsM5aNa1Tk4gt5MhvMxfA9yyPYEkEOQ=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=/7xDyik8MRv+1IwZPwXjNzvMO/5QMjqbTu9k44UJ6ps=;\n b=didkvbG8IQ6u5xKfwMx+yjNFAD5r7HtPbeNljIVw6f/SsqN7bBdJTGR/WQgcvFMMEa\n TlnN5fOTk0J6EOxcwNsxdNlSozJosBVQK9QpVimwJLPCP81wR5M632CxTtKWL6x96zNt\n vU9A8PcsEcxI4lYUrZd95ZUanlfscN/6vIUZ3U+125Pgyz89Z4dU6wCenG989ikqstl9\n mhx7MYRRZFuS0+Gac0ghbYSvl8TOKcE+uqxqN/cCN9hO4wl+F0MTfxQDFivc/n38ABOp\n a9Vj0sCTYbOS+kemwC+4xbd/ntTB49XJNTtlbtcRkqYU7KNHrcDsmYZhnyZ3KnA9fc1h\n e6uA==", "X-Gm-Message-State": "AOAM532jynxidOQNWzYeoSEB+oRB05dsaDgOt3+XhbcYI47smMwZ4UOh\n pJWy1mEevnmCIrf5GdC/7HjZTi/nLlZUQRpi70habA==", "X-Google-Smtp-Source": "\n ABdhPJxuXnDl2suxVn5wJJxye7Sb3X2w1ahoNaGolVgmb/6wDp1jtDTRtKSG3LgVex87HNwItsT05a87qygoB2n5C5o=", "X-Received": "by 2002:a9d:5e4:: with SMTP id 91mr453039otd.95.1600975527817;\n Thu, 24 Sep 2020 12:25:27 -0700 (PDT)", "MIME-Version": "1.0", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>\n <MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com>\n <e24d0489-526e-b576-a770-9ced86d55ae4@solarflare.com>\n <MN2PR12MB4286DBE84D53C62BA5E8D87AD63E0@MN2PR12MB4286.namprd12.prod.outlook.com>", "In-Reply-To": "\n <MN2PR12MB4286DBE84D53C62BA5E8D87AD63E0@MN2PR12MB4286.namprd12.prod.outlook.com>", "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "Date": "Thu, 24 Sep 2020 12:25:11 -0700", "Message-ID": "\n <CACZ4nhtQob5_pu129GFCORe=kxTV9NRKYZfRN4x7j2w-SLaWGw@mail.gmail.com>", "To": "Ori Kam <orika@nvidia.com>", "Cc": "Andrew Rybchenko <arybchenko@solarflare.com>,\n Andrey Vesnovaty <andreyv@nvidia.com>,\n NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,\n Slava Ovsiienko <viacheslavo@nvidia.com>,\n \"jerinj@marvell.com\" <jerinj@marvell.com>, dpdk-dev <dev@dpdk.org>,\n \"jer@marvell.com\" <jer@marvell.com>,\n Jerin Jacob <jerinjacobk@gmail.com>, Ferruh Yigit <ferruh.yigit@intel.com>,\n Stephen Hemminger <stephen@networkplumber.org>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Ori Kam <orika@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>,\n \"andrey.vesnovaty@gmail.com\" <andrey.vesnovaty@gmail.com>,\n Ray Kinsella <mdr@ashroe.eu>,\n Neil Horman <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>,\n Samik Gupta <samik.gupta@broadcom.com>", "Content-Type": "text/plain; charset=\"UTF-8\"", "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null }, { "id": 119664, "web_url": "https://patches.dpdk.org/comment/119664/", "msgid": "<MWHPR1201MB252566195BE51EA0B0C768C8DB370@MWHPR1201MB2525.namprd12.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/MWHPR1201MB252566195BE51EA0B0C768C8DB370@MWHPR1201MB2525.namprd12.prod.outlook.com", "date": "2020-09-26T11:09:55", "subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "submitter": { "id": 1969, "url": "https://patches.dpdk.org/api/people/1969/?format=api", "name": "Andrey Vesnovaty", "email": "andreyv@nvidia.com" }, "content": "Hi Ajit, Andrew & Ori.\n\nPSB 😉\n> -----Original Message-----\n> From: Ajit Khaparde <ajit.khaparde@broadcom.com>\n> Sent: Thursday, September 24, 2020 10:25 PM\n> To: Ori Kam <orika@nvidia.com>\n> Cc: Andrew Rybchenko <arybchenko@solarflare.com>; Andrey Vesnovaty\n> <andreyv@nvidia.com>; NBU-Contact-Thomas Monjalon\n> <thomas@monjalon.net>; Slava Ovsiienko <viacheslavo@nvidia.com>;\n> jerinj@marvell.com; dpdk-dev <dev@dpdk.org>; jer@marvell.com; Jerin Jacob\n> <jerinjacobk@gmail.com>; Ferruh Yigit <ferruh.yigit@intel.com>; Stephen\n> Hemminger <stephen@networkplumber.org>; Bruce Richardson\n> <bruce.richardson@intel.com>; Ori Kam <orika@mellanox.com>; Viacheslav\n> Ovsiienko <viacheslavo@mellanox.com>; andrey.vesnovaty@gmail.com; Ray\n> Kinsella <mdr@ashroe.eu>; Neil Horman <nhorman@tuxdriver.com>; Thomas\n> Monjalon <tmonjalon@nvidia.com>; Samik Gupta\n> <samik.gupta@broadcom.com>\n> Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> \n> On Thu, Sep 17, 2020 at 9:03 AM Ori Kam <orika@nvidia.com> wrote:\n> >\n> >\n> >\n> > > -----Original Message-----\n> > > From: Andrew Rybchenko <arybchenko@solarflare.com>\n> > > Sent: Thursday, September 17, 2020 6:34 PM\n> > > <samik.gupta@broadcom.com>\n> > > Subject: Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API\n> > >\n> > > On 9/16/20 10:20 PM, Ajit Khaparde wrote:\n> > > > On Wed, Sep 16, 2020 at 8:52 AM Andrey Vesnovaty\n> <andreyv@nvidia.com>\n> > > wrote:\n> > > >>\n> > > >> Hi Ajit\n> > > >>\n> > > >> For shared action configuration I have following suggestion:\n> > > >>\n> > > >> struct rte_flow_shared_action_conf {\n> > > >> uint32_t no_ingress: 1;\n> > > >> uint32_t no_egress: 1;\n> > > >> };\n> > > >> /*...*/\n> > > >> rte_flow_shared_action_create(..., const struct\n> > > rte_flow_shared_action_conf *conf, ...);\n> > > >>\n> > > >> What do you think?\n> > > > Andrey, I think this is good.\n\n@Ajit Khaparde great to know.\n> > > > Application can specify the direction and PMD can decide whether if\n> > > > it needs to honor it or ignore it.\n> > > > Please send the updated version of the patch.\n> > >\n\nI'm on it. See my answer to your last email. Thanks.\n> > > Personally I dislike negative flags, offloads, fields etc.\n> > > Don't we have a policy to avoid it. At least we have it for\n> > > offloads. I see no string reasons here to use negative\n> > > instead of positive here.\n\n@Andrew Rybchenko & @Ori Kam Got your remark regarding \"negative flags\".\nWill replace with:\nstruct rte_flow_shared_action_conf {\n\tuint32_t ingress:1; /**< Action valid for rules applied to ingress traffic. */\n\tuint32_t egress:1; /**< Action valid for rules applied to egress traffic. */\n};\n> >\n> > Agree I think it is better to use positive values and the same names as the\n> > attribute in the flow.\n> Has a new version of the patch been submitted? Thanks\n> \n\nThanks lot for your comments & remarks.\nHopefully new version of the patch will be published next week.\nThe new patch about to have testpmd for shared action to demonstrate usage. \n> >", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 46FA1A04BB;\n\tSat, 26 Sep 2020 13:10:14 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 918A11D93D;\n\tSat, 26 Sep 2020 13:10:12 +0200 (CEST)", "from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com\n [216.228.121.64]) by dpdk.org (Postfix) with ESMTP id 802701BA5D\n for <dev@dpdk.org>; Sat, 26 Sep 2020 13:10:10 +0200 (CEST)", "from hqmail.nvidia.com (Not Verified[216.228.121.13]) by\n hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA)\n id <B5f6f21610000>; Sat, 26 Sep 2020 04:09:21 -0700", "from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL111.nvidia.com\n (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 26 Sep\n 2020 11:09:57 +0000", "from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174)\n by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id\n 15.0.1473.3 via Frontend Transport; Sat, 26 Sep 2020 11:09:57 +0000", "from MWHPR1201MB2525.namprd12.prod.outlook.com\n (2603:10b6:300:e0::19) by MWHPR12MB1757.namprd12.prod.outlook.com\n (2603:10b6:300:111::9) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.22; Sat, 26 Sep\n 2020 11:09:55 +0000", "from MWHPR1201MB2525.namprd12.prod.outlook.com\n ([fe80::3ccb:ec09:9346:54b1]) by MWHPR1201MB2525.namprd12.prod.outlook.com\n ([fe80::3ccb:ec09:9346:54b1%7]) with mapi id 15.20.3412.026; Sat, 26 Sep 2020\n 11:09:55 +0000" ], "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=LNT2SLfyAEPvFiYTuBTvGGczwZfOw+nHpWrITOEVHqHfMZlt+KJCK+da27PbABc19WO1GWHtcRxPlZHabCmOEcc3CtGLlhSkAjZp52uMbPf+mFK0NBJ2yECEYNMGamWiF+nQOYRh7Vf2dXUAdyUwwGd0voXpg7hEBfOE92m/2UIniOJAEhTrNwJCJCNx0etf5ER7s0a+IsJhyiE+wl5vWOabmUddYMKNpCoxxSf1eLdcpHmhRyx3Wck+ESmaa9PjWcjYu+uTxlsECPqoelIHrU5jNPBiOrq2a4RzGoMPnV184UbfuzyC+bcxOdI5+Lp5ep/bB7G7+sXraBJF5rLqxg==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=xzuH18H4VCImEDMv3xFPt4FWBN7Jbj0byjfOEo6HIcQ=;\n b=CyNe0HO+8zR1wnvkVeVVVj/ajoWm9MlSvb/1xqlnBvpeVkxANxllBtrpVXaG0jyGKQFsl5+JR8bDVdmjcBvbCZfdttaSQdrkAkGJ7VgZGA523y10Yy4y18XUlGRbMwtsy1/xPnr4XznbrFDnCqaVZYZzBYDXqBBOcDtYHXXxblLrQJnfkFxrm3xd6VS6ktwObYyLbwdjKAA92rRGi+u5lP3AnlJGLNuhXsHsQt2nfZdLamhEkWW5fsjKi8+7t+GKh4j7EYEpaok++76xYNFhuaHoWOLZnD++urXKSoDyeXVXKKSddOhbufq0YOh2Nn57+1C3K8hdkR3WdFseFctHog==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none", "From": "Andrey Vesnovaty <andreyv@nvidia.com>", "To": "Andrew Rybchenko <arybchenko@solarflare.com>, Ajit Khaparde\n <ajit.khaparde@broadcom.com>, Ori Kam <orika@nvidia.com>, Andrew Rybchenko\n <arybchenko@solarflare.com>", "CC": "NBU-Contact-Thomas Monjalon <thomas@monjalon.net>, Slava Ovsiienko\n <viacheslavo@nvidia.com>, \"jerinj@marvell.com\" <jerinj@marvell.com>, dpdk-dev\n <dev@dpdk.org>, \"jer@marvell.com\" <jer@marvell.com>, Jerin Jacob\n <jerinjacobk@gmail.com>, Ferruh Yigit <ferruh.yigit@intel.com>, \"Stephen\n Hemminger\" <stephen@networkplumber.org>, Bruce Richardson\n <bruce.richardson@intel.com>, Ori Kam <orika@mellanox.com>, \"Viacheslav\n Ovsiienko\" <viacheslavo@mellanox.com>, \"andrey.vesnovaty@gmail.com\"\n <andrey.vesnovaty@gmail.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman\n <nhorman@tuxdriver.com>, Thomas Monjalon <tmonjalon@nvidia.com>, Samik Gupta\n <samik.gupta@broadcom.com>", "Thread-Topic": "[dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "Thread-Index": "\n AQHWac+xdJPDU/OvwEKNpRAY5MGzB6lkgkQAgAVRfgCAAEgbgIABkC3AgAA9KICAAVMLAIAACCqAgAs40ICAApXi0A==", "Date": "Sat, 26 Sep 2020 11:09:55 +0000", "Message-ID": "\n <MWHPR1201MB252566195BE51EA0B0C768C8DB370@MWHPR1201MB2525.namprd12.prod.outlook.com>", "References": "<20200702120511.16315-1-andreyv@mellanox.com>\n <20200708213946.30108-1-andreyv@mellanox.com>\n <20200708213946.30108-2-andreyv@mellanox.com>\n <CACZ4nhsopFOU6O1zSxj8zbn+Msis2M=2HcQ3G=QzHiHmmJiHDg@mail.gmail.com>\n <MWHPR1201MB25257988BEBB99B2845CA913DB200@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhsHedmi-02WiXFJUqAww9iKFK5r+VChJ0-t0oKuBCa5ow@mail.gmail.com>\n <MWHPR1201MB2525C25AED0C6A2EC1242170DB210@MWHPR1201MB2525.namprd12.prod.outlook.com>\n <CACZ4nhuYP+ZnH3bDusPQumCcs8Azk2OAFm1=BQY6QmuMa=-Y4A@mail.gmail.com>\n <e24d0489-526e-b576-a770-9ced86d55ae4@solarflare.com>\n <MN2PR12MB4286DBE84D53C62BA5E8D87AD63E0@MN2PR12MB4286.namprd12.prod.outlook.com>\n <CACZ4nhtQob5_pu129GFCORe=kxTV9NRKYZfRN4x7j2w-SLaWGw@mail.gmail.com>", "In-Reply-To": "\n <CACZ4nhtQob5_pu129GFCORe=kxTV9NRKYZfRN4x7j2w-SLaWGw@mail.gmail.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-Mentions": "ajit.khaparde@broadcom.com", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "authentication-results": "solarflare.com; dkim=none (message not signed)\n header.d=none;solarflare.com; dmarc=none action=none header.from=nvidia.com;", "x-originating-ip": "[87.71.167.10]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "b89f217e-005c-4200-d444-08d8620cb2fb", "x-ms-traffictypediagnostic": "MWHPR12MB1757:", "x-ld-processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <MWHPR12MB17579F691FE6471EDB36DF10DB370@MWHPR12MB1757.namprd12.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:8273;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n FyYDcnJzylJKcTOMS1Npy1F4oEeE2ax+ixk83aT0fNqRCXa1b00fS7DeaaKEi/w6svx7uNyWLL0/qcckiVy+NWFN2lRb8ozdMCiC/7WV+pXz8NVTrMhb94FB0s39TaNtBsLBqtYp97+qz/rfOZVBUo/96zQK3jiwyLbEVou3Jd0hAPZze0NA/QgS4+D7r9AaEEFxPIMp+gMZpOqtIYfYVa25We6iPiTMdbCnySLHGnL5Jqcpcnu+9ILAnOUpfubNrXNXlsPLq9tu0O2ryNABoDxC9nzIPB+AaJDIcOFkgeLXz7GTrQRKpiLvMiKdOpbJ2j1O0AVmE1+I1k/lZxDWodY8F8TNn8QOrRRKkzqBsHdlmwiDqFt0FO8T+QWqjfS5", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:MWHPR1201MB2525.namprd12.prod.outlook.com; PTR:;\n CAT:NONE;\n SFS:(4636009)(39860400002)(136003)(346002)(366004)(376002)(396003)(66556008)(4326008)(53546011)(6506007)(66446008)(86362001)(186003)(71200400001)(83380400001)(478600001)(7696005)(54906003)(110136005)(26005)(66476007)(64756008)(316002)(55016002)(9686003)(2906002)(7416002)(33656002)(8676002)(76116006)(66946007)(8936002)(5660300002)(52536014);\n DIR:OUT; SFP:1101;", "x-ms-exchange-antispam-messagedata": "\n La2opKgL6kZ7kgIUedXLn05MBUnVhP5d0jaiHKyUPR0xP8SRxaAtw4fVBNTuTUv8BbGjvROeodetkhQKg9r2jSaZOWD5kMRuG3+iVavC3JgOA8X6wYcAvoL0UprWJ02TSAlcxFLkFO+iJbO/oFU2jgQQu9NrpLhQf8yETWX+qO5DxYiAtT6bIA85+paAnbqgiIgJ2mkHMxdpNUFyw7KUj+r9iZVX84jmTe0H+vBJ/WtZBKyRjaGt24LTfxI+FR9p1BM0Ub8MGJPZc8wpzW0WRsaeUKvTFf9+9VHxB3ZtFLvTC5UhIRAR0mENYWVm2nrdb0H+7tDJs83dMa+gm/Ry6jXJfFuiaoEYQBPqxKplu+Rw84P6dlJ2s0qwNgjgHREiZyBFfBKUhC+p5JNwh6p03/3HFDh+Re28QSmXv9iZ+S4n5yZ12qTJUJbzHTQQpEP7DSL94YPCIGFTEkYGrFlukpRACWyZ3g4Cmi9Y9XnKVT972Zk2/StWCJaInZ/Bq0waS8GJ7aaRhLC+M12RtJrS7hdLTTiMlK2HfS7dzyzATCIfCfpym+Kz6ZVhM1f/4RZYURUecXBasu6Pj0OvbNHSIxVuVVFmUvF7x0SG7ADxrGBEWH8TkcubY0mG+Bp8AYpydaRGZsKJK0wT44OD5Y+NqQ==", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "\n MWHPR1201MB2525.namprd12.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n b89f217e-005c-4200-d444-08d8620cb2fb", "X-MS-Exchange-CrossTenant-originalarrivaltime": "26 Sep 2020 11:09:55.2454 (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": "\n q9ssSepg/oNG6aTuwvNy6eizrMdmkKY4Quq1zGOGAqUASLNA6H/SIsEqCjLgoGNAd/qor86TVc41MPOBGFB5NA==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MWHPR12MB1757", "X-OriginatorOrg": "Nvidia.com", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1;\n t=1601118561; bh=xzuH18H4VCImEDMv3xFPt4FWBN7Jbj0byjfOEo6HIcQ=;\n h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:\n CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:\n In-Reply-To:Accept-Language:Content-Language:X-Mentions:\n X-MS-Has-Attach:X-MS-TNEF-Correlator:authentication-results:\n x-originating-ip:x-ms-publictraffictype:\n x-ms-office365-filtering-correlation-id:x-ms-traffictypediagnostic:\n x-ld-processed:x-ms-exchange-transport-forked:\n x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers:\n x-ms-exchange-senderadcheck:x-microsoft-antispam:\n x-microsoft-antispam-message-info:x-forefront-antispam-report:\n x-ms-exchange-antispam-messagedata:Content-Type:\n Content-Transfer-Encoding:MIME-Version:\n X-MS-Exchange-CrossTenant-AuthAs:\n X-MS-Exchange-CrossTenant-AuthSource:\n X-MS-Exchange-CrossTenant-Network-Message-Id:\n X-MS-Exchange-CrossTenant-originalarrivaltime:\n X-MS-Exchange-CrossTenant-fromentityheader:\n X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype:\n X-MS-Exchange-CrossTenant-userprincipalname:\n X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg;\n b=fkdXuMTLUo1WN+saC3aQUuNJkK9gMTSwMJa29w4MYQ9dUTV0+/5K6RiGvetqHGds+\n A0lMSJRcUhRXBIWUO8uxVDErDbyu+EIVfRyhNHm8O9HO5bwZcsE+N12e+HeGNJqz7G\n eI3Tjp2eCcrZhLpJNbn8fHzgFlbLhkR41UcwFt5QGuyg96Gx5mZOdh0T+0RyCPJi3u\n 1Jv59doJ6018gE79urDwBITRX9KF8Li35+CHDA1hIC2vqs7gfl7foLNVof428aQD8B\n Bp/d6OhUA4XScoHagJU35l6NkAa0D8anxfL9Td+d+3ysIns0uRHCe7bZh2CiwrXigp\n +7b0qRu9iglrQ==", "Subject": "Re: [dpdk-dev] [PATCH v2 1/6] ethdev: add flow shared action API", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "addressed": null } ]