From: Aaron Conole <aconole@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] tcp: suppress too verbose messages in tcp_send_ack()
Date: Fri, 27 Nov 2015 21:21:44 -0500 [thread overview]
Message-ID: <f7tegfadft3.fsf@aconole.bos.csb> (raw)
In-Reply-To: <1448508579.24696.66.camel@edumazet-glaptop2.roam.corp.google.com> (Eric Dumazet's message of "Wed, 25 Nov 2015 19:29:39 -0800")
Eric Dumazet <eric.dumazet@gmail.com> writes:
> 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 ?
Okay. Just thought that a 'gfp' function ending in _atomic that doesn't
actually set GFP_ATOMIC might now confuse, but if you think it's no big
deal, hey no skin off my back :)
> 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.
I agree with this.
next prev parent reply other threads:[~2015-11-28 2:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 21:50 [PATCH net-next] tcp: suppress too verbose messages in tcp_send_ack() Eric Dumazet
2015-11-25 22:08 ` Aaron Conole
2015-11-25 22:32 ` Eric Dumazet
2015-11-25 22:35 ` Eric Dumazet
2015-11-26 3:17 ` Aaron Conole
2015-11-26 3:29 ` Eric Dumazet
2015-11-28 2:21 ` Aaron Conole [this message]
2015-11-30 16:06 ` David Miller
2015-11-30 16:57 ` [PATCH v2 " Eric Dumazet
2015-12-03 4:44 ` David Miller
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=f7tegfadft3.fsf@aconole.bos.csb \
--to=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.