From: Matthieu Baerts <matthieu.baerts at tessares.net>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [PATCH] Squash-to: "sock: Make sk_protocol a 16-bit value"
Date: Tue, 17 Dec 2019 12:55:10 +0100 [thread overview]
Message-ID: <f7220b4a-8777-d5cb-4f93-61abb3c7b273@tessares.net> (raw)
In-Reply-To: d5cedcefb8b96be1dc1835e5b5a0b0afc33eca03.camel@redhat.com
[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]
Hi Paolo,
On 17/12/2019 12:08, Paolo Abeni wrote:
> On Tue, 2019-12-17 at 11:02 +0100, Matthieu Baerts wrote:
>> move sk_type to a separate field to:
>> - avoid extra operations to fetch sk->sk_type on some arches (Eric)
>> - allow compilers to emit better code to access/manipulate native types
>> compared to bitfields. (Paolo)
>>
>> Suggested-by: Eric Dumazet <edumazet(a)google.com>
>> Suggested-by: Paolo Abeni <pabeni(a)redhat.com>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
>> ---
>>
>> Notes:
>> to be squashed in "sock: Make sk_protocol a 16-bit value"
>>
>> include/net/sock.h | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/net/sock.h b/include/net/sock.h
>> index 0930f46c600c..b93cadba1a3b 100644
>> --- a/include/net/sock.h
>> +++ b/include/net/sock.h
>> @@ -451,13 +451,13 @@ struct sock {
>> #define SK_FL_TYPE_MASK 0xffff0000
>> #endif
>>
>> - unsigned int sk_padding : 1,
>> + u8 sk_padding : 1,
>> sk_kern_sock : 1,
>> sk_no_check_tx : 1,
>> sk_no_check_rx : 1,
>> - sk_userlocks : 4,
>> - sk_type : 16;
>> + sk_userlocks : 4;
>> u8 sk_pacing_shift;
>> + u16 sk_type;
>> u16 sk_protocol;
>> u16 sk_gso_max_segs;
>> unsigned long sk_lingertime;
>
> LGTM.
Thank you for the review and the suggestion not to simply move it to the
beginning of the 'unsigned int' but to move it to a separated field.
- 32121b5387c7: "squashed" in "sock: Make sk_protocol a 16-bit value"
- 1e3599433335: "Signed-off-by" + "Co-developed-by"
- 3a1b579608d1..bf07050cd31b: result
Tests are still OK!
> @list, please do not reply directly to the orig messages, or trim the
> recipients list, as eric email address unintentionally slipped into it.
Sorry for that :(
Cheers,
Matt
--
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
next reply other threads:[~2019-12-17 11:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 11:55 Matthieu Baerts [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-01-07 17:24 [MPTCP] Re: [PATCH] Squash-to: "sock: Make sk_protocol a 16-bit value" Mat Martineau
2020-01-07 15:21 Paolo Abeni
2020-01-07 15:08 Matthieu Baerts
2019-12-17 11:08 Paolo Abeni
2019-12-16 18:41 Mat Martineau
2019-12-16 18:29 Matthieu Baerts
2019-12-16 17:47 Paolo Abeni
2019-12-16 16:51 Mat Martineau
2019-12-16 13:13 Matthieu Baerts
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=f7220b4a-8777-d5cb-4f93-61abb3c7b273@tessares.net \
--to=unknown@example.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 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.