Re: [PATCH] tcp: don't use __constant_cpu_to_be32
From: Sergey Senozhatsky
Date: Mon Mar 18 2019 - 21:29:25 EST
On (03/18/19 09:32), Stanislav Fomichev wrote:
[..]
> > -#define bpf_htons(x) \
> > - (__builtin_constant_p(x) ? \
> > - __bpf_constant_htons(x) : __bpf_htons(x))
> > -#define bpf_ntohs(x) \
> > - (__builtin_constant_p(x) ? \
> > - __bpf_constant_ntohs(x) : __bpf_ntohs(x))
> > -#define bpf_htonl(x) \
> > - (__builtin_constant_p(x) ? \
> > - __bpf_constant_htonl(x) : __bpf_htonl(x))
> > -#define bpf_ntohl(x) \
> > - (__builtin_constant_p(x) ? \
> > - __bpf_constant_ntohl(x) : __bpf_ntohl(x))
> > +#define bpf_htons(x) __bpf_htons((x))
> > +#define bpf_ntohs(x) __bpf_ntohs((x))
> > +#define bpf_htonl(x) __bpf_htonl((x))
> > +#define bpf_ntohl(x) __bpf_ntohl((x))
> At this point we can probably drop __bpf_xxx as well?
> Care to resend with proper description when bpf-next opens?
OK.
-ss