All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: "张军伟(基础平台部)" <zhangjunweimartin@didichuxing.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	martinbj2008 <martinbj2008@gmail.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH v1 net-next 1/5] drop_monitor: import netnamespace framework
Date: Wed, 12 Jul 2017 10:45:52 -0700	[thread overview]
Message-ID: <CAM_iQpXgKbHG5dL77d=yqarn_xJapVKv3z10Kzsn34vkKWUoTA@mail.gmail.com> (raw)
In-Reply-To: <eef69f4a65644a499665d3973bf5bc06@BJSGEXMBX01.didichuxing.com>

On Wed, Jul 12, 2017 at 10:08 AM, 张军伟(基础平台部)
<zhangjunweimartin@didichuxing.com> wrote:
> about skb->sk
> it is used as supplementary when skb->dev is empty,such as netlink message。
>
> +       if (skb->dev)
> +               net = dev_net(skb->dev);
> +       else if (skb->sk)
> +               net = sock_net(skb->sk);
> +       else
> +               return;

Check udp_set_dev_scratch().

Again, as Neil mentioned, the idea is arguable, it is actually harder to trace
skb's with your patch when they across netns'es.

  parent reply	other threads:[~2017-07-12 17:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 10:40 [PATCH v1 net-next 1/5] drop_monitor: import netnamespace framework martinbj2008
2017-07-12 10:40 ` [PATCH v1 net-next 2/5] drop_monitor: let dm trace state support ns martinbj2008
2017-07-12 10:40 ` [PATCH v1 net-next 3/5] drop_monitor: let hw_stats_list support net ns martinbj2008
2017-07-12 10:40 ` [PATCH v1 net-next 4/5] drop_monitor: let drop stat " martinbj2008
2017-07-12 18:44   ` kbuild test robot
2017-07-12 18:44   ` [PATCH] drop_monitor: fix semicolon.cocci warnings kbuild test robot
2017-07-12 10:40 ` [PATCH v1 net-next 5/5] drop_monitor: increase version when ns support is ready martinbj2008
2017-07-12 13:37 ` [PATCH v1 net-next 1/5] drop_monitor: import netnamespace framework Neil Horman
2017-07-12 16:58   ` Cong Wang
     [not found]     ` <eef69f4a65644a499665d3973bf5bc06@BJSGEXMBX01.didichuxing.com>
2017-07-12 17:45       ` Cong Wang [this message]
2017-07-12 15:21 ` David Miller

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='CAM_iQpXgKbHG5dL77d=yqarn_xJapVKv3z10Kzsn34vkKWUoTA@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=martinbj2008@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=zhangjunweimartin@didichuxing.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.