From patchwork Mon Apr 27 13:23:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 69389 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A4DDCA00BE; Mon, 27 Apr 2020 15:24:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4930F1D418; Mon, 27 Apr 2020 15:24:17 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 44DFB1D14C for ; Mon, 27 Apr 2020 15:24:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587993853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VdKNPpFljazFv/vftpbmdvhxALwgtDZDG2SIufl7nF0=; b=iS6sFOTJxheldaQe3y6yALq7N76znvT6Ajjgq3Nidzqe/QC/jn1HtN8BkbsPmLq9gZFjbb rjUzrpKIun/uxZb0I64+LPXNvXCaqvnrtdNeee6uwwX41uK1EXYrJ2pHxrxE0VDfknzuaM Y1hcQt0CVPXoXuO383E93yjkfUD4zpY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-hDlhpcMQPYWQLbazdgj90g-1; Mon, 27 Apr 2020 09:24:12 -0400 X-MC-Unique: hDlhpcMQPYWQLbazdgj90g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2752819057AC; Mon, 27 Apr 2020 13:24:00 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.195.1]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F3D519C4F; Mon, 27 Apr 2020 13:23:58 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Honnappa Nagarahalli , Konstantin Ananyev Date: Mon, 27 Apr 2020 15:23:39 +0200 Message-Id: <20200427132341.27681-2-david.marchand@redhat.com> In-Reply-To: <20200427132341.27681-1-david.marchand@redhat.com> References: <20200427132341.27681-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH 1/3] ring: fix build with -Wswitch-enum 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" Some popular vswitch implementation might use a gcc option that complains about missing enums in switch statements. Fix this by listing all possible values. Fixes: 664ff4b1729b ("ring: introduce peek style API") Signed-off-by: David Marchand Acked-by: Konstantin Ananyev --- lib/librte_ring/rte_ring_peek.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/librte_ring/rte_ring_peek.h b/lib/librte_ring/rte_ring_peek.h index 9e7f4db323..d5e6ea1cf3 100644 --- a/lib/librte_ring/rte_ring_peek.h +++ b/lib/librte_ring/rte_ring_peek.h @@ -68,6 +68,8 @@ __rte_ring_do_enqueue_start(struct rte_ring *r, uint32_t n, n = __rte_ring_hts_move_prod_head(r, n, behavior, &head, &free); break; + case RTE_RING_SYNC_MT: + case RTE_RING_SYNC_MT_RTS: default: /* unsupported mode, shouldn't be here */ RTE_ASSERT(0); @@ -217,6 +219,8 @@ rte_ring_enqueue_elem_finish(struct rte_ring *r, const void *obj_table, __rte_ring_enqueue_elems(r, tail, obj_table, esize, n); __rte_ring_hts_set_head_tail(&r->hts_prod, tail, n, 1); break; + case RTE_RING_SYNC_MT: + case RTE_RING_SYNC_MT_RTS: default: /* unsupported mode, shouldn't be here */ RTE_ASSERT(0); @@ -263,6 +267,8 @@ __rte_ring_do_dequeue_start(struct rte_ring *r, void *obj_table, n = __rte_ring_hts_move_cons_head(r, n, behavior, &head, &avail); break; + case RTE_RING_SYNC_MT: + case RTE_RING_SYNC_MT_RTS: default: /* unsupported mode, shouldn't be here */ RTE_ASSERT(0); @@ -414,6 +420,8 @@ rte_ring_dequeue_elem_finish(struct rte_ring *r, unsigned int n) n = __rte_ring_hts_get_tail(&r->hts_cons, &tail, n); __rte_ring_hts_set_head_tail(&r->hts_cons, tail, n, 0); break; + case RTE_RING_SYNC_MT: + case RTE_RING_SYNC_MT_RTS: default: /* unsupported mode, shouldn't be here */ RTE_ASSERT(0); From patchwork Mon Apr 27 13:23:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 69387 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17B83A00BE; Mon, 27 Apr 2020 15:24:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BDB6F1D15E; Mon, 27 Apr 2020 15:24:13 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id AD7421C29A for ; Mon, 27 Apr 2020 15:24:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587993852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mh526CFhk7gUMw78IbqCToWaUxO3DBo5JZ2vApwOhZA=; b=OhsHrk3hX41jqUtg1/W0JcFJVY6Gpniq61qUMMvJ4NQ7PBHCpI/Jt8oftzZOtfxtOonY44 3Kbi1UvMANuVuX38KdfvVbek0cszstAjbQStiyxnnQP8TioveGsEumRbRKC3vu9ENvLxHB fO/8fK08hWEnYd5Gpu2IzUkWDbFMFQ4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-__GASPZHM4qa6O9AlhTkuw-1; Mon, 27 Apr 2020 09:24:10 -0400 X-MC-Unique: __GASPZHM4qa6O9AlhTkuw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B84A58C1A18; Mon, 27 Apr 2020 13:24:04 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.195.1]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7358819C4F; Mon, 27 Apr 2020 13:24:03 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Adrien Mazarguil Date: Mon, 27 Apr 2020 15:23:40 +0200 Message-Id: <20200427132341.27681-3-david.marchand@redhat.com> In-Reply-To: <20200427132341.27681-1-david.marchand@redhat.com> References: <20200427132341.27681-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH 2/3] eal: fix typo in endian conversion macros 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" Caught by code inspection, for little endian, RTE_LEXX macros should provide rte_leXX_t type values. Fixes: b75667ef9f7e ("eal: add static endianness conversion macros") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Bruce Richardson --- lib/librte_eal/include/generic/rte_byteorder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/include/generic/rte_byteorder.h b/lib/librte_eal/include/generic/rte_byteorder.h index 38e8cfd32b..9ca960932f 100644 --- a/lib/librte_eal/include/generic/rte_byteorder.h +++ b/lib/librte_eal/include/generic/rte_byteorder.h @@ -93,9 +93,9 @@ #define RTE_BE16(v) (rte_be16_t)(RTE_STATIC_BSWAP16(v)) #define RTE_BE32(v) (rte_be32_t)(RTE_STATIC_BSWAP32(v)) #define RTE_BE64(v) (rte_be64_t)(RTE_STATIC_BSWAP64(v)) -#define RTE_LE16(v) (rte_be16_t)(v) -#define RTE_LE32(v) (rte_be32_t)(v) -#define RTE_LE64(v) (rte_be64_t)(v) +#define RTE_LE16(v) (rte_le16_t)(v) +#define RTE_LE32(v) (rte_le32_t)(v) +#define RTE_LE64(v) (rte_le64_t)(v) #else #error Unsupported endianness. #endif From patchwork Mon Apr 27 13:23:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 69390 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 842B7A00BE; Mon, 27 Apr 2020 15:24:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02E0D1D424; Mon, 27 Apr 2020 15:24:21 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id B5C461D17C for ; Mon, 27 Apr 2020 15:24:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587993854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qu/MuzBufTbwrzSAiI6xpCOey1nEqRanDNexqX7ivtM=; b=aQ6TJWHNZvBRoIP1KqibLnmGSBQwv1FuoHCWq80Xjjz5zCMy5Z2UP3RdqCdAAy8ISDUb+x xeoBa+eKT+Y+aZOe4OrMC7UEXZwZ73rjQ1tJPuStYu5S4SWLHLawPGUVB8cOImZPpB9x5+ 4egy4tQ/eoqEaWUV5PJomyDJqxdscQw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-inrNG6AeNuqZPjs0FinyHw-1; Mon, 27 Apr 2020 09:24:11 -0400 X-MC-Unique: inrNG6AeNuqZPjs0FinyHw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F1A6F107ACCA; Mon, 27 Apr 2020 13:24:09 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.195.1]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2DE8919C58; Mon, 27 Apr 2020 13:24:06 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Ori Kam , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Xiao Zhang Date: Mon, 27 Apr 2020 15:23:41 +0200 Message-Id: <20200427132341.27681-4-david.marchand@redhat.com> In-Reply-To: <20200427132341.27681-1-david.marchand@redhat.com> References: <20200427132341.27681-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH 3/3] ethdev: fix build warning on 64-bit value 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" Building OVS with dpdk, sparse complains about 64-bit constant being passed as a normal integer that can't fit it: error: constant 0xffffffffffffffff is so big it is unsigned long Fixes: ecbc8570131d ("ethdev: add PFCP header to flow API") Signed-off-by: David Marchand Reviewed-by: Andrew Rybchenko Acked-by: Thomas Monjalon --- lib/librte_ethdev/rte_flow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index 132b44edc6..1fb94f35e8 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -1534,7 +1534,7 @@ struct rte_flow_item_pfcp { #ifndef __cplusplus static const struct rte_flow_item_pfcp rte_flow_item_pfcp_mask = { .s_field = 0x01, - .seid = RTE_BE64(0xffffffffffffffff), + .seid = RTE_BE64(UINT64_C(0xffffffffffffffff)), }; #endif