netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: therbert@google.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/8] net: Clarification of CHECKSUM_UNNECESSARY
Date: Wed, 27 Aug 2014 14:40:01 -0700 (PDT)	[thread overview]
Message-ID: <20140827.144001.80733091766338046.davem@davemloft.net> (raw)
In-Reply-To: <CA+mtBx9GvHpLJ718hV5BjRGjfWvmXB55hKa3Rwo=6me3f0M3Dw@mail.gmail.com>

From: Tom Herbert <therbert@google.com>
Date: Mon, 25 Aug 2014 18:47:35 -0700

> On Mon, Aug 25, 2014 at 6:40 PM, Tom Herbert <therbert@google.com> wrote:
>> On Mon, Aug 25, 2014 at 6:13 PM, David Miller <davem@davemloft.net> wrote:
>>> From: Tom Herbert <therbert@google.com>
>>> Date: Mon, 25 Aug 2014 17:55:56 -0700 (PDT)
>>>
>>>> @@ -569,16 +590,13 @@ struct sk_buff {
>>>>       __u8                    wifi_acked:1;
>>>>       __u8                    no_fcs:1;
>>>>       __u8                    head_frag:1;
>>>> -     /* Encapsulation protocol and NIC drivers should use
>>>> -      * this flag to indicate to each other if the skb contains
>>>> -      * encapsulated packet or not and maybe use the inner packet
>>>> -      * headers if needed
>>>> -      */
>>>> +     /* Indicates the the inner headers are valid in the skbuff. */
>>>>       __u8                    encapsulation:1;
>>>>       __u8                    encap_hdr_csum:1;
>>>>       __u8                    csum_valid:1;
>>>>       __u8                    csum_complete_sw:1;
>>>> -     /* 2/4 bit hole (depending on ndisc_nodetype presence) */
>>>> +     __u8                    csum_level:2;
>>>> +     /* 0/2 bit hole (depending on ndisc_nodetype presence) */
>>>>       kmemcheck_bitfield_end(flags2);
>>>
>>> Crap, with xmit_more, this actually bleeds us over into a new __u8.
>>
>> We'll undoubtably want to add more flags beyond that (they're quite
>> useful). I'll try to find some more space in the existing fields so we
>> don't increase skbuf size.
> 
> Actually, from inner_protocol through mac_header there are seven 16
> bit fields, could put another 16 bit flags there.

Ok, please resubmit this series with that change.

Meanwhile I fixed up the comment so that it's accurate again, like so:

====================
Subject: [PATCH] net: Update sk_buff flag bit availability comment.

We lost one when xmit_more was added.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/linux/skbuff.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 9b3802a..b69b7b5 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -580,7 +580,7 @@ struct sk_buff {
 	__u8			encap_hdr_csum:1;
 	__u8			csum_valid:1;
 	__u8			csum_complete_sw:1;
-	/* 2/4 bit hole (depending on ndisc_nodetype presence) */
+	/* 1/3 bit hole (depending on ndisc_nodetype presence) */
 	kmemcheck_bitfield_end(flags2);
 
 #if defined CONFIG_NET_DMA || defined CONFIG_NET_RX_BUSY_POLL
-- 
1.7.11.7

      reply	other threads:[~2014-08-27 21:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26  0:55 [PATCH net-next 1/8] net: Clarification of CHECKSUM_UNNECESSARY Tom Herbert
2014-08-26  1:13 ` David Miller
2014-08-26  1:40   ` Tom Herbert
2014-08-26  1:47     ` Tom Herbert
2014-08-27 21:40       ` 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=20140827.144001.80733091766338046.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.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 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).