[ovs-dev] [PATCH 2/3] datapath: Mega flow implementation

Jesse Gross jesse at nicira.com
Fri Jun 7 16:46:56 UTC 2013


It looks to me like it is available all the way back to 2.6.18, which
is the oldest kernel we care about.

On Fri, Jun 7, 2013 at 7:39 AM, Andy Zhou <azhou at nicira.com> wrote:
> Thanks for the suggestion.
>
> The kernel source I am looking at: 3.9.0-rc8, does not a accessible
> definition of ROUND_UP,  but roundup(x,y) is, and fits the bill.  I am
> thinking of using it instead, unless it breaks on some older kernel version
> that we care about.
>
> From kernel.h:
>
> /* The `const' in roundup() prevents gcc-3.3 from calling __divdi3 */
> #define roundup(x, y) (                 \
> {                           \
>     const typeof(y) __y = y;            \
>     (((x) + (__y - 1)) / __y) * __y;        \
> }
>
>
> On Fri, Jun 7, 2013 at 7:19 AM, Rajahalme, Jarno (NSN - FI/Espoo)
> <jarno.rajahalme at nsn.com> wrote:
>>
>>
>> On Jun 7, 2013, at 13:35 , ext Andy Zhou wrote:
>>
>>> Is this the same as DIV_ROUND_UP?
>>
>> I did not use it because DIV_ROUND_UP gives the roundup of u32, I needed
>> the roundup in bytes.  However, I could rewrite this function using
>> DIV_ROUND_UP.
>>
>>
>> There is ROUND_UP doing that already.
>
>



More information about the dev mailing list