ethdev: remove deprecated flow item VF
Such deprecation was commenced in DPDK 21.11. Since then, no parties have objected. Remove. The patch breaks ABI. Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ori Kam <orika@nvidia.com>
This commit is contained in:
parent
13f8de927a
commit
5c45fde3e9
@ -250,8 +250,6 @@ enum index {
|
||||
ITEM_INVERT,
|
||||
ITEM_ANY,
|
||||
ITEM_ANY_NUM,
|
||||
ITEM_VF,
|
||||
ITEM_VF_ID,
|
||||
ITEM_PHY_PORT,
|
||||
ITEM_PHY_PORT_INDEX,
|
||||
ITEM_PORT_ID,
|
||||
@ -1278,7 +1276,6 @@ static const enum index next_item[] = {
|
||||
ITEM_VOID,
|
||||
ITEM_INVERT,
|
||||
ITEM_ANY,
|
||||
ITEM_VF,
|
||||
ITEM_PHY_PORT,
|
||||
ITEM_PORT_ID,
|
||||
ITEM_MARK,
|
||||
@ -1349,12 +1346,6 @@ static const enum index item_any[] = {
|
||||
ZERO,
|
||||
};
|
||||
|
||||
static const enum index item_vf[] = {
|
||||
ITEM_VF_ID,
|
||||
ITEM_NEXT,
|
||||
ZERO,
|
||||
};
|
||||
|
||||
static const enum index item_phy_port[] = {
|
||||
ITEM_PHY_PORT_INDEX,
|
||||
ITEM_NEXT,
|
||||
@ -3460,19 +3451,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_VF] = {
|
||||
.name = "vf",
|
||||
.help = "match traffic from/to a virtual function ID",
|
||||
.priv = PRIV_ITEM(VF, sizeof(struct rte_flow_item_vf)),
|
||||
.next = NEXT(item_vf),
|
||||
.call = parse_vc,
|
||||
},
|
||||
[ITEM_VF_ID] = {
|
||||
.name = "id",
|
||||
.help = "VF ID",
|
||||
.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
|
||||
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
|
||||
},
|
||||
[ITEM_PHY_PORT] = {
|
||||
.name = "phy_port",
|
||||
.help = "match traffic from/to a specific physical port",
|
||||
@ -10670,9 +10648,6 @@ flow_item_default_mask(const struct rte_flow_item *item)
|
||||
case RTE_FLOW_ITEM_TYPE_ANY:
|
||||
mask = &rte_flow_item_any_mask;
|
||||
break;
|
||||
case RTE_FLOW_ITEM_TYPE_VF:
|
||||
mask = &rte_flow_item_vf_mask;
|
||||
break;
|
||||
case RTE_FLOW_ITEM_TYPE_PORT_ID:
|
||||
mask = &rte_flow_item_port_id_mask;
|
||||
break;
|
||||
|
@ -69,7 +69,6 @@ port_representor = Y
|
||||
represented_port = Y
|
||||
tcp = Y
|
||||
udp = Y
|
||||
vf = Y
|
||||
vlan = Y
|
||||
vxlan = Y
|
||||
|
||||
|
@ -42,7 +42,6 @@ ipv6 = Y
|
||||
phy_port = Y
|
||||
tcp = Y
|
||||
udp = Y
|
||||
vf = Y
|
||||
vlan = Y
|
||||
|
||||
[rte_flow actions]
|
||||
|
@ -135,7 +135,6 @@ sctp =
|
||||
tag =
|
||||
tcp =
|
||||
udp =
|
||||
vf =
|
||||
vlan =
|
||||
vxlan =
|
||||
vxlan_gpe =
|
||||
|
@ -68,7 +68,6 @@ raw = Y
|
||||
sctp = Y
|
||||
tcp = Y
|
||||
udp = Y
|
||||
vf = Y
|
||||
vlan = Y
|
||||
vxlan = Y
|
||||
|
||||
|
@ -55,7 +55,6 @@ pppoes = Y
|
||||
represented_port = Y
|
||||
tcp = Y
|
||||
udp = Y
|
||||
vf = Y
|
||||
vlan = Y
|
||||
vxlan = Y
|
||||
|
||||
|
@ -200,8 +200,6 @@ Supported pattern items (***transfer*** rules):
|
||||
|
||||
- PHY_PORT (cannot repeat; conflicts with other traffic source items)
|
||||
|
||||
- VF (cannot repeat; conflicts with other traffic source items)
|
||||
|
||||
- ETH
|
||||
|
||||
- VLAN (double-tagging is supported)
|
||||
|
@ -535,40 +535,6 @@ Usage example, matching non-TCPv4 packets only:
|
||||
| 4 | END |
|
||||
+-------+----------+
|
||||
|
||||
Item: ``VF``
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This item is deprecated. Consider:
|
||||
- `Item: PORT_REPRESENTOR`_
|
||||
- `Item: REPRESENTED_PORT`_
|
||||
|
||||
Matches traffic originating from (ingress) or going to (egress) a given
|
||||
virtual function of the current device.
|
||||
|
||||
If supported, should work even if the virtual function is not managed by the
|
||||
application and thus not associated with a DPDK port ID.
|
||||
|
||||
Note this pattern item does not match VF representors traffic which, as
|
||||
separate entities, should be addressed through their own DPDK port IDs.
|
||||
|
||||
- Can be specified multiple times to match traffic addressed to several VF
|
||||
IDs.
|
||||
- Default ``mask`` matches any VF ID.
|
||||
|
||||
.. _table_rte_flow_item_vf:
|
||||
|
||||
.. table:: VF
|
||||
|
||||
+----------+----------+---------------------------+
|
||||
| Field | Subfield | Value |
|
||||
+==========+==========+===========================+
|
||||
| ``spec`` | ``id`` | destination VF ID |
|
||||
+----------+----------+---------------------------+
|
||||
| ``last`` | ``id`` | upper range value |
|
||||
+----------+----------+---------------------------+
|
||||
| ``mask`` | ``id`` | zeroed to match any VF ID |
|
||||
+----------+----------+---------------------------+
|
||||
|
||||
Item: ``PHY_PORT``
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -2063,13 +2029,11 @@ This action is deprecated. Consider:
|
||||
|
||||
Directs matching traffic to a given virtual function of the current device.
|
||||
|
||||
Packets matched by a VF pattern item can be redirected to their original VF
|
||||
ID instead of the specified one. This parameter may not be available and is
|
||||
Packets can be redirected to the VF they originate from,
|
||||
instead of the specified one. This parameter may not be available and is
|
||||
not guaranteed to work properly if the VF part is matched by a prior flow
|
||||
rule or if packets are not addressed to a VF in the first place.
|
||||
|
||||
See `Item: VF`_.
|
||||
|
||||
.. _table_rte_flow_action_vf:
|
||||
|
||||
.. table:: VF
|
||||
|
@ -83,6 +83,9 @@ Removed Items
|
||||
* ethdev: removed ``RTE_FLOW_ITEM_TYPE_PF``;
|
||||
use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
|
||||
|
||||
* ethdev: removed ``RTE_FLOW_ITEM_TYPE_VF``;
|
||||
use ``RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT``.
|
||||
|
||||
|
||||
API Changes
|
||||
-----------
|
||||
|
@ -3458,10 +3458,6 @@ This section lists supported pattern items and their attributes, if any.
|
||||
|
||||
- ``num {unsigned}``: number of layers covered.
|
||||
|
||||
- ``vf``: match traffic from/to a virtual function ID.
|
||||
|
||||
- ``id {unsigned}``: VF ID.
|
||||
|
||||
- ``phy_port``: match traffic from/to a specific physical port.
|
||||
|
||||
- ``index {unsigned}``: physical port index.
|
||||
|
@ -126,8 +126,7 @@ bnxt_filter_type_check(const struct rte_flow_item pattern[],
|
||||
}
|
||||
|
||||
static int
|
||||
bnxt_validate_and_parse_flow_type(struct bnxt *bp,
|
||||
const struct rte_flow_attr *attr,
|
||||
bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr,
|
||||
const struct rte_flow_item pattern[],
|
||||
struct rte_flow_error *error,
|
||||
struct bnxt_filter_info *filter)
|
||||
@ -148,16 +147,13 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
|
||||
const struct rte_flow_item_vxlan *vxlan_mask;
|
||||
uint8_t vni_mask[] = {0xFF, 0xFF, 0xFF};
|
||||
uint8_t tni_mask[] = {0xFF, 0xFF, 0xFF};
|
||||
const struct rte_flow_item_vf *vf_spec;
|
||||
uint32_t tenant_id_be = 0, valid_flags = 0;
|
||||
bool vni_masked = 0;
|
||||
bool tni_masked = 0;
|
||||
uint32_t en_ethertype;
|
||||
uint8_t inner = 0;
|
||||
uint32_t vf = 0;
|
||||
uint32_t en = 0;
|
||||
int use_ntuple;
|
||||
int dflt_vnic;
|
||||
|
||||
use_ntuple = bnxt_filter_type_check(pattern, error);
|
||||
if (use_ntuple < 0)
|
||||
@ -680,56 +676,6 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
|
||||
}
|
||||
break;
|
||||
|
||||
case RTE_FLOW_ITEM_TYPE_VF:
|
||||
vf_spec = item->spec;
|
||||
vf = vf_spec->id;
|
||||
if (!BNXT_PF(bp)) {
|
||||
rte_flow_error_set(error,
|
||||
EINVAL,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
item,
|
||||
"Configuring on a VF!");
|
||||
return -rte_errno;
|
||||
}
|
||||
|
||||
if (vf >= bp->pdev->max_vfs) {
|
||||
rte_flow_error_set(error,
|
||||
EINVAL,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
item,
|
||||
"Incorrect VF id!");
|
||||
return -rte_errno;
|
||||
}
|
||||
|
||||
if (!attr->transfer) {
|
||||
rte_flow_error_set(error,
|
||||
ENOTSUP,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
item,
|
||||
"Matching VF traffic without"
|
||||
" affecting it (transfer attribute)"
|
||||
" is unsupported");
|
||||
return -rte_errno;
|
||||
}
|
||||
|
||||
filter->mirror_vnic_id =
|
||||
dflt_vnic = bnxt_hwrm_func_qcfg_vf_dflt_vnic_id(bp, vf);
|
||||
if (dflt_vnic < 0) {
|
||||
/* This simply indicates there's no driver
|
||||
* loaded. This is not an error.
|
||||
*/
|
||||
rte_flow_error_set
|
||||
(error,
|
||||
EINVAL,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
item,
|
||||
"Unable to get default VNIC for VF");
|
||||
return -rte_errno;
|
||||
}
|
||||
|
||||
filter->mirror_vnic_id = dflt_vnic;
|
||||
en |= NTUPLE_FLTR_ALLOC_INPUT_EN_MIRROR_VNIC_ID;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1298,7 +1244,7 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
|
||||
int rc, use_ntuple;
|
||||
|
||||
rc =
|
||||
bnxt_validate_and_parse_flow_type(bp, attr, pattern, error, filter);
|
||||
bnxt_validate_and_parse_flow_type(attr, pattern, error, filter);
|
||||
if (rc != 0)
|
||||
goto ret;
|
||||
|
||||
|
@ -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_VF] = {
|
||||
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
|
||||
.proto_hdr_func = ulp_rte_vf_hdr_handler
|
||||
},
|
||||
[RTE_FLOW_ITEM_TYPE_PHY_PORT] = {
|
||||
.hdr_type = BNXT_ULP_HDR_TYPE_SUPPORTED,
|
||||
.proto_hdr_func = ulp_rte_phy_port_hdr_handler
|
||||
|
@ -507,40 +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 VF Header. */
|
||||
int32_t
|
||||
ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
|
||||
struct ulp_rte_parser_params *params)
|
||||
{
|
||||
const struct rte_flow_item_vf *vf_spec = item->spec;
|
||||
const struct rte_flow_item_vf *vf_mask = item->mask;
|
||||
uint16_t mask = 0;
|
||||
uint32_t ifindex;
|
||||
int32_t rc = BNXT_TF_RC_PARSE_ERR;
|
||||
|
||||
/* Get VF rte_flow_item for Port details */
|
||||
if (!vf_spec) {
|
||||
BNXT_TF_DBG(ERR, "ParseErr:VF id is not valid\n");
|
||||
return rc;
|
||||
}
|
||||
if (!vf_mask) {
|
||||
BNXT_TF_DBG(ERR, "ParseErr:VF mask is not valid\n");
|
||||
return rc;
|
||||
}
|
||||
mask = vf_mask->id;
|
||||
|
||||
/* perform the conversion from VF Func id to bnxt ifindex */
|
||||
if (ulp_port_db_dev_func_id_to_ulp_index(params->ulp_ctx,
|
||||
vf_spec->id,
|
||||
&ifindex)) {
|
||||
BNXT_TF_DBG(ERR, "ParseErr:Portid is not valid\n");
|
||||
return rc;
|
||||
}
|
||||
/* Update the SVIF details */
|
||||
return ulp_rte_parser_svif_set(params, ifindex, mask,
|
||||
BNXT_ULP_DIR_INVALID);
|
||||
}
|
||||
|
||||
/* Parse items PORT_ID, PORT_REPRESENTOR and REPRESENTED_PORT. */
|
||||
int32_t
|
||||
ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
|
||||
|
@ -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 VF Header. */
|
||||
int32_t
|
||||
ulp_rte_vf_hdr_handler(const struct rte_flow_item *item,
|
||||
struct ulp_rte_parser_params *params);
|
||||
|
||||
/* Parse items PORT_ID, PORT_REPRESENTOR and REPRESENTED_PORT. */
|
||||
int32_t
|
||||
ulp_rte_port_hdr_handler(const struct rte_flow_item *item,
|
||||
|
@ -288,35 +288,6 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ch_rte_parsetype_vf(const void *dmask, const struct rte_flow_item *item,
|
||||
struct ch_filter_specification *fs,
|
||||
struct rte_flow_error *e)
|
||||
{
|
||||
const struct rte_flow_item_vf *umask = item->mask;
|
||||
const struct rte_flow_item_vf *val = item->spec;
|
||||
const struct rte_flow_item_vf *mask;
|
||||
|
||||
/* If user has not given any mask, then use chelsio supported mask. */
|
||||
mask = umask ? umask : (const struct rte_flow_item_vf *)dmask;
|
||||
|
||||
CXGBE_FILL_FS(1, 1, pfvf_vld);
|
||||
|
||||
if (!val)
|
||||
return 0; /* Wildcard, match all Vf */
|
||||
|
||||
if (val->id > UCHAR_MAX)
|
||||
return rte_flow_error_set(e, EINVAL,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
item,
|
||||
"VF ID > MAX(255)");
|
||||
|
||||
if (val->id || (umask && umask->id))
|
||||
CXGBE_FILL_FS(val->id, mask->id, vf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ch_rte_parsetype_udp(const void *dmask, const struct rte_flow_item *item,
|
||||
struct ch_filter_specification *fs,
|
||||
@ -1005,13 +976,6 @@ static struct chrte_fparse parseitem[] = {
|
||||
.fptr = ch_rte_parsetype_tcp,
|
||||
.dmask = &rte_flow_item_tcp_mask,
|
||||
},
|
||||
|
||||
[RTE_FLOW_ITEM_TYPE_VF] = {
|
||||
.fptr = ch_rte_parsetype_vf,
|
||||
.dmask = &(const struct rte_flow_item_vf){
|
||||
.id = 0xffffffff,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -62,7 +62,6 @@ static int i40e_flow_parse_ethertype_action(struct rte_eth_dev *dev,
|
||||
struct rte_flow_error *error,
|
||||
struct rte_eth_ethertype_filter *filter);
|
||||
static int i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
|
||||
const struct rte_flow_attr *attr,
|
||||
const struct rte_flow_item *pattern,
|
||||
struct rte_flow_error *error,
|
||||
struct i40e_fdir_filter_conf *filter);
|
||||
@ -837,688 +836,6 @@ static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_3[] = {
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_udp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_tcp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_sctp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_udp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_tcp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_sctp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ethertype_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ethertype_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ethertype_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_udp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_tcp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv4_sctp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_udp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_tcp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ipv6_sctp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ethertype_vlan_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_ethertype_vlan_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_udp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_tcp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv4_sctp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV4,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_udp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_UDP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_tcp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_TCP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_1_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_2_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
static enum rte_flow_item_type pattern_fdir_vlan_ipv6_sctp_raw_3_vf[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
RTE_FLOW_ITEM_TYPE_VLAN,
|
||||
RTE_FLOW_ITEM_TYPE_IPV6,
|
||||
RTE_FLOW_ITEM_TYPE_SCTP,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_RAW,
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
RTE_FLOW_ITEM_TYPE_END,
|
||||
};
|
||||
|
||||
/* Pattern matched tunnel filter */
|
||||
static enum rte_flow_item_type pattern_vxlan_1[] = {
|
||||
RTE_FLOW_ITEM_TYPE_ETH,
|
||||
@ -1765,78 +1082,6 @@ static struct i40e_valid_pattern i40e_supported_patterns[] = {
|
||||
{ pattern_fdir_vlan_ipv6_sctp_raw_1, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_sctp_raw_2, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_sctp_raw_3, i40e_flow_parse_fdir_filter },
|
||||
/* FDIR - support VF item */
|
||||
{ pattern_fdir_ipv4_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_udp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_tcp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_sctp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_udp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_tcp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_sctp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ethertype_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ethertype_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ethertype_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv4_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ipv6_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ethertype_vlan_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_udp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_tcp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_sctp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_udp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_tcp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_sctp_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ethertype_vlan_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ethertype_vlan_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_ethertype_vlan_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv4_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_udp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_udp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_udp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_tcp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_tcp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_tcp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_sctp_raw_1_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_sctp_raw_2_vf, i40e_flow_parse_fdir_filter },
|
||||
{ pattern_fdir_vlan_ipv6_sctp_raw_3_vf, i40e_flow_parse_fdir_filter },
|
||||
/* VXLAN */
|
||||
{ pattern_vxlan_1, i40e_flow_parse_vxlan_filter },
|
||||
{ pattern_vxlan_2, i40e_flow_parse_vxlan_filter },
|
||||
@ -2348,7 +1593,6 @@ i40e_flow_set_filter_spi(struct i40e_fdir_filter_conf *filter,
|
||||
*/
|
||||
static int
|
||||
i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
|
||||
const struct rte_flow_attr *attr,
|
||||
const struct rte_flow_item *pattern,
|
||||
struct rte_flow_error *error,
|
||||
struct i40e_fdir_filter_conf *filter)
|
||||
@ -2365,7 +1609,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
|
||||
const struct rte_flow_item_gtp *gtp_spec, *gtp_mask;
|
||||
const struct rte_flow_item_esp *esp_spec, *esp_mask;
|
||||
const struct rte_flow_item_raw *raw_spec, *raw_mask;
|
||||
const struct rte_flow_item_vf *vf_spec;
|
||||
const struct rte_flow_item_l2tpv3oip *l2tpv3oip_spec, *l2tpv3oip_mask;
|
||||
|
||||
uint8_t pctype = 0;
|
||||
@ -3067,29 +2310,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
|
||||
filter->input.flow_ext.raw_id = raw_id;
|
||||
filter->input.flow_ext.is_flex_flow = true;
|
||||
break;
|
||||
case RTE_FLOW_ITEM_TYPE_VF:
|
||||
vf_spec = item->spec;
|
||||
if (!attr->transfer) {
|
||||
rte_flow_error_set(error, ENOTSUP,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
item,
|
||||
"Matching VF traffic"
|
||||
" without affecting it"
|
||||
" (transfer attribute)"
|
||||
" is unsupported");
|
||||
return -rte_errno;
|
||||
}
|
||||
filter->input.flow_ext.is_vf = 1;
|
||||
filter->input.flow_ext.dst_id = vf_spec->id;
|
||||
if (filter->input.flow_ext.is_vf &&
|
||||
filter->input.flow_ext.dst_id >= pf->vf_num) {
|
||||
rte_flow_error_set(error, EINVAL,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||
item,
|
||||
"Invalid VF ID for FDIR.");
|
||||
return -rte_errno;
|
||||
}
|
||||
break;
|
||||
case RTE_FLOW_ITEM_TYPE_L2TPV3OIP:
|
||||
l2tpv3oip_spec = item->spec;
|
||||
l2tpv3oip_mask = item->mask;
|
||||
@ -3277,8 +2497,7 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
|
||||
&filter->fdir_filter;
|
||||
int ret;
|
||||
|
||||
ret = i40e_flow_parse_fdir_pattern(dev, attr, pattern, error,
|
||||
fdir_filter);
|
||||
ret = i40e_flow_parse_fdir_pattern(dev, pattern, error, fdir_filter);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -1685,71 +1685,6 @@ sfc_mae_rule_parse_item_phy_port(const struct rte_flow_item *item,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
sfc_mae_rule_parse_item_vf(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);
|
||||
const struct rte_flow_item_vf supp_mask = {
|
||||
.id = 0xffffffff,
|
||||
};
|
||||
const void *def_mask = &rte_flow_item_vf_mask;
|
||||
const struct rte_flow_item_vf *spec = NULL;
|
||||
const struct rte_flow_item_vf *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_vf), error);
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
|
||||
if (mask->id != supp_mask.id) {
|
||||
return rte_flow_error_set(error, EINVAL,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM, item,
|
||||
"Bad mask in the VF pattern item");
|
||||
}
|
||||
|
||||
/*
|
||||
* If "spec" is not set, the item requests any VF related to the
|
||||
* PF of the current DPDK port (but not the PF itself).
|
||||
* Reject this match criterion as unsupported.
|
||||
*/
|
||||
if (spec == NULL) {
|
||||
return rte_flow_error_set(error, EINVAL,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM, item,
|
||||
"Bad spec in the VF pattern item");
|
||||
}
|
||||
|
||||
rc = efx_mae_mport_by_pcie_function(encp->enc_pf, spec->id, &mport_v);
|
||||
if (rc != 0) {
|
||||
return rte_flow_error_set(error, rc,
|
||||
RTE_FLOW_ERROR_TYPE_ITEM, item,
|
||||
"Failed to convert the PF + VF IDs");
|
||||
}
|
||||
|
||||
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 + VF");
|
||||
}
|
||||
|
||||
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
|
||||
@ -2555,18 +2490,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_VF,
|
||||
.name = "VF",
|
||||
/*
|
||||
* 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_vf,
|
||||
},
|
||||
{
|
||||
.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(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)),
|
||||
MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)),
|
||||
|
@ -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
|
||||
* given virtual function of the current device.
|
||||
*
|
||||
* See struct rte_flow_item_vf.
|
||||
*/
|
||||
RTE_FLOW_ITEM_TYPE_VF,
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
|
||||
@ -700,38 +686,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_VF
|
||||
*
|
||||
* Matches traffic originating from (ingress) or going to (egress) a given
|
||||
* virtual function of the current device.
|
||||
*
|
||||
* If supported, should work even if the virtual function is not managed by
|
||||
* the application and thus not associated with a DPDK port ID.
|
||||
*
|
||||
* Note this pattern item does not match VF representors traffic which, as
|
||||
* separate entities, should be addressed through their own DPDK port IDs.
|
||||
*
|
||||
* - Can be specified multiple times to match traffic addressed to several
|
||||
* VF IDs.
|
||||
*
|
||||
* A zeroed mask can be used to match any VF ID.
|
||||
*/
|
||||
struct rte_flow_item_vf {
|
||||
uint32_t id; /**< VF ID. */
|
||||
};
|
||||
|
||||
/** Default mask for RTE_FLOW_ITEM_TYPE_VF. */
|
||||
#ifndef __cplusplus
|
||||
static const struct rte_flow_item_vf rte_flow_item_vf_mask = {
|
||||
.id = 0x00000000,
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR
|
||||
|
Loading…
Reference in New Issue
Block a user