From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 18B1EA2EDB for ; Fri, 6 Sep 2019 02:14:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CDB91F09E; Fri, 6 Sep 2019 02:14:16 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 357101F07D for ; Fri, 6 Sep 2019 02:14:14 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x860Aj7v026102 for ; Thu, 5 Sep 2019 17:14:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=jp+0hWk4g56stsG07tASOuGc31KaEBFIVOEG6gauMp4=; b=JeZw6HtSZz7BZ2XgXImGWNIVg8t7TAkYtrmwfyXMiVk/9jnVUWWCK8XOjoUP9L0FzjAd OiK5DAzPyn/XF/FPl+f3PixCcGVBfEHTAe2JPok0/f+OR4eKZGPWl9ZdLoPO+dGCggRh rPTyYevoiBOfdFNdLr2KKEUOMM6tPE/exEcklflngwhLTTjdvdqFK2I1o45hhso51Usw UdJN6WQrimX/2YD6j66xHAujw1uQphoI2UdvlzMd6NqxhTmP2/HAlAuxHhNelsKwD7a+ PK1m1DZqL2uYpC3ClpYTLGEQ9jwZGEwJXXZoPrzWJKelMtFOyOfoC3XJe5U+x/13prWb 6A== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2uqrdmmve9-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 05 Sep 2019 17:14:10 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 5 Sep 2019 17:14:08 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 5 Sep 2019 17:14:08 -0700 Received: from dell-e5540.caveonetworks.com (unknown [10.29.16.81]) by maili.marvell.com (Postfix) with ESMTP id 3304B3F7045; Thu, 5 Sep 2019 17:14:05 -0700 (PDT) From: To: CC: , Vivek Sharma Date: Fri, 6 Sep 2019 05:43:59 +0530 Message-ID: <1567728839-11991-1-git-send-email-viveksharma@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-05_10:2019-09-04,2019-09-05 signatures=0 Subject: [dpdk-dev] [PATCH] net/octeontx2: use updated LB ltypes 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Vivek Sharma Update LB ltypes and use the updated ones so as replace LB_STAG and LB_QINQ by single LB_STAG_QINQ ltype. Signed-off-by: Vivek Sharma --- drivers/common/octeontx2/hw/otx2_npc.h | 9 +++++++-- drivers/net/octeontx2/otx2_flow_parse.c | 4 ++-- drivers/net/octeontx2/otx2_lookup.c | 2 +- drivers/net/octeontx2/otx2_vlan.c | 14 +++++++++----- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h index 0f85d7f..5eccb9e 100644 --- a/drivers/common/octeontx2/hw/otx2_npc.h +++ b/drivers/common/octeontx2/hw/otx2_npc.h @@ -186,10 +186,15 @@ enum npc_kpu_la_ltype { enum npc_kpu_lb_ltype { NPC_LT_LB_ETAG = 1, NPC_LT_LB_CTAG, - NPC_LT_LB_STAG, + NPC_LT_LB_STAG_QINQ, NPC_LT_LB_BTAG, - NPC_LT_LB_QINQ, NPC_LT_LB_ITAG, + NPC_LT_LB_DSA, + NPC_LT_LB_DSA_VLAN, + NPC_LT_LB_EDSA, + NPC_LT_LB_EDSA_VLAN, + NPC_LT_LB_EXDSA, + NPC_LT_LB_EXDSA_VLAN, }; enum npc_kpu_lc_ltype { diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c index 6670c1a..71650b5 100644 --- a/drivers/net/octeontx2/otx2_flow_parse.c +++ b/drivers/net/octeontx2/otx2_flow_parse.c @@ -599,11 +599,11 @@ otx2_flow_parse_lb(struct otx2_parse_state *pst) lt = NPC_LT_LB_CTAG; break; case 2: - lt = NPC_LT_LB_STAG; + lt = NPC_LT_LB_STAG_QINQ; lflags = NPC_F_STAG_CTAG; break; case 3: - lt = NPC_LT_LB_STAG; + lt = NPC_LT_LB_STAG_QINQ; lflags = NPC_F_STAG_STAG_CTAG; break; default: diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c index 99199d0..2511386 100644 --- a/drivers/net/octeontx2/otx2_lookup.c +++ b/drivers/net/octeontx2/otx2_lookup.c @@ -88,7 +88,7 @@ nix_create_non_tunnel_ptype_array(uint16_t *ptype) val = RTE_PTYPE_UNKNOWN; switch (lb) { - case NPC_LT_LB_QINQ: + case NPC_LT_LB_STAG_QINQ: val |= RTE_PTYPE_L2_ETHER_QINQ; break; case NPC_LT_LB_CTAG: diff --git a/drivers/net/octeontx2/otx2_vlan.c b/drivers/net/octeontx2/otx2_vlan.c index c01089b..14e3ee9 100644 --- a/drivers/net/octeontx2/otx2_vlan.c +++ b/drivers/net/octeontx2/otx2_vlan.c @@ -300,8 +300,11 @@ nix_vlan_mcam_config(struct rte_eth_dev *eth_dev, /* Adds vlan_id & LB CTAG flag to MCAM KW */ if (flags & VLAN_ID_MATCH) { - entry.kw[kwi] |= NPC_LT_LB_CTAG << mkex->lb_lt_offset; - entry.kw_mask[kwi] |= 0xFULL << mkex->lb_lt_offset; + entry.kw[kwi] |= (NPC_LT_LB_CTAG | NPC_LT_LB_STAG_QINQ) + << mkex->lb_lt_offset; + entry.kw_mask[kwi] |= + (0xF & ~(NPC_LT_LB_CTAG ^ NPC_LT_LB_STAG_QINQ)) + << mkex->lb_lt_offset; mcam_data = ((uint32_t)vlan_id << 16); mcam_mask = (BIT_ULL(16) - 1) << 16; @@ -313,15 +316,16 @@ nix_vlan_mcam_config(struct rte_eth_dev *eth_dev, /* Adds LB STAG flag to MCAM KW */ if (flags & QINQ_F_MATCH) { - entry.kw[kwi] |= NPC_LT_LB_STAG << mkex->lb_lt_offset; + entry.kw[kwi] |= NPC_LT_LB_STAG_QINQ << mkex->lb_lt_offset; entry.kw_mask[kwi] |= 0xFULL << mkex->lb_lt_offset; } /* Adds LB CTAG & LB STAG flags to MCAM KW */ if (flags & VTAG_F_MATCH) { - entry.kw[kwi] |= (NPC_LT_LB_CTAG | NPC_LT_LB_STAG) + entry.kw[kwi] |= (NPC_LT_LB_CTAG | NPC_LT_LB_STAG_QINQ) << mkex->lb_lt_offset; - entry.kw_mask[kwi] |= (NPC_LT_LB_CTAG & NPC_LT_LB_STAG) + entry.kw_mask[kwi] |= + (0xF & ~(NPC_LT_LB_CTAG ^ NPC_LT_LB_STAG_QINQ)) << mkex->lb_lt_offset; } -- 2.7.4