Re: [PATCH net-next] tcp: suppress too verbose messages in tcp_send_ack()
From: Eric Dumazet <hidden>
Date: 2015-11-26 03:29:41
From: Eric Dumazet <hidden>
Date: 2015-11-26 03:29:41
On Wed, 2015-11-25 at 22:17 -0500, Aaron Conole wrote:
Probably that would call for a different more primitive version of this
API (sk_gfp_or_memalloc() as you suggest below). Then this could be
written in terms of that
static inline sk_gfp_or_memalloc(const struct sock *sk, gfp_t gfp_mask)
{
return gfp_mask | (sk->sk_allocation & __GFP_MEMALLOC);
}
static inline sk_gfp_atomic(const struct sock *sk, gfp_t gfp_mask)
{
return sk_gfp_or_memalloc(sk, gfp_mask | GFP_ATOMIC);
}
Not sure if it's "too much API".Well, this looks like it, not sure how this is going to make code clearer. The only thing we bring from sk is the __GFP_MEMALLOC thing, so a single function seems enough ? I honestly do not care that much about function names, I mostly look at actual implementation. And current implementation ignores the gfp_t gfp_mask argument, for no real good reason.