From: Hannes Frederic Sowa <hannes@stressinduktion•org>
To: Benjamin Poirier <bpoirier@suse•com>
Cc: Daniel Borkmann <daniel@iogearbox•net>,
netdev@vger•kernel.org, Eric Dumazet <eric.dumazet@gmail•com>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6•org>
Subject: Re: [PATCH] mld, igmp: Fix reserved tailroom calculation
Date: Mon, 29 Feb 2016 19:28:30 +0100 [thread overview]
Message-ID: <56D48DCE.3090705@stressinduktion.org> (raw)
In-Reply-To: <20160229180835.GA6224@f1.synalogic.ca>
On 29.02.2016 19:08, Benjamin Poirier wrote:
> If you think we should write the expression with "if" instead of "min",
> instead of the current
>
> + skb->reserved_tailroom = skb_tailroom(skb) -
> + min_t(int, mtu, skb_tailroom(skb) - tlen);
>
> it should be:
>
> + if (mtu < skb_tailroom(skb) - tlen)
> + skb->reserved_tailroom = skb_tailroom(skb) - mtu;
> + else
> + skb->reserved_tailroom = tlen;
>
> The second alternative does not look more readable to me but I have been
> looking at that expression for a while. If you think that it is more
> readable, I will resend the patch expressed that way. Please let me
> know.
I would still find it more readable actually, but no strong opinion, I
would leave it up to you.
Could it make sense to put this code into a static inline helper and
reuse it for both, igmp and mld?
Thanks,
Hannes
next prev parent reply other threads:[~2016-02-29 18:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 19:57 [PATCH] mld, igmp: Fix reserved tailroom calculation Benjamin Poirier
2016-02-29 14:57 ` Daniel Borkmann
2016-02-29 15:19 ` Benjamin Poirier
2016-02-29 15:38 ` Daniel Borkmann
2016-02-29 15:43 ` Hannes Frederic Sowa
2016-02-29 18:08 ` Benjamin Poirier
2016-02-29 18:28 ` Hannes Frederic Sowa [this message]
2016-02-29 23:03 ` [PATCH net v2] " Benjamin Poirier
2016-03-01 10:09 ` Hannes Frederic Sowa
2016-03-01 10:18 ` Daniel Borkmann
2016-03-01 16:00 ` Hannes Frederic Sowa
2016-03-03 20:42 ` 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=56D48DCE.3090705@stressinduktion.org \
--to=hannes@stressinduktion$(echo .)org \
--cc=bpoirier@suse$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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