From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0060.outbound.protection.outlook.com [104.47.37.60]) by dpdk.org (Postfix) with ESMTP id F1D661B738 for ; Tue, 24 Oct 2017 08:56:45 +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=EL/p9jHuA1DRgMliGiP11nUISvVs7rvpj05ev+5AiGY=; b=exjyQx0rNxggv9ZGDJ5OHI2BCGAFSJPF2BDrqDkalqCmHZGjkvIrl716l1QFcrBLFv7hk5SqyAe7IGscVVUkrzCqYXqHNxJMHVAcBx1rLATLPZJfDxThVRus2Tul+aa4GXrCniqHRMwLBsEkjfyOUspy3mJRBMS1m2fwlHCx6eM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Tue, 24 Oct 2017 06:56:42 +0000 Date: Tue, 24 Oct 2017 12:26:22 +0530 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Cc: dev@dpdk.org Message-ID: <20171024065621.GA15356@PBHAGAVATULA-LT> References: <1508230393-27018-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508316342-17781-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171023180941.GA22149@jerin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171023180941.GA22149@jerin> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0108.INDPRD01.PROD.OUTLOOK.COM (10.174.56.152) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2c04904b-a023-4714-7ca4-08d51aac62ce X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:6azTLDKKFmIhx97P5G063s8vJKhW6A0tqU/K9S3yDhn1DZsiu/AeO+qka2p0hAs9dcY5tO6qbNEgiTtNdfP+neW3goCGOG1RFWS6CX7GYRS1a9u1gYmt8bNh3gB2RvvzZoZ/ZjcRN/O7sBsWEw8FEAYDFMkjLEhs8VKPAcKGTjwj/rmXQBKv+zoCivWYewgELfe0QbhXPQ9Qu5kP3N58t5g19gR98joBLoY6/Tf3frHXgoeQWsnTmN3o0EP5xr1S; 25:Ip1kZfpCbvtsmjV3EGC4qiphuXshMSgwQo9WEwMYwe0zdihSKUKRn79HJOImCcvyXyKSyk1a4jHYH+HstLxGfA9WPcOUqCNUdZKUieHlF6s3x7NuwP39P1TGH993ymH4hFeIsDvmFn6etwIRZkYZgblNR99cpgiB5U64ceh0JSO++mOZUmmN9udeA6qFDrhdWh6kIEyXR75cwddj3aAvnOLBaKDamXFVzx1xXnZCfqj60/LF+/8HEqWrvgD8EOMj97/3ItZIy5JX4PcHewwpP2RFEm4QRDuow/vJLnZkVxKlF5vv25vmURk8nO5dOxZ8JTStxhWcABZBAxo4gpebbA==; 31:IOolhxQHT3tRUvnkrQDZn8pZwYAPV3Q38zcO7+HyscBsbdPhS7LCMzzBcUAedzYXopW2m6CehQeHleffcIXBx4wrQgC68QfCl5H4+UB9tmGynheDMwJkv59SibQOjMpUDOhdZiRlUHv3gGH0jP46DhCr7d1WEM/Yxmx+QyOS6RW4XAAuQ04/FvDMVH1mT8UTMQjlHPJSDhFqLJi0bNyGx6IkdTwUQkSA/FJX4Xn/yvg= X-MS-TrafficTypeDiagnostic: CY4PR07MB3464: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 20:LAnJbP3Do5MXnBX9c5aun04kiDRp33DNYdXRjJKbeeEbldEZkpvOZLjQP54tTiQ6qt+NdaGMl7+2lLfkq/ejsO3w+JgdOvNHbnlcpyqo0IOrp6PnGSlvrJGkc9t76JsgjrRnXJhYmAyiZ+xuGKVL96GSuhv4PAD7A2rb+cWj5KfyCF+5YJMNdCHz+Wq7M/sUFMOkWqFQrscsnirAf3f6URV9c/xKGdTD/b27+YmLkg9iAxvJEo6INbhka8EPw92UGX2f7+Ce54SkIIwwVtVXVVMJBqNs34YPYyvR2ys6b5wWUbTuNOp6UihCtigPuu6vX/LPjzLx9qky1H3aCAWSJFVFbp0zoErXBnwpa/U8Fzr2XaQigq8zAMDNmN+at47GR16r/WfhZVfE24roC2MtHeEYIfB+VDvWpquoeGPBXONaklzgR4NF+M1EMi46tVpdCSGHEeWt2WtQemWy9AONsLlE9b5Y8EQCYauEGHgPNHwG1dT3q0OAdr9ABgxv+8UaptDGlf5MWOE07uDFeJp6a2+6y2ZiJRYTGi0xTGToH6eXZRFd2KW1ZpPXhypAKCGUpY8BmGZKNWaD+6J+rzijJyXER1Mdbn3nVMb5a8yOfn8=; 4:Z36WhUbpqIdhDcMjJMtbx90SZbI4fR3ZfOZCcDYVylLKk9yUKcmV7xuZKKVs0cC5hCqeJ4mLXls4gT4dqFl3CaEpi3xpGcxiCTM5niqO2q+6lsxrOjZEbQqlW4WQpxCllODbIcId8PON0EyOoiBwiKPBZO7yrQGURYEvl6WwTJtjb8eA5s+JuiBbi12YsR0rS2xsFF7a1lUJuS081WVnzo7C76r4qWENlLYpRrmrJnf8LPcX4C9Hd0vd/oqrZGgl3/2haHHM5frvonYuSsZwPEeqUAJmKt45hxDsNntBwhw= X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(100000703101)(100105400095)(3231020)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 047001DADA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(13464003)(24454002)(199003)(189002)(6666003)(189998001)(478600001)(97736004)(50466002)(5660300001)(101416001)(229853002)(2870700001)(33656002)(72206003)(2906002)(6862004)(1720100001)(105586002)(23676002)(966005)(25786009)(4326008)(53936002)(6246003)(106356001)(55016002)(53376002)(6496005)(54356999)(33716001)(9686003)(8936002)(6306002)(81156014)(81166006)(8676002)(47776003)(76176999)(5009440100003)(50986999)(68736007)(58126008)(7736002)(6636002)(316002)(3846002)(16526018)(2950100002)(305945005)(1076002)(6116002)(42882006)(83506002)(66066001)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:PBHAGAVATULA-LT; 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: =?utf-8?B?MTtDWTRQUjA3TUIzNDY0OzIzOmx0SjFqUVFiUGJKb3FybUVsbWFOSTNHQ0dr?= =?utf-8?B?SXZ2OU5lcXcvei93aHZuQW5yYXRBaGo5WHJLSGxjcTVPdW10c3VsT3VaR25x?= =?utf-8?B?algvNFVPL045QXU1OTJ6ZW8ySlNTaE5xdmFnQTRGeD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yEDKeDpwKevQs0XkF6LhMhoggXkaLvYC7Mcp2dg+mnc+Cl39ElLPvtVho75SFY0m424PJh7TP+ZBPkD0OTcyv/ZvJEYyA2ODvhKdUQQDcS7KD1ZSw6aZNpaMUyhsCW1yRasBMVbbU+ph7PvNFkzM95H1jwmpiETJ0ha5Ccc9jSoDPmCs2r3vP+nF8R1n4E4b8JjxODcyZH2kPb60gCQ7xZtpeu9R1OaIJEmb+caKJFj4IzmCOs4pjXtR6Ng2ThUp9NjWgvCko3MBWVXcEACKNBmy5WNub7Yh7MkSOzPKI7x8JuWrv86hH2JXym4Og==; 5:/K/vUr4KJwtHff3s/y57DsNu3GlfNRHUw4dJxb1bMewhu+POkpKjM3zZAy7+AtPXZrfQqTOG8ymCjSsj6EYaCsPqtdwi6OXtAymlz3qY7CnhFjC+eeowTRfD00vCG4F/PqCV4CIbKCzwnczWnYGNIw==; 24:HONUiC3rHrwWNdD7m+QzWXSDwWj/no2BHZ8pvr5xWKDheSLGAF3wA+ZQ7bn09NDVdct1HHyvoWknqQ25tXkj6y/TCm1mZBw5/vBiQI5ZBwg=; 7:5LzRn6rjwi7JZp6AuXhCuSFmZvkoSUWELeYcFYS82d8b7JCWUWCC5t7perTk8NBNxj4O+WfwDwnnzZIEYfwL8lAz0fcXzQGw8Wi6gxy1kwH+/bV10dgGH1IBZMx1/WAQP5bPwSZEIIvs+uGXgxo45CWF1I2fvJ6HGXFupUhEEqMaZhw9aH8EFj0oOCSrqTFi3mkco7aica2/b6YsuntG8apHWfYW2iHOdHLD8tvl3Ew= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2017 06:56:42.7345 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c04904b-a023-4714-7ca4-08d51aac62ce X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: Re: [dpdk-dev] [PATCH v2 1/3] net/octeontx: add support for event Rx adapter 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: Tue, 24 Oct 2017 06:56:46 -0000 On Mon, Oct 23, 2017 at 11:39:42PM +0530, Jerin Jacob wrote: > -----Original Message----- > > Date: Wed, 18 Oct 2017 14:15:40 +0530 > > From: Pavan Nikhilesh > > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, > > nikhil.rao@intel.com > > Cc: dev@dpdk.org, Pavan Nikhilesh > > Subject: [dpdk-dev] [PATCH v2 1/3] net/octeontx: add support for event Rx > > adapter > > X-Mailer: git-send-email 2.7.4 > > > > Add functions to modify and delete qos responsible for mapping eth queues > > to event queues used for configuring event Rx adapter. > > The mbox functions have been moved from octeontx_pkivf.c to > > octeontx_pkivf.h to allow event_octeontx to access them. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > > > v2 changes: > > - Improve conditional statement readability (Nikhil). > > > > This series depends on http://dpdk.org/dev/patchwork/patch/30430 > > > > > > static __rte_always_inline uint16_t __hot > > __octeontx_xmit_pkts(void *lmtline_va, void *ioreg_va, int64_t *fc_status_va, > > @@ -195,10 +107,8 @@ octeontx_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > > uint16_t __hot > > octeontx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) > > { > > - struct rte_mbuf *mbuf; > > struct octeontx_rxq *rxq; > > struct rte_event ev; > > - octtx_wqe_t *wqe; > > size_t count; > > uint16_t valid_event; > > > > @@ -210,23 +120,7 @@ octeontx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) > > 1, 0); > > if (!valid_event) > > break; > > - > > - wqe = (octtx_wqe_t *)(uintptr_t)ev.u64; > > - rte_prefetch_non_temporal(wqe); > > - > > - /* Get mbuf from wqe */ > > - mbuf = (struct rte_mbuf *)((uintptr_t)wqe - > > - OCTTX_PACKET_WQE_SKIP); > > - mbuf->packet_type = > > - ptype_table[wqe->s.w2.lcty][wqe->s.w2.lety][wqe->s.w2.lfty]; > > - mbuf->data_off = RTE_PTR_DIFF(wqe->s.w3.addr, mbuf->buf_addr); > > - mbuf->pkt_len = wqe->s.w1.len; > > - mbuf->data_len = mbuf->pkt_len; > > - mbuf->nb_segs = 1; > > - mbuf->ol_flags = 0; > > - mbuf->port = rxq->port_id; > > IMO, You don't need to move the mbuf conversion inline function to 2/3, > Instead if we do in 1/3.It will functionality correct at 1/3. > > > - rte_mbuf_refcnt_set(mbuf, 1); > > - rx_pkts[count++] = mbuf; > > + rx_pkts[count++] = (struct rte_mbuf *)ev.u64; > > This will create build error on 32bit. You can avoid the typecast by > changing to ev.mbuf. > /export/dpdk-next-eventdev/drivers/net/octeontx/octeontx_rxtx.c: In > function ‘octeontx_recv_pkts’: > /export/dpdk-next-eventdev/drivers/net/octeontx/octeontx_rxtx.c:123:22: > error: cast to pointer from integer of different size > [-Werror=int-to-pointer-cast] > rx_pkts[count++] = (struct rte_mbuf *)ev.u64; > ^ > cc1: all warnings being treated as errors Agreed, will move mbuf conversion to 1/3 and fix 32 bit compilation issues and send a v3. Thanks, Pavan