[PATCH] common/idpf: remove unnecessary compile option
Stephen Hemminger
stephen at networkplumber.org
Mon Apr 24 19:41:46 CEST 2023
On Mon, 24 Apr 2023 10:29:19 -0700
Tyler Retzlaff <roretzla at linux.microsoft.com> wrote:
> On Mon, Apr 24, 2023 at 09:23:48AM -0700, Stephen Hemminger wrote:
> > On Mon, 24 Apr 2023 18:47:00 -0400
> > Qi Zhang <qi.z.zhang at intel.com> wrote:
> >
> > > Remove compile option "__KERNEL" which should not be considered in
> > > DPDK. Also only #include <rte_xxx> in idpf_osdep.h.
> > >
> > > Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> >
> > This will cause some warnings in DPDK build depending on compiler
> > version and flags. You need to leave the fallthrough comment or
> > use one of the other fallthrough annotations.
>
> if there are variations of annotating fallthrough i would not object to
> a macro for it being exposed from rte_common.h
>
> full disclosure it would let me use the equivalent that are provided
> with windows and windows toolchains.
Yes having something like __rte_fallthrough would help.
Wouldn't help code that is trying to always work in kernel, DPDK or other places.
Both Gcc and clang use statement attributes and C++ has [[fallthrough]]
https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html
https://clang.llvm.org/docs/AttributeReference.html#fallthrough
More information about the dev
mailing list