From patchwork Tue Dec 17 10:02:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1211244 X-Patchwork-Delegate: matthieu.baerts@tessares.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.b="fXXj7xOy"; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47cYc24bYyz9sRM for ; Tue, 17 Dec 2019 21:02:56 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6CA2B10113631; Tue, 17 Dec 2019 02:06:15 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 249CD1011362A for ; Tue, 17 Dec 2019 02:06:13 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id z3so3060264wru.3 for ; Tue, 17 Dec 2019 02:02:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6q7WxCGpghM1ZNtv7EVLncdLuKLcNDoYDXuHHAmZnCc=; b=fXXj7xOy3r6GSlT0rr+u8XmQxTH5+vrBd7Nlp5KJ0qiYLftirbtPk+x7x995gHAfA3 dpP5/jvVoyyvbbARSKPEUNsjJw7/zt6ARHoRxHtE/27HePNotD6Cntm6MeAd8wjHCiN5 E3R/6D3UPcyLvRHcxFmq0G1f7vugkd0CnTkeK379AnblXqvrA0STju6npspv+CTaze75 J9zUfuQIWUP6utaY8qL6LkMCqnmF2ff8puPfzbKs6kFbZnOvQk6Ydc4easMozgI+1Ink 2HC5mUihcOqSxsIekzAyQpJ3BMLHbvcXHeuc7La+m428JqztbiagUetvXfA0VN67YKQn Tp9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6q7WxCGpghM1ZNtv7EVLncdLuKLcNDoYDXuHHAmZnCc=; b=e0JJ+LAI+P8zrdFAlZfL676B2CiFTiQ5+Q0Vr7yVB5mESiXS+VdwbyPs0gx7XY6Guf 1LPGAAJvik8Sl4anlIKRro9o6+kQ0WrtWPZOIzGS8Xzenk8J1El6CxEt83J2jFv+atVn tdYjQUFYzmygXa3VLdL3RT7h2pMDCvpoXBs4hmvoXyU81KjEcluBV5nMdpl7bYic3iRF UhOD9saytffwHPlPgs6XxzTGSc4nZYLoLz7aRpD6QWVSSRJx0kSx4zbVgadXpvh5s1si orI/4ghm5rLhFjb2OsTKNGAzhwGCXo0waCJYdTzDMo70eX1zk7UG7bZDzUHbh3kvIiiA JXOw== X-Gm-Message-State: APjAAAVtNTqOz8iQLDj9pp4k31gURLC16ZYVxiSVFoH4n0SaZE9bGc1g hXTbfb3YOpZRV9J5gyob0g87bIUITYZDSQ== X-Google-Smtp-Source: APXvYqxmSFSLCYUKm1YL5+J9IgG7/hxMidpwImgD1f/tFYAANIOzikI43VYB+3bhYXVbljkGjhDBxw== X-Received: by 2002:adf:ea51:: with SMTP id j17mr35957053wrn.83.1576576969760; Tue, 17 Dec 2019 02:02:49 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id c68sm2426294wme.13.2019.12.17.02.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 02:02:49 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Date: Tue, 17 Dec 2019 11:02:29 +0100 Message-Id: <20191217100229.3541844-1-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Message-ID-Hash: N6GJM5DDP3IFJLUJ6SSKU2DQ7Z3LBTWC X-Message-ID-Hash: N6GJM5DDP3IFJLUJ6SSKU2DQ7Z3LBTWC X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Eric Dumazet X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH] Squash-to: "sock: Make sk_protocol a 16-bit value" List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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 Suggested-by: Paolo Abeni Signed-off-by: Matthieu Baerts --- 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;