ITEM_PF,
ITEM_VF,
ITEM_VF_ID,
- ITEM_PORT,
- ITEM_PORT_INDEX,
+ ITEM_PHY_PORT,
+ ITEM_PHY_PORT_INDEX,
ITEM_RAW,
ITEM_RAW_RELATIVE,
ITEM_RAW_SEARCH,
ITEM_ANY,
ITEM_PF,
ITEM_VF,
- ITEM_PORT,
+ ITEM_PHY_PORT,
ITEM_RAW,
ITEM_ETH,
ITEM_VLAN,
ZERO,
};
-static const enum index item_port[] = {
- ITEM_PORT_INDEX,
+static const enum index item_phy_port[] = {
+ ITEM_PHY_PORT_INDEX,
ITEM_NEXT,
ZERO,
};
.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
},
- [ITEM_PORT] = {
- .name = "port",
- .help = "device-specific physical port index to use",
- .priv = PRIV_ITEM(PORT, sizeof(struct rte_flow_item_port)),
- .next = NEXT(item_port),
+ [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_PORT_INDEX] = {
+ [ITEM_PHY_PORT_INDEX] = {
.name = "index",
.help = "physical port index",
- .next = NEXT(item_port, NEXT_ENTRY(UNSIGNED), item_param),
- .args = ARGS(ARGS_ENTRY(struct rte_flow_item_port, index)),
+ .next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
},
[ITEM_RAW] = {
.name = "raw",
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(PORT, sizeof(struct rte_flow_item_port)),
+ MK_FLOW_ITEM(PHY_PORT, sizeof(struct rte_flow_item_phy_port)),
MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)),
MK_FLOW_ITEM(ETH, sizeof(struct rte_flow_item_eth)),
MK_FLOW_ITEM(VLAN, sizeof(struct rte_flow_item_vlan)),
not necessarily intended for it (e.g. coming from or addressed to different
physical ports, VFs or applications) at the device level.
-It complements the behavior of some pattern items such as `Item: PORT`_ and
-is meaningless without them.
+It complements the behavior of some pattern items such as `Item: PHY_PORT`_
+and is meaningless without them.
When transferring flow rules, **ingress** and **egress** attributes
(`Attribute: Traffic direction`_) keep their original meaning, as if
| ``mask`` | ``id`` | zeroed to match any VF ID |
+----------+----------+---------------------------+
-Item: ``PORT``
-^^^^^^^^^^^^^^
+Item: ``PHY_PORT``
+^^^^^^^^^^^^^^^^^^
-Matches packets coming from the specified physical port of the underlying
-device.
+Matches traffic originating from (ingress) or going to (egress) a physical
+port of the underlying device.
-The first 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.
+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
- Default ``mask`` matches any port index.
-.. _table_rte_flow_item_port:
+.. _table_rte_flow_item_phy_port:
-.. table:: PORT
+.. table:: PHY_PORT
+----------+-----------+--------------------------------+
| Field | Subfield | Value |
* PF and VF pattern items are now only accepted by PMDs that implement
them (bnxt and i40e) when the transfer attribute is also present for
consistency.
+ * Pattern item PORT was renamed PHY_PORT to avoid confusion with DPDK port
+ IDs.
ABI Changes
- ``id {unsigned}``: VF ID.
-- ``port``: device-specific physical port index to use.
+- ``phy_port``: match traffic from/to a specific physical port.
- ``index {unsigned}``: physical port index.
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(PORT, sizeof(struct rte_flow_item_port)),
+ MK_FLOW_ITEM(PHY_PORT, sizeof(struct rte_flow_item_phy_port)),
MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)),
MK_FLOW_ITEM(ETH, sizeof(struct rte_flow_item_eth)),
MK_FLOW_ITEM(VLAN, sizeof(struct rte_flow_item_vlan)),
* applications) at the device level.
*
* It complements the behavior of some pattern items such as
- * RTE_FLOW_ITEM_TYPE_PORT and is meaningless without them.
+ * RTE_FLOW_ITEM_TYPE_PHY_PORT and is meaningless without them.
*
* When transferring flow rules, ingress and egress attributes keep
* their original meaning, as if processing traffic emitted or
/**
* [META]
*
- * Matches packets coming from the specified physical port of the
- * underlying device.
- *
- * The first 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.
+ * Matches traffic originating from (ingress) or going to (egress) a
+ * physical port of the underlying device.
*
- * See struct rte_flow_item_port.
+ * See struct rte_flow_item_phy_port.
*/
- RTE_FLOW_ITEM_TYPE_PORT,
+ RTE_FLOW_ITEM_TYPE_PHY_PORT,
/**
* Matches a byte string of a given length at a given offset.
#endif
/**
- * RTE_FLOW_ITEM_TYPE_PORT
+ * RTE_FLOW_ITEM_TYPE_PHY_PORT
*
- * Matches packets coming from the specified physical port of the underlying
- * device.
+ * Matches traffic originating from (ingress) or going to (egress) a
+ * physical port of the underlying device.
*
- * The first PORT item overrides the physical port normally associated with
- * the specified DPDK input port (port_id). This item can be provided
+ * 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
*
* A zeroed mask can be used to match any port index.
*/
-struct rte_flow_item_port {
+struct rte_flow_item_phy_port {
uint32_t index; /**< Physical port index. */
};
-/** Default mask for RTE_FLOW_ITEM_TYPE_PORT. */
+/** Default mask for RTE_FLOW_ITEM_TYPE_PHY_PORT. */
#ifndef __cplusplus
-static const struct rte_flow_item_port rte_flow_item_port_mask = {
+static const struct rte_flow_item_phy_port rte_flow_item_phy_port_mask = {
.index = 0x00000000,
};
#endif