[dpdk-dev] [PATCH v3 2/6] net/enic: flow API for NICs with advanced filters enabled
Ferruh Yigit
ferruh.yigit at intel.com
Wed May 17 13:12:50 CEST 2017
On 5/17/2017 4:03 AM, John Daley wrote:
> Flow support for 1300 series adapters with the 'Advanced Filter'
> mode enabled via the UCS management interface. This enables:
> Attributes: ingress
> Items: Outer eth, ipv4, ipv6, udp, sctp, tcp, vxlan. Inner eth, ipv4,
> ipv6, udp, tcp.
> Actions: queue, mark, flag and void
> Selectors: 'is', 'spec' and 'mask'. 'last' is not supported
>
> Signed-off-by: John Daley <johndale at cisco.com>
> Reviewed-by: Nelson Escobar <neescoba at cisco.com>
<...>
> +/** Get the NIC filter capabilties structure */
> +static const struct enic_filter_cap *
> +enic_get_filter_cap(struct enic *enic)
> +{
> + /* FIXME: only support advanced filters for now */
> + if (enic->flow_filter_mode != FILTER_DPDK_1)
> + return (const struct enic_filter_cap *)NULL;
> +
> + if (enic->flow_filter_mode)
> + return &enic_filter_cap[enic->flow_filter_mode];
> +
> + return (const struct enic_filter_cap *)NULL;
Do we need this casting?
<...>
> diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
> index ba0cfd01a..5867acf19 100644
> --- a/drivers/net/enic/enic_rxtx.c
> +++ b/drivers/net/enic/enic_rxtx.c
> @@ -253,8 +253,20 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
> }
> mbuf->vlan_tci = vlan_tci;
>
> - /* RSS flag */
> - if (enic_cq_rx_desc_rss_type(cqrd)) {
> + if ((cqd->type_color & CQ_DESC_TYPE_MASK) == CQ_DESC_TYPE_CLASSIFIER) {
> + struct cq_enet_rq_clsf_desc *clsf_cqd;
> + uint16_t filter_id;
> + clsf_cqd = (struct cq_enet_rq_clsf_desc *)cqd;
> + filter_id = clsf_cqd->filter_id;
> + if (filter_id) {
> + pkt_flags |= PKT_RX_FDIR;
> + if (filter_id != ENIC_MAGIC_FILTER_ID) {
> + mbuf->hash.fdir.hi = clsf_cqd->filter_id;
> + pkt_flags |= PKT_RX_FDIR_ID;
> + }
> + }
> + } else if (enic_cq_rx_desc_rss_type(cqrd)) {
> + /* RSS flag */
Is this piece of code related to the rte_flow ?
"struct cq_enet_rq_clsf_desc" is not defined and causing build erros.
> pkt_flags |= PKT_RX_RSS_HASH;
> mbuf->hash.rss = enic_cq_rx_desc_rss_hash(cqrd);
> }
>
More information about the dev
mailing list