From: Florian Westphal <fw@strlen.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 4/5] netfilter: nfnetlink_queue: add skb info attribute
Date: Tue, 16 Apr 2013 19:47:51 +0200 [thread overview]
Message-ID: <20130416174751.GB1408@breakpoint.cc> (raw)
In-Reply-To: <1366127722.4459.139.camel@edumazet-glaptop>
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Tue, 2013-04-16 at 17:32 +0200, Florian Westphal wrote:
> > Once we allow userspace to receive gso/gro packets, userspace
> > needs to be able to determine when checksums appear to be
> > broken, but are not.
> >
> > NFQA_SKB_CSUMNOTREADY means 'checksums will be fixed in kernel
> > later, pretend they are ok'.
> >
> > NFQA_SKB_GSO could be used for statistics, or to determine when
> > packet size exceeds mtu.
[..]
> > +static int nfqnl_put_packet_info(struct sk_buff *nlskb, struct sk_buff *packet)
> > +{
> > + __u32 flags = 0;
> > +
> > + if (skb_is_gso(packet))
> > + flags = NFQA_SKB_GSO;
>
> > + if (packet->ip_summed == CHECKSUM_PARTIAL)
> > + flags |= NFQA_SKB_CSUMNOTREADY;
> > +
> > + return nla_put_be32(nlskb, NFQA_SKB_INFO, htonl(flags));
>
> Maybe you could avoid sending NFQA_SKB_INFO if flags == 0 ?
Sure, will change it in the next round.
next prev parent reply other threads:[~2013-04-16 17:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 15:32 [PATCH -next 0/5] netfilter: nf_queue: avoid expensive gso/checksumming Florian Westphal
2013-04-16 15:32 ` [PATCH 1/5] netfilter: nf_queue: move device refcount bump to extra function Florian Westphal
2013-04-16 15:32 ` [PATCH 2/5] netfilter: nfnetlink_queue: avoid peer_portid test Florian Westphal
2013-04-16 15:32 ` [PATCH 3/5] netfilter: move skb_gso_segment into nfnetlink_queue module Florian Westphal
2013-04-16 15:32 ` [PATCH 4/5] netfilter: nfnetlink_queue: add skb info attribute Florian Westphal
2013-04-16 15:55 ` Eric Dumazet
2013-04-16 17:47 ` Florian Westphal [this message]
2013-04-16 15:32 ` [PATCH 5/5] netfilter: nfqueue: avoid expensive gso segmentation and checksum fixup Florian Westphal
-- strict thread matches above, loose matches on Subject: below --
2013-04-19 14:58 [PATCH -next v2 0/5] netfilter: nf_queue: avoid expensive gso/checksums Florian Westphal
2013-04-19 14:58 ` [PATCH 4/5] netfilter: nfnetlink_queue: add skb info attribute Florian Westphal
2013-04-27 17:46 ` Pablo Neira Ayuso
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=20130416174751.GB1408@breakpoint.cc \
--to=fw@strlen.de \
--cc=eric.dumazet@gmail.com \
--cc=netfilter-devel@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).