All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Justin Iurman <justin.iurman@uliege.be>,
	netdev@vger.kernel.org, davem@davemloft.net,
	alex aring <alex.aring@gmail.com>
Subject: Re: [PATCH net 1/1] uapi: fix big endian definition of ipv6_rpl_sr_hdr
Date: Mon, 25 Jan 2021 13:12:42 -0700	[thread overview]
Message-ID: <bf77978e-c204-bf98-6b1b-965d6ebd9bbc@gmail.com> (raw)
In-Reply-To: <20210125113231.3fac0e10@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On 1/25/21 12:32 PM, Jakub Kicinski wrote:
>>>>> diff --git a/include/uapi/linux/rpl.h b/include/uapi/linux/rpl.h
>>>>> index 1dccb55cf8c6..708adddf9f13 100644
>>>>> --- a/include/uapi/linux/rpl.h
>>>>> +++ b/include/uapi/linux/rpl.h
>>>>> @@ -28,10 +28,10 @@ struct ipv6_rpl_sr_hdr {
>>>>>  		pad:4,
>>>>>  		reserved1:16;
>>>>>  #elif defined(__BIG_ENDIAN_BITFIELD)
>>>>> -	__u32	reserved:20,
>>>>> +	__u32	cmpri:4,
>>>>> +		cmpre:4,
>>>>>  		pad:4,
>>>>> -		cmpri:4,
>>>>> -		cmpre:4;
>>>>> +		reserved:20;
>>>>>  #else
>>>>>  #error  "Please fix <asm/byteorder.h>"
>>>>>  #endif  
>>
>> cross-checking with other headers - tcp and vxlan-gpe - this patch looks
>> correct.
> 
> What are you cross-checking?
> 

https://tools.ietf.org/html/draft-ietf-nvo3-vxlan-gpe-10, Section 3.1
header definition and vxlanhdr_gpe in include/net/vxlan.h. The
__BIG_ENDIAN_BITFIELD part follows the definition in the spec.

Similarly for the TCP header - RFC header definition and tcphdr in
include/uapi/linux/tcp.h. TCP header shows doff + res1 order which is
comparable to cmpri + cpmre in this header as both sets are 4-bits and
start a word.

  reply	other threads:[~2021-01-25 20:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 22:00 [PATCH net 0/1] Fix big endian definition of ipv6_rpl_sr_hdr Justin Iurman
2021-01-21 22:00 ` [PATCH net 1/1] uapi: fix " Justin Iurman
2021-01-24  4:54   ` Jakub Kicinski
2021-01-24  9:57     ` Justin Iurman
2021-01-24 18:57       ` David Ahern
2021-01-25 19:32         ` Jakub Kicinski
2021-01-25 20:12           ` David Ahern [this message]
2021-01-25 20:25             ` Jakub Kicinski
2021-01-25 21:11           ` Justin Iurman
2021-01-25 21:47             ` Jakub Kicinski
2021-01-25 23:30 ` [PATCH net 0/1] Fix " patchwork-bot+netdevbpf

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=bf77978e-c204-bf98-6b1b-965d6ebd9bbc@gmail.com \
    --to=dsahern@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=justin.iurman@uliege.be \
    --cc=kuba@kernel.org \
    --cc=netdev@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 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.