From patchwork Tue Apr 9 20:06:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 52515 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B12A5B2A; Tue, 9 Apr 2019 22:06:46 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 61F185B1C for ; Tue, 9 Apr 2019 22:06:44 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 1D53F31D; Tue, 9 Apr 2019 16:06:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 09 Apr 2019 16:06:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=FaZC2PQby6 F2J9aIZb9aYtm7zSKZBoWEEXcOi3l6I4c=; b=bWO1i2lqhrIB2wpJ0SZe26uE1W 9MLMJORmfGhZA1pWOaLD1otI16KSobS3EzFXfMoxDTd5el5mkRvGSMyUsHCgkq6k NJOZlntsCOCtq5R1GlL5hSfWXJVglXPQg0/9q+kEYV7IcMT7VxC8sWTO4J0cF7rN 9fIFQuaAXr1ggAy6w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=FaZC2PQby6F2J9aIZb9aYtm7zSKZBoWEEXcOi3l6I4c=; b=rO7ledId cYGHG9WlTySJ6hVrYVoNu4vU51nA5yqbWEq+YJdMPbZDI2Q33O26qKBuQccRsg3Z LJH3qJ/Ppr2b45tbH1jQnwXIucyhFxUXUxpUvq8VaNkHpbR8P0BX5z/5gKTDp/6L 57l1J7jkw30qj+yx5z20ftUP8GWEWu5tQOso/vPTpn80gc2bgkvpdt+KAH7O4XTW 4I6aBtqzJ1IH099rU6BVJ3/7plnWD2u3tghPEz2WqNqGgvHeJshjclSXpbogYG/U zxuTC0kCXRjDSG2t8xIJLCPBJ+s2GyaSbcjw4thzmzs84DX7JFphW2QLuxO2yN/6 eLJntCRrE6fHwQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudehgddugeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 145ECE409D; Tue, 9 Apr 2019 16:06:40 -0400 (EDT) From: Thomas Monjalon To: Olivier Matz Cc: dev@dpdk.org, konstantin.ananyev@intel.com Date: Tue, 9 Apr 2019 22:06:35 +0200 Message-Id: <20190409200636.2193-2-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190409200636.2193-1-thomas@monjalon.net> References: <20190409194904.6822-1-thomas@monjalon.net> <20190409200636.2193-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 1/2] mbuf: fix big endian build 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" Compilation was failing when using a big endian toolchain: rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS' Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value") Cc: konstantin.ananyev@intel.com Signed-off-by: Thomas Monjalon Acked-by: Konstantin Ananyev --- lib/librte_mbuf/rte_mbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f7886dcb3..7dd2e7fb3 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -500,7 +500,7 @@ enum { RTE_MBUF_OUTL2_LEN_BITS, #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN RTE_MBUF_L2_LEN_OFS = - sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS + sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS, RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS, RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS, RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS, From patchwork Tue Apr 9 20:06:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 52516 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97C045B38; Tue, 9 Apr 2019 22:06:49 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 08C2C58C4; Tue, 9 Apr 2019 22:06:45 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EC1A0265D1; Tue, 9 Apr 2019 16:06:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 09 Apr 2019 16:06:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=DCvj3Iif6S 3M+alDFcEUX/6RwwSpcljakXIty0kPoKE=; b=d9lH8dLhx6l3cPrlkZj73bbwAs I4NfN3he7PUzGk4qUKMjz14a8iAc6J3Vtzp4c1DznNuif3c4q4xIxTLC7oprNAJY /sLQFhefbN0duXERz36QUtibmLEoMunqRJULDYgkbxvhVp9yKggIhFEx7nKDuF3E r/jAYI5fLchpfYx8o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=DCvj3Iif6S3M+alDFcEUX/6RwwSpcljakXIty0kPoKE=; b=hRNCJusD NMggkQm70ErYtkJQaVsivQNp9TMdcRvuWKEPCkFwTFvm0kO+iAZE/wL6Kw70nlOS Y+tuaWcZolhrznV8QOoYPtZXPkouXY0I9osZ1qUdQB1R5NJ2lvkBJVU6Qt3S49dI 88B2+ESCwujk6o2SC1pCjmcDzjf1Q5vGmeI6LyYP53zlycpqCqTtlfZICVnu4ryi 8TZ/xGOLLHRsbY23jH2jOkA6x6b+PcBypGjz7FrwQeAadxHzuV1DAK1yEGyTvFdN uLPRJ2Fnp3djkSK7YUYIAgeoaqMX3uIyTxpP0GSv+14c9SsNPHZCZvF7fbc5hatS QdivomS8lNuXuA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudehgddugeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id C42EDE452E; Tue, 9 Apr 2019 16:06:42 -0400 (EDT) From: Thomas Monjalon To: Gagandeep Singh , Pankaj Chauhan Cc: dev@dpdk.org, stable@dpdk.org Date: Tue, 9 Apr 2019 22:06:36 +0200 Message-Id: <20190409200636.2193-3-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190409200636.2193-1-thomas@monjalon.net> References: <20190409194904.6822-1-thomas@monjalon.net> <20190409200636.2193-1-thomas@monjalon.net> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 2/2] net/enetc: fix big endian build 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" Compilation was failing when using a big endian toolchain: drivers/net/enetc/enetc_rxtx.c:92:21: error: passing argument 1 of 'rte_constant_bswap64' makes integer from pointer without a cast Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx") Cc: g.singh@nxp.com Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- drivers/net/enetc/enetc_rxtx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c index 631e2430d..ef0d7919f 100644 --- a/drivers/net/enetc/enetc_rxtx.c +++ b/drivers/net/enetc/enetc_rxtx.c @@ -88,8 +88,9 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int buff_cnt) rx_swbd = &rx_ring->q_swbd[i]; rxbd = ENETC_RXBD(*rx_ring, i); for (j = 0; j < buff_cnt; j++) { - rx_swbd->buffer_addr = - rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool)); + rx_swbd->buffer_addr = (void *)(uintptr_t) + rte_cpu_to_le_64((uint64_t)(uintptr_t) + rte_mbuf_raw_alloc(rx_ring->mb_pool)); rxbd->w.addr = (uint64_t)(uintptr_t) rx_swbd->buffer_addr->buf_addr + rx_swbd->buffer_addr->data_off;