Thread (11 messages) flat view 11 messages, 3 authors, 2014-02-20

Re: Getting a NIC's MTU size

From: Hannes Frederic Sowa <hidden>
Date: 2014-02-20 18:12:53

On Thu, Feb 20, 2014 at 05:30:23PM +0000, David Howells wrote:
David Miller [off-list ref] wrote:
quoted
quoted
One further question: If I want to get the MTU size of the NIC through
which packets will go to get to a particular peer, can I do:
As has been suggested or at least hinted to by others, you have to use
the route dst's device pointer.
So I gather.  My query was intended to be about the safety of accessing the
dst->dev pointer.  Can I just dereference it?  Or do I need to take a lock or
use RCU?
No, you can just dereference it. dst holds a reference on ->dev, so it
is safe without lock or rcu as long as dst is alive and referenced.

Greetings,

  Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help