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 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 --- 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_pee= k.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, =09=09n =3D __rte_ring_hts_move_prod_head(r, n, behavior, =09=09=09&head, &free); =09=09break; +=09case RTE_RING_SYNC_MT: +=09case RTE_RING_SYNC_MT_RTS: =09default: =09=09/* unsupported mode, shouldn't be here */ =09=09RTE_ASSERT(0); @@ -217,6 +219,8 @@ rte_ring_enqueue_elem_finish(struct rte_ring *r, const = void *obj_table, =09=09=09__rte_ring_enqueue_elems(r, tail, obj_table, esize, n); =09=09__rte_ring_hts_set_head_tail(&r->hts_prod, tail, n, 1); =09=09break; +=09case RTE_RING_SYNC_MT: +=09case RTE_RING_SYNC_MT_RTS: =09default: =09=09/* unsupported mode, shouldn't be here */ =09=09RTE_ASSERT(0); @@ -263,6 +267,8 @@ __rte_ring_do_dequeue_start(struct rte_ring *r, void *o= bj_table, =09=09n =3D __rte_ring_hts_move_cons_head(r, n, behavior, =09=09=09&head, &avail); =09=09break; +=09case RTE_RING_SYNC_MT: +=09case RTE_RING_SYNC_MT_RTS: =09default: =09=09/* unsupported mode, shouldn't be here */ =09=09RTE_ASSERT(0); @@ -414,6 +420,8 @@ rte_ring_dequeue_elem_finish(struct rte_ring *r, unsign= ed int n) =09=09n =3D __rte_ring_hts_get_tail(&r->hts_cons, &tail, n); =09=09__rte_ring_hts_set_head_tail(&r->hts_cons, tail, n, 0); =09=09break; +=09case RTE_RING_SYNC_MT: +=09case RTE_RING_SYNC_MT_RTS: =09default: =09=09/* unsupported mode, shouldn't be here */ =09=09RTE_ASSERT(0); --=20 2.23.0