@@ -249,8 +249,6 @@ enum index {
ITEM_INVERT,
ITEM_ANY,
ITEM_ANY_NUM,
- ITEM_PHY_PORT,
- ITEM_PHY_PORT_INDEX,
ITEM_PORT_ID,
ITEM_PORT_ID_ID,
ITEM_MARK,
@@ -1275,7 +1273,6 @@ static const enum index next_item[] = {
ITEM_VOID,
ITEM_INVERT,
ITEM_ANY,
- ITEM_PHY_PORT,
ITEM_PORT_ID,
ITEM_MARK,
ITEM_RAW,
@@ -1345,12 +1342,6 @@ static const enum index item_any[] = {
ZERO,
};
-static const enum index item_phy_port[] = {
- ITEM_PHY_PORT_INDEX,
- ITEM_NEXT,
- ZERO,
-};
-
static const enum index item_port_id[] = {
ITEM_PORT_ID_ID,
ITEM_NEXT,
@@ -3450,21 +3441,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_PHY_PORT] = {
- .name = "phy_port",
- .help = "match traffic from/to a specific physical port",
- .priv = PRIV_ITEM(PHY_PORT,
- sizeof(struct rte_flow_item_phy_port)),
- .next = NEXT(item_phy_port),
- .call = parse_vc,
- },
- [ITEM_PHY_PORT_INDEX] = {
- .name = "index",
- .help = "physical port index",
- .next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED),
- item_param),
- .args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
- },
[ITEM_PORT_ID] = {
.name = "port_id",
.help = "match traffic from/to a given DPDK port ID",
@@ -63,7 +63,6 @@ ipv6 = Y
gre = Y
icmp = Y
icmp6 = Y
-phy_port = Y
port_id = Y
port_representor = Y
represented_port = Y
@@ -39,7 +39,6 @@ Usage doc = Y
eth = Y
ipv4 = Y
ipv6 = Y
-phy_port = Y
tcp = Y
udp = Y
vlan = Y
@@ -122,7 +122,6 @@ mpls =
nsh =
nvgre =
pfcp =
-phy_port =
port_id =
port_representor =
ppp =
@@ -76,7 +76,6 @@ mark = Y
meta = Y
mpls = Y
nvgre = Y
-phy_port = Y
port_id = Y
tag = Y
tcp = Y
@@ -47,7 +47,6 @@ ipv4 = Y
ipv6 = Y
mark = P
nvgre = Y
-phy_port = Y
port_id = Y
port_representor = Y
pppoed = Y
@@ -198,8 +198,6 @@ Supported pattern items (***transfer*** rules):
- PORT_ID (cannot repeat; conflicts with other traffic source items)
-- PHY_PORT (cannot repeat; conflicts with other traffic source items)
-
- ETH
- VLAN (double-tagging is supported)
@@ -535,44 +535,6 @@ Usage example, matching non-TCPv4 packets only:
| 4 | END |
+-------+----------+
-Item: ``PHY_PORT``
-^^^^^^^^^^^^^^^^^^
-
-This item is deprecated. Consider:
- - `Item: PORT_REPRESENTOR`_
- - `Item: REPRESENTED_PORT`_
-
-Matches traffic originating from (ingress) or going to (egress) a physical
-port of the underlying device.
-
-The first PHY_PORT item overrides the physical port normally associated with
-the specified DPDK input port (port_id). This item can be provided several
-times to match additional physical ports.
-
-Note that physical ports are not necessarily tied to DPDK input ports
-(port_id) when those are not under DPDK control. Possible values are
-specific to each device, they are not necessarily indexed from zero and may
-not be contiguous.
-
-As a device property, the list of allowed values as well as the value
-associated with a port_id should be retrieved by other means.
-
-- Default ``mask`` matches any port index.
-
-.. _table_rte_flow_item_phy_port:
-
-.. table:: PHY_PORT
-
- +----------+-----------+--------------------------------+
- | Field | Subfield | Value |
- +==========+===========+================================+
- | ``spec`` | ``index`` | physical port index |
- +----------+-----------+--------------------------------+
- | ``last`` | ``index`` | upper range value |
- +----------+-----------+--------------------------------+
- | ``mask`` | ``index`` | zeroed to match any port index |
- +----------+-----------+--------------------------------+
-
Item: ``PORT_ID``
^^^^^^^^^^^^^^^^^
@@ -586,11 +548,6 @@ port ID.
Normally only supported if the port ID in question is known by the
underlying PMD and related to the device the flow rule is created against.
-This must not be confused with `Item: PHY_PORT`_ which refers to the
-physical port of a device, whereas `Item: PORT_ID`_ refers to a ``struct
-rte_eth_dev`` object on the application side (also known as "port
-representor" depending on the kind of underlying device).
-
- Default ``mask`` matches the specified DPDK port ID.
.. _table_rte_flow_item_port_id:
@@ -2056,8 +2013,6 @@ This action is deprecated. Consider:
Directs matching traffic to a given physical port index of the underlying
device.
-See `Item: PHY_PORT`_.
-
.. _table_rte_flow_action_phy_port:
.. table:: PHY_PORT
@@ -82,6 +82,9 @@ Removed Items
* ethdev: removed ``RTE_FLOW_ITEM_TYPE_VF``;
use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PHY_PORT``;
+ use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
+
API Changes
-----------
@@ -3665,10 +3665,6 @@ This section lists supported pattern items and their attributes, if any.
- ``num {unsigned}``: number of layers covered.
-- ``phy_port``: match traffic from/to a specific physical port.
-
- - ``index {unsigned}``: physical port index.
-
- ``port_id``: match traffic from/to a given DPDK port ID.
- ``id {unsigned}``: DPDK port ID.
@@ -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_PHY_PORT] = {
- .hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
- .proto_hdr_func = ulp_rte_phy_port_hdr_handler
- },
[RTE_FLOW_ITEM_TYPE_PORT_ID] = {
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
.proto_hdr_func = ulp_rte_port_hdr_handler
@@ -571,81 +571,6 @@ ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
return ulp_rte_parser_svif_set(params, ifindex, mask, item_dir);
}
-/* Function to handle the parsing of RTE Flow item phy port Header. */
-int32_t
-ulp_rte_phy_port_hdr_handler(const struct rte_flow_item *item,
- struct ulp_rte_parser_params *params)
-{
- const struct rte_flow_item_phy_port *port_spec = item->spec;
- const struct rte_flow_item_phy_port *port_mask = item->mask;
- uint16_t mask = 0;
- int32_t rc = BNXT_TF_RC_ERROR;
- uint16_t svif;
- enum bnxt_ulp_direction_type dir;
- struct ulp_rte_hdr_field *hdr_field;
-
- /* Copy the rte_flow_item for phy port into hdr_field */
- if (!port_spec) {
- BNXT_TF_DBG(ERR, "ParseErr:Phy Port id is not valid\n");
- return rc;
- }
- if (!port_mask) {
- BNXT_TF_DBG(ERR, "ParseErr:Phy Port mask is not valid\n");
- return rc;
- }
- mask = port_mask->index;
-
- /* Update the match port type */
- ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_MATCH_PORT_TYPE,
- BNXT_ULP_INTF_TYPE_PHY_PORT);
-
- /* Compute the Hw direction */
- bnxt_ulp_rte_parser_direction_compute(params);
-
- /* Direction validation */
- dir = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_DIRECTION);
- if (dir == BNXT_ULP_DIR_EGRESS) {
- BNXT_TF_DBG(ERR,
- "Parse Err:Phy ports are valid only for ingress\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
-
- /* Get the physical port details from port db */
- rc = ulp_port_db_phy_port_svif_get(params->ulp_ctx, port_spec->index,
- &svif);
- if (rc) {
- BNXT_TF_DBG(ERR, "Failed to get port details\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
-
- /* Update the SVIF details */
- svif = rte_cpu_to_be_16(svif);
- hdr_field = ¶ms->hdr_field[BNXT_ULP_PROTO_HDR_FIELD_SVIF_IDX];
- memcpy(hdr_field->spec, &svif, sizeof(svif));
- memcpy(hdr_field->mask, &mask, sizeof(mask));
- hdr_field->size = sizeof(svif);
- ULP_COMP_FLD_IDX_WR(params, BNXT_ULP_CF_IDX_SVIF_FLAG,
- rte_be_to_cpu_16(svif));
- if (!mask) {
- uint32_t port_id = 0;
- uint16_t phy_port = 0;
-
- /* Validate the control port */
- port_id = ULP_COMP_FLD_IDX_RD(params,
- BNXT_ULP_CF_IDX_DEV_PORT_ID);
- if (ulp_port_db_phy_port_get(params->ulp_ctx,
- port_id, &phy_port) ||
- (uint16_t)port_spec->index != phy_port) {
- BNXT_TF_DBG(ERR, "Mismatch of control and phy_port\n");
- return BNXT_TF_RC_PARSE_ERR;
- }
- ULP_BITMAP_SET(params->hdr_bitmap.bits,
- BNXT_ULP_HDR_BIT_SVIF_IGNORE);
- memset(hdr_field->mask, 0xFF, sizeof(mask));
- }
- return BNXT_TF_RC_SUCCESS;
-}
-
/* Function to handle the update of proto header based on field values */
static void
ulp_rte_l2_proto_type_update(struct ulp_rte_parser_params *param,
@@ -85,11 +85,6 @@ int32_t
ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
struct ulp_rte_parser_params *params);
-/* Function to handle the parsing of RTE Flow item port Header. */
-int32_t
-ulp_rte_phy_port_hdr_handler(const struct rte_flow_item *item,
- struct ulp_rte_parser_params *params);
-
/* Function to handle the RTE item Ethernet Header. */
int32_t
ulp_rte_eth_hdr_handler(const struct rte_flow_item *item,
@@ -208,31 +208,6 @@ ch_rte_parsetype_eth(const void *dmask, const struct rte_flow_item *item,
return 0;
}
-static int
-ch_rte_parsetype_port(const void *dmask, const struct rte_flow_item *item,
- struct ch_filter_specification *fs,
- struct rte_flow_error *e)
-{
- const struct rte_flow_item_phy_port *val = item->spec;
- const struct rte_flow_item_phy_port *umask = item->mask;
- const struct rte_flow_item_phy_port *mask;
-
- mask = umask ? umask : (const struct rte_flow_item_phy_port *)dmask;
-
- if (!val)
- return 0; /* Wildcard, match all physical ports */
-
- if (val->index > 0x7)
- return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
- item,
- "port index up to 0x7 is supported");
-
- if (val->index || (umask && umask->index))
- CXGBE_FILL_FS(val->index, mask->index, iport);
-
- return 0;
-}
-
static int
ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
struct ch_filter_specification *fs,
@@ -926,13 +901,6 @@ static struct chrte_fparse parseitem[] = {
}
},
- [RTE_FLOW_ITEM_TYPE_PHY_PORT] = {
- .fptr = ch_rte_parsetype_port,
- .dmask = &(const struct rte_flow_item_phy_port){
- .index = 0x7,
- }
- },
-
[RTE_FLOW_ITEM_TYPE_VLAN] = {
.fptr = ch_rte_parsetype_vlan,
.dmask = &(const struct rte_flow_item_vlan){
@@ -1628,63 +1628,6 @@ sfc_mae_rule_parse_item_ethdev_based(const struct rte_flow_item *item,
return 0;
}
-static int
-sfc_mae_rule_parse_item_phy_port(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 struct rte_flow_item_phy_port supp_mask = {
- .index = 0xffffffff,
- };
- const void *def_mask = &rte_flow_item_phy_port_mask;
- const struct rte_flow_item_phy_port *spec = NULL;
- const struct rte_flow_item_phy_port *mask = NULL;
- 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 = sfc_flow_parse_init(item,
- (const void **)&spec, (const void **)&mask,
- (const void *)&supp_mask, def_mask,
- sizeof(struct rte_flow_item_phy_port), error);
- if (rc != 0)
- return rc;
-
- if (mask->index != supp_mask.index) {
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Bad mask in the PHY_PORT pattern item");
- }
-
- /* If "spec" is not set, could be any physical port */
- if (spec == NULL)
- return 0;
-
- rc = efx_mae_mport_by_phy_port(spec->index, &mport_v);
- if (rc != 0) {
- return rte_flow_error_set(error, rc,
- RTE_FLOW_ERROR_TYPE_ITEM, item,
- "Failed to convert the PHY_PORT index");
- }
-
- 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 PHY_PORT");
- }
-
- ctx_mae->match_mport_set = B_TRUE;
-
- return 0;
-}
-
/*
* Having this field ID in a field locator means that this
* locator cannot be used to actually set the field at the
@@ -2478,18 +2421,6 @@ static const struct sfc_flow_item sfc_flow_items[] = {
.ctx_type = SFC_FLOW_PARSE_CTX_MAE,
.parse = sfc_mae_rule_parse_item_ethdev_based,
},
- {
- .type = RTE_FLOW_ITEM_TYPE_PHY_PORT,
- .name = "PHY_PORT",
- /*
- * 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_phy_port,
- },
{
.type = RTE_FLOW_ITEM_TYPE_ETH,
.name = "ETH",
@@ -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(PHY_PORT, sizeof(struct rte_flow_item_phy_port)),
MK_FLOW_ITEM(PORT_ID, sizeof(struct rte_flow_item_port_id)),
MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)),
MK_FLOW_ITEM(ETH, sizeof(struct rte_flow_item_eth)),
@@ -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) a
- * physical port of the underlying device.
- *
- * See struct rte_flow_item_phy_port.
- */
- RTE_FLOW_ITEM_TYPE_PHY_PORT,
-
/**
* @deprecated
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
@@ -686,41 +672,6 @@ static const struct rte_flow_item_any rte_flow_item_any_mask = {
};
#endif
-/**
- * @deprecated
- * @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
- * @see RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT
- *
- * RTE_FLOW_ITEM_TYPE_PHY_PORT
- *
- * Matches traffic originating from (ingress) or going to (egress) a
- * physical port of the underlying device.
- *
- * The first PHY_PORT item overrides the physical port normally associated
- * with the specified DPDK input port (port_id). This item can be provided
- * several times to match additional physical ports.
- *
- * Note that physical ports are not necessarily tied to DPDK input ports
- * (port_id) when those are not under DPDK control. Possible values are
- * specific to each device, they are not necessarily indexed from zero and
- * may not be contiguous.
- *
- * As a device property, the list of allowed values as well as the value
- * associated with a port_id should be retrieved by other means.
- *
- * A zeroed mask can be used to match any port index.
- */
-struct rte_flow_item_phy_port {
- uint32_t index; /**< Physical port index. */
-};
-
-/** Default mask for RTE_FLOW_ITEM_TYPE_PHY_PORT. */
-#ifndef __cplusplus
-static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask = {
- .index = 0x00000000,
-};
-#endif
-
/**
* @deprecated
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
@@ -734,11 +685,6 @@ static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask = {
* Normally only supported if the port ID in question is known by the
* underlying PMD and related to the device the flow rule is created
* against.
- *
- * This must not be confused with @p PHY_PORT which refers to the physical
- * port of a device, whereas @p PORT_ID refers to a struct rte_eth_dev
- * object on the application side (also known as "port representor"
- * depending on the kind of underlying device).
*/
struct rte_flow_item_port_id {
uint32_t id; /**< DPDK port ID. */
@@ -3023,8 +2969,6 @@ struct rte_flow_action_vf {
*
* Directs packets to a given physical port index of the underlying
* device.
- *
- * @see RTE_FLOW_ITEM_TYPE_PHY_PORT
*/
struct rte_flow_action_phy_port {
uint32_t original:1; /**< Use original port index if possible. */