From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2017 04:12:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,354,1491289200"; d="scan'208";a="87878765" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.81]) ([10.237.220.81]) by orsmga002.jf.intel.com with ESMTP; 17 May 2017 04:12:51 -0700 To: John Daley Cc: dev@dpdk.org References: <20170331020622.25498-8-johndale@cisco.com> <20170517030348.2663-1-johndale@cisco.com> <20170517030348.2663-3-johndale@cisco.com> From: Ferruh Yigit Message-ID: <9d95cb4f-f64c-688a-0f04-ca3a9ce311bc@intel.com> Date: Wed, 17 May 2017 12:12:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170517030348.2663-3-johndale@cisco.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 2/6] net/enic: flow API for NICs with advanced filters enabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 11:12:53 -0000 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); > } >