From: Nicolas Dichtel <nicolas.dichtel@6wind•com>
To: David Ahern <dsa@cumulusnetworks•com>, davem@davemloft•net
Cc: netdev@vger•kernel.org, roopa@cumulusnetworks•com, tgraf@suug•ch
Subject: Re: [PATCH net-next] route: allow to route in a peer netns via lwt framework
Date: Fri, 24 Jul 2015 16:32:37 +0200 [thread overview]
Message-ID: <55B24C85.2010502@6wind.com> (raw)
In-Reply-To: <55B24B9B.4080001@cumulusnetworks.com>
Le 24/07/2015 16:28, David Ahern a écrit :
> On 7/23/15 8:22 AM, Nicolas Dichtel wrote:
>> static netdev_tx_t loopback_xmit(struct sk_buff *skb,
>> struct net_device *dev)
>> {
>> + int nsid = skb_lwt_netns_info(skb);
>> struct pcpu_lstats *lb_stats;
>> int len;
>>
>> + if (nsid >= 0) {
>> + struct net *peernet = get_net_ns_by_id(dev_net(dev), nsid);
>> +
>> + if (!peernet) {
>
> If nsid is > 0 then the peer namespace should exist right? So for this failure
> path why not increment tx_error stat?
I was not sure about that, because before my patch we increment statistics only
in case of NET_RX_SUCCESS.
next prev parent reply other threads:[~2015-07-24 14:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 14:22 [PATCH net-next] route: allow to route in a peer netns via lwt framework Nicolas Dichtel
2015-07-23 15:01 ` roopa
2015-07-23 15:25 ` Nicolas Dichtel
2015-07-23 15:50 ` roopa
2015-07-24 12:24 ` Nicolas Dichtel
2015-07-24 13:50 ` roopa
2015-07-24 14:11 ` Nicolas Dichtel
2015-07-24 14:16 ` [PATCH net-next v2] " Nicolas Dichtel
2015-07-24 15:39 ` Eric Dumazet
2015-07-24 16:27 ` Alexei Starovoitov
2015-07-27 19:56 ` Nicolas Dichtel
2015-07-29 13:16 ` [PATCH net-next v3] " Nicolas Dichtel
2015-07-29 15:20 ` Eric Dumazet
2015-07-29 21:17 ` Nicolas Dichtel
2015-07-24 14:28 ` [PATCH net-next] " David Ahern
2015-07-24 14:32 ` Nicolas Dichtel [this message]
2015-07-24 15:19 ` David Ahern
2015-07-27 20:07 ` Nicolas Dichtel
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=55B24C85.2010502@6wind.com \
--to=nicolas.dichtel@6wind$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dsa@cumulusnetworks$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=roopa@cumulusnetworks$(echo .)com \
--cc=tgraf@suug$(echo .)ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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