Skip to contentSkip to conversation

Delivery Status Notification (Failure)

DISCUSSION Naveen 3 participants 3 messages Sep 24, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Naveen

author
#1 lore raw

Hi
Right now the only way to detect if an interface has a peer(veth)
is touse ethtool -S. Instead I was thinking of adding it to device attributes as a peer_ifndex entry. In drivers/net/veth.c I could add an entry to
dev->groups for a veth specific group. Would that be acceptable ?

Thanks
Naveen

#2 lore raw
Quoted 7 lines · Naveen

Hi
Right now the only way to detect if an interface has a peer(veth)
is touse ethtool -S. Instead I was thinking of adding it to device attributes as a peer_ifndex entry. In drivers/net/veth.c I could add an entry to
dev->groups for a veth specific group. Would that be acceptable ?

I've had similar discussions with others who agree with you that the current method is not ideal -- especially when there are a large number of namespaces in in use on a system. One such proposal was to have the output in ip link show (possibly only with the '-d' option), but no test patches have been written yet....

#3 lore raw
In reply to Naveen
Quoted 5 lines · Naveen

Right now the only way to detect if an interface has a peer(veth)
is touse ethtool -S. Instead I was thinking of adding it to device attributes as a peer_ifndex entry. In drivers/net/veth.c I could add an entry to
dev->groups for a veth specific group. Would that be acceptable ?

Recent kernels announce the peer in IFLA_LINK, including its netnsid (thus it's finally possible to track peers across net namespaces). Just try "ip a" with a recent kernel.

Jiri

Signature · 1 line
Jiri Benc