[ovs-dev] [PATCH 08/19] datapath: Compatibility code for inet_proto_csum_replace2.

Jesse Gross jesse at nicira.com
Thu Dec 9 21:18:36 UTC 2010


On Thu, Dec 9, 2010 at 10:03 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Dec 08, 2010 at 10:14:06PM -0800, Jesse Gross wrote:
>> Kernels earlier than 2.6.25 did not define inet_proto_csum_replace2,
>> so implement it ourselves.
>>
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>
> It would be better as an inline function.  If "from" or "to" is
> mistakenly passed as, say, a pointer, then this will silently accept
> that (although we'd catch it compiling on a later kernel).

I agree that it would be better as an inline function (and actually I
just noticed that I left the types in from when it originally was a
function).  However, there is a reason for it: the compat version of
inet_proto_csum_replace4() is defined in checksum.h, so I used a macro
to avoid recursive #includes.

>
> The only actual problem I see with it is that the trailing ; should be
> deleted.

Fixed, thanks.




More information about the dev mailing list