OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH] net: Add etun driver
Re: [PATCH] net: Add etun driver [message #18108 is a reply to message #18105] Sat, 07 April 2007 05:37 Go to previous messageGo to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Ben Greear <greearb@candelatech.com> writes:

> I guess that will do, but then if you ever change the strings, any user-space
> that is
> depending on this will break or have to be modified with additional cruft.  It
> seems
> cleaner to me to have an ioctl or a specific place in /proc or some other
> virtual
> fs, but I can deal with it either way...

True if the name of the driver changes from etun there is an issue.

>>> Also, how do you find the peer device from user-space?  This would be very
>>> useful
>>> for anyone trying to manage these devices with a user-space program.
>>>
>>
>> Currently "ethtool -S <interface>"
>> And read the partner_ifindex.
>>
> Ok, that will work.  Again, my personal preference is for a single specific
> ioctl or proc'ish file
> to read the specific value instead of having to parse strings, but this will do.

Hmm. I guess there is string parsing to identify the index.

I guess a sysfs device attribute would work as well.

>> Further whoever generates the pair specifies the initial set of names.
>>
> Yeah, but you can't depend on knowing that in an interesting environment.

Frankly.  In an interesting environment I haven't been able to think of a
way to successfully say anything about the partner device.

The problem is that all identifiers are namespace local so the remote side
is not in the current namespace the ifindex or the device name mean nothing.

In that case the only remotely usable value I can return is the mac address
of the other side.

Eric
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [patch 0/8] unprivileged mount syscall
Next Topic: i/o accounting in 2.6.18 openvz :: show_io_stats
Goto Forum:
  


Current Time: Sat Sep 06 21:26:55 GMT 2025

Total time taken to generate the page: 0.10643 seconds