Subject: Re: [PATCH] mld, igmp: Fix reserved tailroom calculation

From: Hannes Frederic Sowa <[email-masked]>
Date: Mon, 29 Feb 2016 19:28:30 +0100

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