From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by dpdk.org (Postfix) with ESMTP id 2C685324A for ; Thu, 18 May 2017 00:38:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1306; q=dns/txt; s=iport; t=1495060696; x=1496270296; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=UvIWjO0eshTWmAsEYe5OUl32MfPWhD3kyQ1iYFjLwM0=; b=JxJTzavTIuiOUvS5MFbdA25o1PJl9o3vwW4el1/S+LN2ke1uScfKPYlx oj1CuR+E/OZb/4TLakGmuNmJc125lh0UANMK1bayPMhWAZr6hKxwDbJWr 6lpyZV7ADXAgQVMYVqWenAE4VKcCxP2k20zyXQmTag5TnrEis6ZepBcKF Y=; X-IronPort-AV: E=Sophos;i="5.38,356,1491264000"; d="scan'208";a="244559908" Received: from alln-core-1.cisco.com ([173.36.13.131]) by rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 May 2017 22:38:14 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v4HMcEYU028964; Wed, 17 May 2017 22:38:14 GMT Received: by cisco.com (Postfix, from userid 392789) id B79133FAAF15; Wed, 17 May 2017 15:38:14 -0700 (PDT) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, John Daley Date: Wed, 17 May 2017 15:38:07 -0700 Message-Id: <20170517223811.6150-5-johndale@cisco.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170517223811.6150-1-johndale@cisco.com> References: <1480ef9e-a5fd-6fd9-a990-df3bed147bfc@intel.com> <20170517223811.6150-1-johndale@cisco.com> Subject: [dpdk-dev] [PATCH v4 4/8] net/enic: flow API mark and flag support 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 22:38:16 -0000 For VICs with filter tagging, support the MARK and FLAG actions by setting appropriate mbuf ol_flags if there is a filter match. Signed-off-by: John Daley Reviewed-by: Nelson Escobar --- drivers/net/enic/enic_rxtx.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 */ pkt_flags |= PKT_RX_RSS_HASH; mbuf->hash.rss = enic_cq_rx_desc_rss_hash(cqrd); } -- 2.12.0