From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 2/6] net/enic: flow API for NICs with advanced filters enabled Date: Wed, 17 May 2017 12:12:50 +0100 Message-ID: <9d95cb4f-f64c-688a-0f04-ca3a9ce311bc@intel.com> References: <20170331020622.25498-8-johndale@cisco.com> <20170517030348.2663-1-johndale@cisco.com> <20170517030348.2663-3-johndale@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org To: John Daley Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E33B72986 for ; Wed, 17 May 2017 13:12:52 +0200 (CEST) In-Reply-To: <20170517030348.2663-3-johndale@cisco.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > Reviewed-by: Nelson Escobar <...> > +/** 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); > } >