Test-Label: iol-testing Test-Status: WARNING http://dpdk.org/patch/102450 _apply patch failure_ Submitter: Viacheslav Ovsiienko Date: Wednesday, October 20 2021 15:14:57 Applied on: CommitID:69a3c6319140b34fb714fa5bd6990cceb2ea2997 Apply patch set 102450-102453 failed: Checking patch doc/guides/prog_guide/rte_flow.rst... error: while searching for: See also `Action: REPRESENTED_PORT`_. Actions ~~~~~~~ error: patch failed: doc/guides/prog_guide/rte_flow.rst:1548 Checking patch doc/guides/rel_notes/release_21_11.rst... error: while searching for: Added macros ETH_RSS_IPV4_CHKSUM and ETH_RSS_L4_CHKSUM, now IPv4 and TCP/UDP/SCTP header checksum field can be used as input set for RSS. * **Added ethdev support to control delivery of Rx metadata from the HW to the PMD** A new API, ``rte_eth_rx_metadata_negotiate()``, was added. error: patch failed: doc/guides/rel_notes/release_21_11.rst:80 Checking patch lib/ethdev/rte_flow.c... error: while searching for: MK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)), MK_FLOW_ITEM(PORT_REPRESENTOR, sizeof(struct rte_flow_item_ethdev)), MK_FLOW_ITEM(REPRESENTED_PORT, sizeof(struct rte_flow_item_ethdev)), }; /** Generate flow_action[] entry. */ error: patch failed: lib/ethdev/rte_flow.c:141 error: while searching for: ops->pick_transfer_proxy(dev, proxy_port_id, error), error); } error: patch failed: lib/ethdev/rte_flow.c:1332 Checking patch lib/ethdev/rte_flow.h... error: while searching for: * @see struct rte_flow_item_ethdev */ RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT, }; /** error: patch failed: lib/ethdev/rte_flow.h:635 Hunk #2 succeeded at 1839 (offset -101 lines). error: while searching for: int rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, struct rte_flow_error *error); #ifdef __cplusplus } #endif error: patch failed: lib/ethdev/rte_flow.h:4477 Checking patch lib/ethdev/rte_flow_driver.h... error: while searching for: (struct rte_eth_dev *dev, uint16_t *proxy_port_id, struct rte_flow_error *error); }; /** error: patch failed: lib/ethdev/rte_flow_driver.h:144 Checking patch lib/ethdev/version.map... error: while searching for: rte_eth_macaddrs_get; rte_eth_rx_metadata_negotiate; rte_flow_pick_transfer_proxy; }; INTERNAL { error: patch failed: lib/ethdev/version.map:253 Applying patch doc/guides/prog_guide/rte_flow.rst with 1 reject... Rejected hunk #1. Applying patch doc/guides/rel_notes/release_21_11.rst with 1 reject... Rejected hunk #1. Applying patch lib/ethdev/rte_flow.c with 2 rejects... Hunk #1 applied cleanly. Rejected hunk #2. Rejected hunk #3. Applying patch lib/ethdev/rte_flow.h with 2 rejects... Rejected hunk #1. Hunk #2 applied cleanly. Rejected hunk #3. Applying patch lib/ethdev/rte_flow_driver.h with 1 reject... Rejected hunk #1. Applying patch lib/ethdev/version.map with 1 reject... Rejected hunk #1. diff a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst (rejected hunks) @@ -1548,6 +1548,31 @@ This item is meant to use the same structure as `Item: PORT_REPRESENTOR`_. See also `Action: REPRESENTED_PORT`_. +Item: ``FLEX`` +^^^^^^^^^^^^^^ + +Matches with the custom network protocol header that was created +using rte_flow_flex_item_create() API. The application describes +the desired header structure, defines the header fields attributes +and header relations with preceding and following protocols and +configures the ethernet devices accordingly via +rte_flow_flex_item_create() routine. + +- ``handle``: the flex item handle returned by the PMD on successful + rte_flow_flex_item_create() call, mask for this field is ignored. +- ``length``: match pattern length in bytes. If the length does not cover + all fields defined in item configuration, the pattern spec and mask are + considered by the driver as padded with trailing zeroes till the full + configured item pattern length. +- ``pattern``: pattern to match. The pattern is concatenation of bit fields + configured at item creation. At configuration the fields are presented + by sample_data array. The order of the bitfields is defined by the order + of sample_data elements. The width of each bitfield is defined by the width + specified in the corresponding sample_data element as well. If pattern + length is smaller than configured fields overall length it is considered + as padded with trailing zeroes up to full configured length, both for + value and mask. + Actions ~~~~~~~ diff a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst (rejected hunks) @@ -80,6 +80,13 @@ New Features Added macros ETH_RSS_IPV4_CHKSUM and ETH_RSS_L4_CHKSUM, now IPv4 and TCP/UDP/SCTP header checksum field can be used as input set for RSS. +* **Introduced flow flex item.** + + * The configurable flow flex item provides the capability to introduce + the arbitrary user specified network protocol header, configure the device + hardware accordingly, and perform match on this header with desired patterns + and masks. + * **Added ethdev support to control delivery of Rx metadata from the HW to the PMD** A new API, ``rte_eth_rx_metadata_negotiate()``, was added. diff a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c (rejected hunks) @@ -141,6 +154,8 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = { MK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)), MK_FLOW_ITEM(PORT_REPRESENTOR, sizeof(struct rte_flow_item_ethdev)), MK_FLOW_ITEM(REPRESENTED_PORT, sizeof(struct rte_flow_item_ethdev)), + MK_FLOW_ITEM_FN(FLEX, sizeof(struct rte_flow_item_flex), + rte_flow_item_flex_conv), }; /** Generate flow_action[] entry. */ @@ -1332,3 +1347,43 @@ rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, ops->pick_transfer_proxy(dev, proxy_port_id, error), error); } + +struct rte_flow_item_flex_handle * +rte_flow_flex_item_create(uint16_t port_id, + const struct rte_flow_item_flex_conf *conf, + struct rte_flow_error *error) +{ + struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error); + struct rte_flow_item_flex_handle *handle; + + if (unlikely(!ops)) + return NULL; + if (unlikely(!ops->flex_item_create)) { + rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, rte_strerror(ENOTSUP)); + return NULL; + } + handle = ops->flex_item_create(dev, conf, error); + if (handle == NULL) + flow_err(port_id, -rte_errno, error); + return handle; +} + +int +rte_flow_flex_item_release(uint16_t port_id, + const struct rte_flow_item_flex_handle *handle, + struct rte_flow_error *error) +{ + int ret; + struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error); + + if (unlikely(!ops || !ops->flex_item_release)) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, + NULL, rte_strerror(ENOTSUP)); + ret = ops->flex_item_release(dev, handle, error); + return flow_err(port_id, ret, error); +} diff a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h (rejected hunks) @@ -635,6 +635,15 @@ enum rte_flow_item_type { * @see struct rte_flow_item_ethdev */ RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT, + + /** + * Matches a configured set of fields at runtime calculated offsets + * over the generic network header with variable length and + * flexible pattern + * + * @see struct rte_flow_item_flex. + */ + RTE_FLOW_ITEM_TYPE_FLEX, }; /** @@ -4477,6 +4657,51 @@ __rte_experimental int rte_flow_pick_transfer_proxy(uint16_t port_id, uint16_t *proxy_port_id, struct rte_flow_error *error); + +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Create the flex item with specified configuration over + * the Ethernet device. + * + * @param port_id + * Port identifier of Ethernet device. + * @param[in] conf + * Item configuration. + * @param[out] error + * Perform verbose error reporting if not NULL. PMDs initialize this + * structure in case of error only. + * + * @return + * Non-NULL opaque pointer on success, NULL otherwise and rte_errno is set. + */ +__rte_experimental +struct rte_flow_item_flex_handle * +rte_flow_flex_item_create(uint16_t port_id, + const struct rte_flow_item_flex_conf *conf, + struct rte_flow_error *error); + +/** + * Release the flex item on the specified Ethernet device. + * + * @param port_id + * Port identifier of Ethernet device. + * @param[in] handle + * Handle of the item existing on the specified device. + * @param[out] error + * Perform verbose error reporting if not NULL. PMDs initialize this + * structure in case of error only. + * + * @return + * 0 on success, a negative errno value otherwise and rte_errno is set. + */ +__rte_experimental +int +rte_flow_flex_item_release(uint16_t port_id, + const struct rte_flow_item_flex_handle *handle, + struct rte_flow_error *error); + #ifdef __cplusplus } #endif diff a/lib/ethdev/rte_flow_driver.h b/lib/ethdev/rte_flow_driver.h (rejected hunks) @@ -144,6 +144,14 @@ struct rte_flow_ops { (struct rte_eth_dev *dev, uint16_t *proxy_port_id, struct rte_flow_error *error); + struct rte_flow_item_flex_handle *(*flex_item_create) + (struct rte_eth_dev *dev, + const struct rte_flow_item_flex_conf *conf, + struct rte_flow_error *error); + int (*flex_item_release) + (struct rte_eth_dev *dev, + const struct rte_flow_item_flex_handle *handle, + struct rte_flow_error *error); }; /** diff a/lib/ethdev/version.map b/lib/ethdev/version.map (rejected hunks) @@ -253,6 +253,8 @@ EXPERIMENTAL { rte_eth_macaddrs_get; rte_eth_rx_metadata_negotiate; rte_flow_pick_transfer_proxy; + rte_flow_flex_item_create; + rte_flow_flex_item_release; }; INTERNAL { Checking patch app/test-pmd/cmdline_flow.c... Hunk #1 succeeded at 7962 (offset -114 lines). Checking patch app/test-pmd/testpmd.h... error: while searching for: void remove_tx_dynf_callback(portid_t portid); int update_mtu_from_frame_size(portid_t portid, uint32_t max_rx_pktlen); /* * Work-around of a compilation error with ICC on invocations of the * rte_be_to_cpu_16() function. error: patch failed: app/test-pmd/testpmd.h:1047 Applied patch app/test-pmd/cmdline_flow.c cleanly. Applying patch app/test-pmd/testpmd.h with 1 reject... Rejected hunk #1. diff a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h (rejected hunks) @@ -1047,6 +1047,11 @@ void add_tx_dynf_callback(portid_t portid); void remove_tx_dynf_callback(portid_t portid); int update_mtu_from_frame_size(portid_t portid, uint32_t max_rx_pktlen); +extern int flow_parse(const char *src, void *result, unsigned int size, + struct rte_flow_attr **attr, + struct rte_flow_item **pattern, + struct rte_flow_action **actions); + /* * Work-around of a compilation error with ICC on invocations of the * rte_be_to_cpu_16() function. Checking patch app/test-pmd/cmd_flex_item.c... Checking patch app/test-pmd/cmdline.c... Hunk #1 succeeded at 17539 (offset -322 lines). Checking patch app/test-pmd/cmdline_flow.c... error: app/test-pmd/cmdline_flow.c: does not match index Checking patch app/test-pmd/meson.build... Checking patch app/test-pmd/testpmd.c... error: while searching for: if (is_proc_primary()) { port_flow_flush(pi); rte_eth_dev_close(pi); } error: patch failed: app/test-pmd/testpmd.c:3118 Hunk #2 succeeded at 4017 (offset -207 lines). Checking patch app/test-pmd/testpmd.h... Hunk #2 succeeded at 282 (offset -16 lines). Hunk #3 succeeded at 327 (offset -16 lines). error: while searching for: void add_tx_dynf_callback(portid_t portid); void remove_tx_dynf_callback(portid_t portid); int update_mtu_from_frame_size(portid_t portid, uint32_t max_rx_pktlen); extern int flow_parse(const char *src, void *result, unsigned int size, struct rte_flow_attr **attr, error: patch failed: app/test-pmd/testpmd.h:1046 Checking patch doc/guides/testpmd_app_ug/testpmd_funcs.rst... Hunk #1 succeeded at 5066 (offset -25 lines). Applied patch app/test-pmd/cmd_flex_item.c cleanly. Applied patch app/test-pmd/cmdline.c cleanly. Applied patch app/test-pmd/meson.build cleanly. Applying patch app/test-pmd/testpmd.c with 1 reject... Rejected hunk #1. Hunk #2 applied cleanly. Applying patch app/test-pmd/testpmd.h with 1 reject... Hunk #1 applied cleanly. Hunk #2 applied cleanly. Hunk #3 applied cleanly. Rejected hunk #4. Applied patch doc/guides/testpmd_app_ug/testpmd_funcs.rst cleanly. diff a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c (rejected hunks) @@ -3118,6 +3118,7 @@ close_port(portid_t pid) if (is_proc_primary()) { port_flow_flush(pi); + port_flex_item_flush(pi); rte_eth_dev_close(pi); } diff a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h (rejected hunks) @@ -1046,6 +1072,10 @@ uint16_t tx_pkt_set_dynf(uint16_t port_id, __rte_unused uint16_t queue, void add_tx_dynf_callback(portid_t portid); void remove_tx_dynf_callback(portid_t portid); int update_mtu_from_frame_size(portid_t portid, uint32_t max_rx_pktlen); +int update_jumbo_frame_offload(portid_t portid); +void flex_item_create(portid_t port_id, uint16_t flex_id, const char *filename); +void flex_item_destroy(portid_t port_id, uint16_t flex_id); +void port_flex_item_flush(portid_t port_id); extern int flow_parse(const char *src, void *result, unsigned int size, struct rte_flow_attr **attr, https://lab.dpdk.org/results/dashboard/patchsets/19590/ UNH-IOL DPDK Community Lab