[ovs-dev] [netlink v4 40/52] datapath: Convert ODP_FLOW_* and ODP_EXECUTE to put dp_idx into message.

Jesse Gross jesse at nicira.com
Tue Jan 18 22:56:27 UTC 2011


On Tue, Jan 18, 2011 at 2:53 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Tue, Jan 18, 2011 at 02:47:45PM -0800, Jesse Gross wrote:
>> On Tue, Jan 18, 2011 at 2:18 PM, Ben Pfaff <blp at nicira.com> wrote:
>> > I applied the following incremental to the patch:
>> >
>> > diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
>> > index ba69dc0..90f7bd0 100644
>> > --- a/lib/dpif-linux.c
>> > +++ b/lib/dpif-linux.c
>> > @@ -377,7 +377,8 @@ dpif_linux_get_max_ports(const struct dpif *dpif OVS_UNUSED)
>> > ?static int
>> > ?dpif_linux_flow_flush(struct dpif *dpif_)
>> > ?{
>> > - ? ?return do_ioctl(dpif_, ODP_FLOW_FLUSH, NULL);
>> > + ? ?struct dpif_linux *dpif = dpif_linux_cast(dpif_);
>> > + ? ?return ioctl(dpif->fd, ODP_FLOW_FLUSH, dpif->minor) ? errno : 0;
>>
>> This looks right but is there a reason to open code do_ioctl()?
>
> It was either that or cast dpif->minor to void *.  I thought that
> open-coding a single line of code was better.

OK, that's reasonable.




More information about the dev mailing list