netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dhowells@redhat.com
Cc: hannes@stressinduktion.org, netdev@vger.kernel.org
Subject: Re: Getting a NIC's MTU size
Date: Thu, 20 Feb 2014 13:45:04 -0500 (EST)	[thread overview]
Message-ID: <20140220.134504.889753387361360927.davem@davemloft.net> (raw)
In-Reply-To: <16869.1392917423@warthog.procyon.org.uk>

From: David Howells <dhowells@redhat.com>
Date: Thu, 20 Feb 2014 17:30:23 +0000

> David Miller <davem@davemloft.net> wrote:
> 
>> > 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?

If the dst is valid and you have a reference to it, dst->dev is good.

      parent reply	other threads:[~2014-02-20 18:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 14:36 Does ICMP_FRAG_NEEDED automatically update the routing cache? David Howells
2014-02-14 14:44 ` Hannes Frederic Sowa
2014-02-14 15:00 ` David Howells
2014-02-14 15:03   ` Hannes Frederic Sowa
2014-02-14 15:42   ` David Howells
2014-02-14 15:49   ` Getting a NIC's MTU size David Howells
2014-02-14 16:52     ` Hannes Frederic Sowa
2014-02-17  5:21     ` David Miller
2014-02-20 17:30     ` David Howells
2014-02-20 18:12       ` Hannes Frederic Sowa
2014-02-20 18:45       ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140220.134504.889753387361360927.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=hannes@stressinduktion.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).