From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: David Marchand <david.marchand@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] ring: fix build with -Wswitch-enum
Date: Mon, 27 Apr 2020 14:55:31 +0000 [thread overview]
Message-ID: <BYAPR11MB33012EBD306B67CC0EA2157C9AAF0@BYAPR11MB3301.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200427132341.27681-2-david.marchand@redhat.com>
>
> 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 <david.marchand@redhat.com>
> ---
> 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);
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 2.23.0
next prev parent reply other threads:[~2020-04-27 14:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 13:23 [dpdk-dev] [PATCH 0/3] 20.05-rc1 fixes for OVS David Marchand
2020-04-27 13:23 ` [dpdk-dev] [PATCH 1/3] ring: fix build with -Wswitch-enum David Marchand
2020-04-27 14:55 ` Ananyev, Konstantin [this message]
2020-04-27 13:23 ` [dpdk-dev] [PATCH 2/3] eal: fix typo in endian conversion macros David Marchand
2020-04-27 13:35 ` Bruce Richardson
2020-04-27 13:23 ` [dpdk-dev] [PATCH 3/3] ethdev: fix build warning on 64-bit value David Marchand
2020-04-27 13:33 ` Andrew Rybchenko
2020-04-27 13:34 ` Bruce Richardson
2020-04-27 13:36 ` David Marchand
2020-04-27 13:46 ` Ananyev, Konstantin
2020-04-27 14:00 ` David Marchand
2020-04-27 14:07 ` Ferruh Yigit
2020-04-27 14:12 ` David Marchand
2020-04-27 14:14 ` Ferruh Yigit
2020-04-28 9:27 ` Thomas Monjalon
2020-05-06 14:37 ` Morten Brørup
2020-04-27 13:39 ` Andrew Rybchenko
2020-04-27 13:40 ` David Marchand
2020-04-27 13:43 ` Bruce Richardson
2020-04-28 9:53 ` [dpdk-dev] [PATCH 0/3] 20.05-rc1 fixes for OVS David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BYAPR11MB33012EBD306B67CC0EA2157C9AAF0@BYAPR11MB3301.namprd11.prod.outlook.com \
--to=konstantin.ananyev@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).