From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0056.outbound.protection.outlook.com [104.47.36.56]) by dpdk.org (Postfix) with ESMTP id 6FD58558D for ; Thu, 21 Jul 2016 16:02:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GcVMnu/n7MLKjH4als5oBDjO83la58NmAbihkKOaws8=; b=QLyhQel3mU3SJeHWfunwrZb9QFWMsyS/fX4riyyH7Wynzmh5+Qq2HEHvzgAFc8ZhezkYBNDjxadMf5wHcMAnZw3wpDLliJcVnR44IUwfRuNOOxcLTJRsJ94+A4aNs4rM2B41/AwRX8ZInkdGReOVz6XkaF7dCcK6hbgTSpLhKcg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (122.166.90.242) by BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10; Thu, 21 Jul 2016 14:02:31 +0000 From: Jerin Jacob To: CC: , , Jerin Jacob Date: Thu, 21 Jul 2016 19:31:46 +0530 Message-ID: <1469109707-23213-3-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1469109707-23213-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1469109707-23213-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.166.90.242] X-ClientProxiedBy: MAXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.164.147.28) To BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) X-MS-Office365-Filtering-Correlation-Id: d3da95fb-a7d2-4ff9-7f88-08d3b16fa97f X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 2:tUFeadinEFiL4OnwxBt473rCLqeSIqwXhLxQzoR2ZFjYckQJodnEWqkrckaRUZxITdC5GNc8+zEIBs//dPtNF4tLP9Z3GZO+CpIjtUp9qKS4Dl4w7ROWqoNtPVjdbm5YjN7wdf8DTFQVpx4pRm0TF+KB2cOP52tHDPurqwE2eblT71RNX91ix9AgaWvvDvPV; 3:nfGhwX+L2PCQ1nnHr64ucUaQtThgfAtojAPKCat51JM15UzZb1nu9XdyyZIOSFPuYfXAcB+nHMLNnRjbSA41wxGXIMl8zf/RXeVBFUxYG7DDiK0patFQ+9ggZXsvvR1R; 25:6gTHrefT4fdGyFW5gqC5wZA0lg/jYBfPXZ6t5aHvCOAI4W63v6eOCvqmhragsukMF4e+jp91voV8pXwM/ZnIAcJtmLzzcgULjzdT3hG5eD/DyVn1gbRDpztGExvy1gi78JXtmsJkgLHOUa/Pg+ZMo3aVe1XjrMgcQlM9AdQlDZ104YQVWGpisrqwOn0Nu/JBgptyyt2hgzgUxwmLnt567oeaew28dPT4+oLyQ6OXOg23UaaQRqejcIeITWEcPc45WRfc2A6aHDWfj2P/u5/BrqLfh/ScC5lmN7LFgjRe+U7Qw8fdLUmvWBJWJRVtMc813pcviBiJKQf6q8Ux+9+qI3LksSbxB0g9Rvc+feFDKErJUak0R2R/JkfzlzXxPR3oHz/VF6zCp1tTR/Z4rxZ/M4gNaO7rqMy8UhnPtja9Ta8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 31:ZzMoVk7Anq+t0BpqPhbQl84DL0kLmHUqOZDmed2L8uwykvxdz+cIc3qu7EeQXtBGLaZW0py9WeiXL61mYxEEfZ2vIoGelzPX27AylNqmRN4j/X98oP1H/l+yCtFJv85kUAdFo9fuiznpOYjjt61WZjBKGOLiV8vuNLR8fFf0uljbFgeck30Iq4yvdbIeHf3fcArt+Wk3sUFBl9qNbVzpHg==; 20:6Cd72O+kkO4O8V/0AJh1XMRN3HOIgEkPnlF/rzvqCdPPnSNDMAC9McOaMHuYPceP5DHqZwvjMfsZnHwUkmzpboRZX7YAjLwESMa6FtCUKNjZ+SzzaUK5rSU7M+MIAQ1IppVSljdzUugViOl4lSd3/J41bBM9ayVshucpr+QYRM1IDlbmxNvujUA9GGtYUYgBFtBPGHZUqLIUvtBp7aHbCU0BIoiR3u1eow6yVi7Y4W31/ZS58n+ZT1EVlkNG/927B57mo+TNsoZalu8o34vvqfpgEcAlEAbBDZ6kwDA8Sqa3ts0Ke14b9te/76TBv7sm7s+WlYfiEp17YRWonPM6V3K7+hIeFqsfKnqzZb+JtF2MTmiQ9FKfQVnx09FcpLr7QGoLKh6aNVuFu3NixIRH9PnzUmX43SMNucEZTtFr238Iy6jcBThf6RWvKxuhJtRYj7SUwrBCVOx01J2hEX4LvDefI2CjJOcwtsGE58JZTN1Qdbm0wdvJR2+OCThTHel1JynEKMssAkEFRJJ3Y6OvH8TnS++DDf94QpXZOIbLq84BRV+8j3TJEwom9IEpP/WmeR/3UIFhQIT1wK04sZnLxgVut9TrXcnQuxiNOnTghR0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BLUPR0701MB1715; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 4:JxrNaWxi8DAf5tv8rhx/atTpma4N0ztqlPDu4lwdpFRo2x6NoPvtRj+A144VvpqsfWW6rFgjhQ15IJRibhqiJZ/BfPytxlHjl9H5GaxGjqHJS13GKML5YfkL5kwRwXKTXujpjd+saVKeUjN0vMVAjk5JUXrStOUv44oid/HZACzEgBf3Mb8Y6njrbK6s5fIByp+S37jKiMgjvjqpnCNznJOoFNE5mNgxT4lm9Fy1fCNQDR2XJ7kWDmzaIExD8PDbWe8MH3/5QTRWYAVEypnh0cPl0WbTSwHZK8oSpQls44mTQYFQe/GzP8h4ob+TkQt+4ZeScElkInooUvMnre1WEZbfX+gO3Ojel40dCq9ndEsigpXoFFijx5nWSvNYSLMm X-Forefront-PRVS: 0010D93EFE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(189998001)(110136002)(33646002)(97736004)(5003940100001)(19580405001)(19580395003)(229853001)(50986999)(76176999)(107886002)(101416001)(36756003)(4001430100002)(2351001)(586003)(3846002)(4326007)(66066001)(2950100001)(50466002)(8676002)(81166006)(81156014)(47776003)(7736002)(2906002)(7846002)(92566002)(50226002)(42186005)(68736007)(48376002)(77096005)(105586002)(106356001)(6116002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1715; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1715; 23:pRpIydIpzmzLkRpoGeXH+ual5WIeGEgqqjMHGIy?= =?us-ascii?Q?5fswqYGNjOMFtJWPDhOFyGtBMaL9DUuUEiP+mDUMKJauFT5zP93NfwGC2ZtP?= =?us-ascii?Q?7zz817nOqVT4p2/KWSNxYVK7mjYZXuOfs6bdCAFbFDaUazNTs3dvJ5LdIGWw?= =?us-ascii?Q?2ZzYm+LKbu/pUKMCwqMAebB+uxDDdTarzH+cag52XRwUMBtNButzKpkAbydC?= =?us-ascii?Q?DZ8riltqZvWv0OZFSQDt/fGvP51NLh6Esoq0vmd/DyTswCY/kBJ5NgDz+OkJ?= =?us-ascii?Q?ub/akKEBTVdNHehqb2zjplBfr4cUIybjt01vPm5Vdi2QqSIJxRCwIxmpnFp6?= =?us-ascii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k/fJuMQaXgGA9mozm97dKjl/KIhz/7EAKivkP2/l5I0VZ1qX5QyZBtlkD2KwSa3G2BJ1Mwk0UBlH/KwD52Um8jaTAS4cnvbMHeXlt0JYOrQX4gipyWmwWP36iK9Issz0scThCLRE5r07e3OkeZBQe1d/L6TH4W99tB+KhB3cwsIaQyko5Wc02A02kCJCNIxqJHVVgGBrgpqkF1rImhJCzUZLH3LoYGFmwlqWu2dcahAT4Ic=; 5:EPNTd2+0Hhy6rRYtZoa8U7w9IafZgPMnz9hklWE0iNbMUDdh77k5F/KxV7uXhYPldZEuSdg5yuoc62mKcmw0MxCKm7gMfYA2IfgwtVZKJHWuN86qlQ3jcDeX9Bqe/ewN/VKkLhA56dL1txXS/3OuTg==; 24:0Zvprcadnf3TpE2YbwcP2rf1yZGdkIukhuaETUjujLHPHY+mLYETXZLCFwh4vuBxnGFDlGBbuxdO38uCyFe3CwXu6Ljl19OvSltdqBZY53s=; 7:50xBDeKz32zeK+A+4/iB/AH3Pzqgr7RFkmbqfD/retLbvy2xDbKHXUHUcIgAERtI4H+q2RT8SXv+SnQJUVOBBG96Q+D5nDJ6VTrSRPrfq/a+Ge4RZMxXg6TVTPh4ciMC9mYbSaBWROApXLpQXqZDvOxiIrNh3beE4Bp7Avw7kGno1j4K56IEvxg9EHC7qHvTllf+oWO3O2u/jTmkDQzZbLk7GzQnoSWLCu7rWlsspslV2GpRxd+kbARMe9cBSvSz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2016 14:02:31.5327 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1715 Subject: [dpdk-dev] [PATCH 2/3] net/thunderx: introduce cqe_rx2 HW capability flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 14:02:35 -0000 Certain thunderx SoC pass has additional optional word in Rx descriptor to hold tunneling extension info. Based on this capability, the location where packet pointer address stored in Rx descriptor will vary. Signed-off-by: Jerin Jacob --- drivers/net/thunderx/base/nicvf_hw.h | 5 +++-- drivers/net/thunderx/nicvf_ethdev.c | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/thunderx/base/nicvf_hw.h b/drivers/net/thunderx/base/nicvf_hw.h index 602a6ff..5629d9c 100644 --- a/drivers/net/thunderx/base/nicvf_hw.h +++ b/drivers/net/thunderx/base/nicvf_hw.h @@ -50,8 +50,9 @@ #define NICVF_GET_TX_STATS(reg) \ nicvf_reg_read(nic, NIC_VNIC_TX_STAT_0_4 | (reg << 3)) - -#define NICVF_CAP_TUNNEL_PARSING (1ULL << 0) +#define NICVF_CAP_TUNNEL_PARSING (1ULL << 0) +/* Additional word in Rx descriptor to hold optional tunneling extension info */ +#define NICVF_CAP_CQE_RX2 (1ULL << 1) enum nicvf_tns_mode { NIC_TNS_BYPASS_MODE, diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 3802d49..f6faddf 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -1142,7 +1142,12 @@ nicvf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx, rxq->cq_status = nicvf_qset_base(nic, qidx) + NIC_QSET_CQ_0_7_STATUS; rxq->cq_door = nicvf_qset_base(nic, qidx) + NIC_QSET_CQ_0_7_DOOR; rxq->precharge_cnt = 0; - rxq->rbptr_offset = NICVF_CQE_RBPTR_WORD; + + if (nicvf_hw_cap(nic) & NICVF_CAP_CQE_RX2) + rxq->rbptr_offset = NICVF_CQE_RX2_RBPTR_WORD; + else + rxq->rbptr_offset = NICVF_CQE_RBPTR_WORD; + /* Alloc completion queue */ if (nicvf_qset_cq_alloc(nic, rxq, rxq->queue_id, nb_desc)) { -- 2.5.5