[ovs-dev] [ovs-discuss] ioctls to datapath

Ben Pfaff blp at nicira.com
Sun Dec 12 15:04:41 UTC 2010


Yes, that sounds right.

On Sun, Dec 12, 2010 at 6:57 AM, Vivek Rai <vivekrai1228 at gmail.com> wrote:
> To figure out that i looked into how ovs-dpctl works. So the trick is
> basically to get the minor number of the datapath which you want to
> communicate with. The translation from the datapath name to device minor
> number is done in lookup_minor(char*, int*) and after that u do
> open(dev/net/dp$(minor_number), ...) to open the file descriptor. Am I
> right?
> Thanks,
> Vivek
>
>
>
> On Sun, Dec 12, 2010 at 12:31 PM, Ben Pfaff <blp at nicira.com> wrote:
>>
>> On Sat, Dec 11, 2010 at 6:14 PM, Vivek Rai <vivekrai1228 at gmail.com> wrote:
>> >    Thanks for your reply. I see that the way you do ioctl in dpif
>> > interface
>> > is: ioctl(dpif->fd, ODP_ *, odp_*); I am struggling to find out how to
>> > get
>> > the appropriate file descriptor for datapath. Typically  i can get a
>> > file
>> > descriptor to a device by open(device name, ...). But when I look into
>> > /dev/net/dp$i i=0,..,256. I do not know what is the appropriate device
>> > name.
>>
>> The logic for figuring that out is also in dpif-linux.c, if you keep
>> reading.
>
>




More information about the dev mailing list