From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EA67FA0543; Fri, 12 Aug 2022 21:19:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E1AE42C3E; Fri, 12 Aug 2022 21:18:39 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id CB49840A7F for ; Fri, 12 Aug 2022 21:18:31 +0200 (CEST) Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id 7C7B4C6; Fri, 12 Aug 2022 22:18:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7C7B4C6 Authentication-Results: shelob.oktetlabs.ru/7C7B4C6; dkim=none; dkim-atps=neutral From: Ivan Malov To: dev@dpdk.org Cc: Ori Kam , Eli Britstein , Ilya Maximets , Thomas Monjalon , Stephen Hemminger , Jerin Jacob , Andrew Rybchenko , Aman Singh , Yuying Zhang , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Ferruh Yigit Subject: [PATCH 10/13] ethdev: remove deprecated flow item PF Date: Fri, 12 Aug 2022 22:18:24 +0300 Message-Id: <20220812191827.3187441-11-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru> References: <20220812191827.3187441-1-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Such deprecation was commenced in DPDK 21.11. Since then, no parties have objected. Remove. The patch breaks ABI. Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko --- app/test-pmd/cmdline_flow.c | 9 ---- doc/guides/nics/features/bnxt.ini | 1 - doc/guides/nics/features/cxgbe.ini | 1 - doc/guides/nics/features/default.ini | 1 - doc/guides/nics/features/sfc.ini | 1 - doc/guides/nics/sfc_efx.rst | 2 - doc/guides/prog_guide/rte_flow.rst | 34 ------------- .../prog_guide/switch_representation.rst | 14 ------ doc/guides/rel_notes/release_22_11.rst | 5 ++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 - drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c | 4 -- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 25 ---------- drivers/net/bnxt/tf_ulp/ulp_rte_parser.h | 5 -- drivers/net/cxgbe/cxgbe_flow.c | 21 -------- drivers/net/sfc/sfc_mae.c | 48 ------------------- lib/ethdev/rte_flow.c | 1 - lib/ethdev/rte_flow.h | 15 ------ 17 files changed, 5 insertions(+), 184 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 23889f7ab1..2722d5a48d 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -249,7 +249,6 @@ enum index { ITEM_INVERT, ITEM_ANY, ITEM_ANY_NUM, - ITEM_PF, ITEM_VF, ITEM_VF_ID, ITEM_PHY_PORT, @@ -1278,7 +1277,6 @@ static const enum index next_item[] = { ITEM_VOID, ITEM_INVERT, ITEM_ANY, - ITEM_PF, ITEM_VF, ITEM_PHY_PORT, ITEM_PORT_ID, @@ -3461,13 +3459,6 @@ static const struct token token_list[] = { .next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param), .args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)), }, - [ITEM_PF] = { - .name = "pf", - .help = "match traffic from/to the physical function", - .priv = PRIV_ITEM(PF, 0), - .next = NEXT(NEXT_ENTRY(ITEM_NEXT)), - .call = parse_vc, - }, [ITEM_VF] = { .name = "vf", .help = "match traffic from/to a virtual function ID", diff --git a/doc/guides/nics/features/bnxt.ini b/doc/guides/nics/features/bnxt.ini index afb5414b49..259480d1df 100644 --- a/doc/guides/nics/features/bnxt.ini +++ b/doc/guides/nics/features/bnxt.ini @@ -63,7 +63,6 @@ ipv6 = Y gre = Y icmp = Y icmp6 = Y -pf = Y phy_port = Y port_id = Y port_representor = Y diff --git a/doc/guides/nics/features/cxgbe.ini b/doc/guides/nics/features/cxgbe.ini index f674803ec4..d869f2100f 100644 --- a/doc/guides/nics/features/cxgbe.ini +++ b/doc/guides/nics/features/cxgbe.ini @@ -39,7 +39,6 @@ Usage doc = Y eth = Y ipv4 = Y ipv6 = Y -pf = Y phy_port = Y tcp = Y udp = Y diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini index d1db0c256a..aff236134e 100644 --- a/doc/guides/nics/features/default.ini +++ b/doc/guides/nics/features/default.ini @@ -121,7 +121,6 @@ meta = mpls = nsh = nvgre = -pf = pfcp = phy_port = port_id = diff --git a/doc/guides/nics/features/sfc.ini b/doc/guides/nics/features/sfc.ini index 2e798b5ef5..355174d5c2 100644 --- a/doc/guides/nics/features/sfc.ini +++ b/doc/guides/nics/features/sfc.ini @@ -47,7 +47,6 @@ ipv4 = Y ipv6 = Y mark = P nvgre = Y -pf = Y phy_port = Y port_id = Y port_representor = Y diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst index 39c6e23d5b..2dbc59e8f7 100644 --- a/doc/guides/nics/sfc_efx.rst +++ b/doc/guides/nics/sfc_efx.rst @@ -200,8 +200,6 @@ Supported pattern items (***transfer*** rules): - PHY_PORT (cannot repeat; conflicts with other traffic source items) -- PF (cannot repeat; conflicts with other traffic source items) - - VF (cannot repeat; conflicts with other traffic source items) - ETH diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 588914b231..72f0c3d346 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -535,37 +535,6 @@ Usage example, matching non-TCPv4 packets only: | 4 | END | +-------+----------+ -Item: ``PF`` -^^^^^^^^^^^^ - -This item is deprecated. Consider: - - `Item: PORT_REPRESENTOR`_ - - `Item: REPRESENTED_PORT`_ - -Matches traffic originating from (ingress) or going to (egress) the physical -function of the current device. - -If supported, should work even if the physical function is not managed by -the application and thus not associated with a DPDK port ID. - -- Can be combined with any number of `Item: VF`_ to match both PF and VF - traffic. -- ``spec``, ``last`` and ``mask`` must not be set. - -.. _table_rte_flow_item_pf: - -.. table:: PF - - +----------+-------+ - | Field | Value | - +==========+=======+ - | ``spec`` | unset | - +----------+-------+ - | ``last`` | unset | - +----------+-------+ - | ``mask`` | unset | - +----------+-------+ - Item: ``VF`` ^^^^^^^^^^^^ @@ -584,7 +553,6 @@ separate entities, should be addressed through their own DPDK port IDs. - Can be specified multiple times to match traffic addressed to several VF IDs. -- Can be combined with a PF item to match both PF and VF traffic. - Default ``mask`` matches any VF ID. .. _table_rte_flow_item_vf: @@ -2074,8 +2042,6 @@ This action is deprecated. Consider: Directs matching traffic to the physical function (PF) of the current device. -See `Item: PF`_. - - No configurable properties. .. _table_rte_flow_action_pf: diff --git a/doc/guides/prog_guide/switch_representation.rst b/doc/guides/prog_guide/switch_representation.rst index 3da30fc779..6fd7b98bdc 100644 --- a/doc/guides/prog_guide/switch_representation.rst +++ b/doc/guides/prog_guide/switch_representation.rst @@ -624,25 +624,11 @@ Same restrictions as `PORT_ID pattern item`_. - Targets **A**, **B** or **C** in `traffic steering`_. -PF Pattern Item -^^^^^^^^^^^^^^^ - -Matches traffic originating from (ingress) or going to (egress) the physical -function of the current device. - -If supported, should work even if the physical function is not managed by -the application and thus not associated with a DPDK port ID. Its behavior is -otherwise similar to `PORT_ID pattern item`_ using PF port ID. - -- Matches **A** in `traffic steering`_. - PF Action ^^^^^^^^^ Directs matching traffic to the physical function of the current device. -Same restrictions as `PF pattern item`_. - - Targets **A** in `traffic steering`_. VF Pattern Item diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst index c4ce32daed..b7469708af 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -76,6 +76,9 @@ Removed Items Also, make sure to start the actual text at the margin. ======================================================= +* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PF``; + use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``. + API Changes ----------- @@ -122,6 +125,8 @@ ABI Changes Also, make sure to start the actual text at the margin. ======================================================= +* ethdev: enum ``RTE_FLOW_ITEM`` was affected by deprecation procedure. + Known Issues ------------ diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index c105200fe7..4446560369 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3665,8 +3665,6 @@ This section lists supported pattern items and their attributes, if any. - ``num {unsigned}``: number of layers covered. -- ``pf``: match traffic from/to the physical function. - - ``vf``: match traffic from/to a virtual function ID. - ``id {unsigned}``: VF ID. diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c index e9337ecd2c..17216426d8 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_handler_tbl.c @@ -260,10 +260,6 @@ struct bnxt_ulp_rte_hdr_info ulp_hdr_info[] = { .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, .proto_hdr_func = ulp_rte_item_any_handler }, - [RTE_FLOW_ITEM_TYPE_PF] = { - .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, - .proto_hdr_func = ulp_rte_pf_hdr_handler - }, [RTE_FLOW_ITEM_TYPE_VF] = { .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED, .proto_hdr_func = ulp_rte_vf_hdr_handler diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c index 9edf3e8799..6a1d235f77 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c @@ -507,31 +507,6 @@ ulp_rte_parser_implicit_act_port_process(struct ulp_rte_parser_params *params) return BNXT_TF_RC_SUCCESS; } -/* Function to handle the parsing of RTE Flow item PF Header. */ -int32_t -ulp_rte_pf_hdr_handler(const struct rte_flow_item *item __rte_unused, - struct ulp_rte_parser_params *params) -{ - uint16_t port_id = 0; - uint16_t svif_mask = 0xFFFF; - uint32_t ifindex; - - /* Get the implicit port id */ - port_id = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_INCOMING_IF); - - /* perform the conversion from dpdk port to bnxt ifindex */ - if (ulp_port_db_dev_port_to_ulp_index(params->ulp_ctx, - port_id, - &ifindex)) { - BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n"); - return BNXT_TF_RC_ERROR; - } - - /* Update the SVIF details */ - return ulp_rte_parser_svif_set(params, ifindex, svif_mask, - BNXT_ULP_DIR_INVALID); -} - /* Function to handle the parsing of RTE Flow item VF Header. */ int32_t ulp_rte_vf_hdr_handler(const struct rte_flow_item *item, diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h index e4225d00f8..94918f6b4a 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h @@ -80,11 +80,6 @@ bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[], void bnxt_ulp_rte_parser_post_process(struct ulp_rte_parser_params *params); -/* Function to handle the parsing of RTE Flow item PF Header. */ -int32_t -ulp_rte_pf_hdr_handler(const struct rte_flow_item *item, - struct ulp_rte_parser_params *params); - /* Function to handle the parsing of RTE Flow item VF Header. */ int32_t ulp_rte_vf_hdr_handler(const struct rte_flow_item *item, diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c index 6e460dfe2e..e4f9c152b5 100644 --- a/drivers/net/cxgbe/cxgbe_flow.c +++ b/drivers/net/cxgbe/cxgbe_flow.c @@ -288,22 +288,6 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item, return 0; } -static int -ch_rte_parsetype_pf(const void *dmask __rte_unused, - const struct rte_flow_item *item __rte_unused, - struct ch_filter_specification *fs, - struct rte_flow_error *e __rte_unused) -{ - struct rte_flow *flow = (struct rte_flow *)fs->private; - struct rte_eth_dev *dev = flow->dev; - struct adapter *adap = ethdev2adap(dev); - - CXGBE_FILL_FS(1, 1, pfvf_vld); - - CXGBE_FILL_FS(adap->pf, 0x7, pf); - return 0; -} - static int ch_rte_parsetype_vf(const void *dmask, const struct rte_flow_item *item, struct ch_filter_specification *fs, @@ -1022,11 +1006,6 @@ static struct chrte_fparse parseitem[] = { .dmask = &rte_flow_item_tcp_mask, }, - [RTE_FLOW_ITEM_TYPE_PF] = { - .fptr = ch_rte_parsetype_pf, - .dmask = NULL, - }, - [RTE_FLOW_ITEM_TYPE_VF] = { .fptr = ch_rte_parsetype_vf, .dmask = &(const struct rte_flow_item_vf){ diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index eb197fbdeb..e8da2d2a0d 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -1685,42 +1685,6 @@ sfc_mae_rule_parse_item_phy_port(const struct rte_flow_item *item, return 0; } -static int -sfc_mae_rule_parse_item_pf(const struct rte_flow_item *item, - struct sfc_flow_parse_ctx *ctx, - struct rte_flow_error *error) -{ - struct sfc_mae_parse_ctx *ctx_mae = ctx->mae; - const efx_nic_cfg_t *encp = efx_nic_cfg_get(ctx_mae->sa->nic); - efx_mport_sel_t mport_v; - int rc; - - if (ctx_mae->match_mport_set) { - return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_ITEM, item, - "Can't handle multiple traffic source items"); - } - - rc = efx_mae_mport_by_pcie_function(encp->enc_pf, EFX_PCI_VF_INVALID, - &mport_v); - if (rc != 0) { - return rte_flow_error_set(error, rc, - RTE_FLOW_ERROR_TYPE_ITEM, item, - "Failed to convert the PF ID"); - } - - rc = efx_mae_match_spec_mport_set(ctx_mae->match_spec, &mport_v, NULL); - if (rc != 0) { - return rte_flow_error_set(error, rc, - RTE_FLOW_ERROR_TYPE_ITEM, item, - "Failed to set MPORT for the PF"); - } - - ctx_mae->match_mport_set = B_TRUE; - - return 0; -} - static int sfc_mae_rule_parse_item_vf(const struct rte_flow_item *item, struct sfc_flow_parse_ctx *ctx, @@ -2591,18 +2555,6 @@ static const struct sfc_flow_item sfc_flow_items[] = { .ctx_type = SFC_FLOW_PARSE_CTX_MAE, .parse = sfc_mae_rule_parse_item_phy_port, }, - { - .type = RTE_FLOW_ITEM_TYPE_PF, - .name = "PF", - /* - * In terms of RTE flow, this item is a META one, - * and its position in the pattern is don't care. - */ - .prev_layer = SFC_FLOW_ITEM_ANY_LAYER, - .layer = SFC_FLOW_ITEM_ANY_LAYER, - .ctx_type = SFC_FLOW_PARSE_CTX_MAE, - .parse = sfc_mae_rule_parse_item_pf, - }, { .type = RTE_FLOW_ITEM_TYPE_VF, .name = "VF", diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index 501be9d602..6ece72bf36 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -97,7 +97,6 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = { MK_FLOW_ITEM(VOID, 0), MK_FLOW_ITEM(INVERT, 0), MK_FLOW_ITEM(ANY, sizeof(struct rte_flow_item_any)), - MK_FLOW_ITEM(PF, 0), MK_FLOW_ITEM(VF, sizeof(struct rte_flow_item_vf)), MK_FLOW_ITEM(PHY_PORT, sizeof(struct rte_flow_item_phy_port)), MK_FLOW_ITEM(PORT_ID, sizeof(struct rte_flow_item_port_id)), diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index bc68fd5631..97de98e232 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -188,20 +188,6 @@ enum rte_flow_item_type { */ RTE_FLOW_ITEM_TYPE_ANY, - /** - * @deprecated - * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR - * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT - * - * [META] - * - * Matches traffic originating from (ingress) or going to (egress) - * the physical function of the current device. - * - * No associated specification structure. - */ - RTE_FLOW_ITEM_TYPE_PF, - /** * @deprecated * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR @@ -732,7 +718,6 @@ static const struct rte_flow_item_any rte_flow_item_any_mask = { * * - Can be specified multiple times to match traffic addressed to several * VF IDs. - * - Can be combined with a PF item to match both PF and VF traffic. * * A zeroed mask can be used to match any VF ID. */ -- 2.30.2