[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140514.151504.1740922429122469259.davem@davemloft.net>
Date: Wed, 14 May 2014 15:15:04 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: ktkhai@...allels.com
Cc: netdev@...r.kernel.org, edumazet@...gle.com
Subject: Re: net: unix: Align send data_len up to PAGE_SIZE
From: Kirill Tkhai <ktkhai@...allels.com>
Date: Mon, 12 May 2014 18:52:12 +0400
> data_len = min_t(size_t,
> len - SKB_MAX_ALLOC,
> MAX_SKB_FRAGS * PAGE_SIZE);
> + data_len = min_t(size_t,
> + len,
> + PAGE_ALIGN(data_len));
> + }
When I see:
x = min(y - N, z1);
x = min(y, z2);
I'm a bit suspicious. Why are you not subtracting the constant
factor out of the first variable in the second min() call?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists