From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: Thomas Graf <tgraf@redhat.com>, Jesse Gross <jesse@nicira.com>,
pshelar@nicira.com, dev@openvswitch.org
Cc: "David S. Miller" <davem@davemloft.net>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Eric Dumazet <edumazet@google.com>,
Daniel Borkmann <dborkman@redhat.com>,
Tom Herbert <therbert@google.com>,
Jason Wang <jasowang@redhat.com>, Florian Westphal <fw@strlen.de>,
Joe Perches <joe@perches.com>, Simon Horman <horms@verge.net.au>,
Jiri Pirko <jiri@resnulli.us>,
"Michael S. Tsirkin" <mst@redhat.com>,
Paul Durrant <Paul.Durrant@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Miklos Szeredi <mszeredi@suse.cz>,
netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
xen-devel@lists.xenproject.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
Date: Thu, 20 Mar 2014 16:01:59 +0000 [thread overview]
Message-ID: <532B10F7.60801@citrix.com> (raw)
In-Reply-To: <532AE010.9050903@redhat.com>
On 20/03/14 12:33, Thomas Graf wrote:
> On 03/20/2014 01:16 PM, Thomas Graf wrote:
>> On 03/19/2014 10:07 PM, Zoltan Kiss wrote:
>>> skb_zerocopy can copy elements of the frags array between skbs, but it
>>> doesn't
>>> orphan them. Also, it doesn't handle errors, so this patch takes care
>>> of that
>>> as well.
>>>
>>> Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
>>
>> Acked-by: Thomas Graf <tgraf@redhat.com>
>
> I take this back ;)
>
>>> ---
>>> + if (unlikely(skb_orphan_frags(to, GFP_ATOMIC))) {
>>> + skb_tx_error(to);
>>> + return -ENOMEM;
>>> + }
>
> Just noticed that you orphan the Netlink skb frags which do not
> exist yet instead of the source skb frags.
Oh, sorry, I'll fix this up.
>
>> Did you consider calling skb_tx_error() for Netlink message
>> allocation failures for the upcall as well? That memory pressure
>> is currently not reported back.
Yeah, that makes sense, I'll fix it the callers. Btw. I guess that just
provides some statistical data for the creator of the skb. At least for
netback it only increment a stat counter.
Zoli
WARNING: multiple messages have this Message-ID (diff)
From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: Thomas Graf <tgraf@redhat.com>, Jesse Gross <jesse@nicira.com>,
<pshelar@nicira.com>, <dev@openvswitch.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Eric Dumazet <edumazet@google.com>,
Daniel Borkmann <dborkman@redhat.com>,
Tom Herbert <therbert@google.com>,
Jason Wang <jasowang@redhat.com>, Florian Westphal <fw@strlen.de>,
Joe Perches <joe@perches.com>, Simon Horman <horms@verge.net.au>,
Jiri Pirko <jiri@resnulli.us>,
"Michael S. Tsirkin" <mst@redhat.com>,
Paul Durrant <Paul.Durrant@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Miklos Szeredi <mszeredi@suse.cz>,
<netfilter-devel@vger.kernel.org>, <netfilter@vger.kernel.org>,
<xen-devel@lists.xenproject.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>
Subject: Re: [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
Date: Thu, 20 Mar 2014 16:01:59 +0000 [thread overview]
Message-ID: <532B10F7.60801@citrix.com> (raw)
In-Reply-To: <532AE010.9050903@redhat.com>
On 20/03/14 12:33, Thomas Graf wrote:
> On 03/20/2014 01:16 PM, Thomas Graf wrote:
>> On 03/19/2014 10:07 PM, Zoltan Kiss wrote:
>>> skb_zerocopy can copy elements of the frags array between skbs, but it
>>> doesn't
>>> orphan them. Also, it doesn't handle errors, so this patch takes care
>>> of that
>>> as well.
>>>
>>> Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
>>
>> Acked-by: Thomas Graf <tgraf@redhat.com>
>
> I take this back ;)
>
>>> ---
>>> + if (unlikely(skb_orphan_frags(to, GFP_ATOMIC))) {
>>> + skb_tx_error(to);
>>> + return -ENOMEM;
>>> + }
>
> Just noticed that you orphan the Netlink skb frags which do not
> exist yet instead of the source skb frags.
Oh, sorry, I'll fix this up.
>
>> Did you consider calling skb_tx_error() for Netlink message
>> allocation failures for the upcall as well? That memory pressure
>> is currently not reported back.
Yeah, that makes sense, I'll fix it the callers. Btw. I guess that just
provides some statistical data for the creator of the skb. At least for
netback it only increment a stat counter.
Zoli
next prev parent reply other threads:[~2014-03-20 16:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 21:07 [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors Zoltan Kiss
2014-03-19 21:07 ` Zoltan Kiss
2014-03-19 21:07 ` Zoltan Kiss
[not found] ` <1395263249-16450-1-git-send-email-zoltan.kiss-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2014-03-20 12:16 ` Thomas Graf
2014-03-20 12:16 ` Thomas Graf
[not found] ` <532ADC33.5040607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-20 12:33 ` Thomas Graf
2014-03-20 12:33 ` Thomas Graf
2014-03-20 16:01 ` Zoltan Kiss
2014-03-20 16:01 ` Zoltan Kiss [this message]
2014-03-20 16:01 ` Zoltan Kiss
2014-03-20 12:33 ` Thomas Graf
2014-03-20 12:16 ` Thomas Graf
-- strict thread matches above, loose matches on Subject: below --
2014-03-19 21:07 Zoltan Kiss
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=532B10F7.60801@citrix.com \
--to=zoltan.kiss@citrix.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=davem@davemloft.net \
--cc=dborkman@redhat.com \
--cc=dev@openvswitch.org \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=herbert@gondor.apana.org.au \
--cc=horms@verge.net.au \
--cc=jasowang@redhat.com \
--cc=jesse@nicira.com \
--cc=jiri@resnulli.us \
--cc=joe@perches.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mszeredi@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pshelar@nicira.com \
--cc=tgraf@redhat.com \
--cc=therbert@google.com \
--cc=xen-devel@lists.xenproject.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 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.