Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp637258lqs; Tue, 5 Mar 2024 11:41:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWnhAQpHwKudVv1FvE3lbsM4umYfv2FwH+Bq5mhsvQ/3BDyQ+lretSXcd4Q+oBVI5PKWl0tR8DSlmks0PmadG1ViIzsY06asKMS3z7fMw== X-Google-Smtp-Source: AGHT+IHwd2/pihZryWswua9CZ2blpGQk0xcFe/7twrj5uQE/1MmGcH+aMuwALftPDuIJ6HHg8mpF X-Received: by 2002:a17:906:3c10:b0:a43:c0f7:d2cd with SMTP id h16-20020a1709063c1000b00a43c0f7d2cdmr8723678ejg.3.1709667661498; Tue, 05 Mar 2024 11:41:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709667661; cv=pass; d=google.com; s=arc-20160816; b=KdrLbLw1fCjTevRkHGuTMTmDwGAaqx0mTQvpU1MuLMMt9mFajrPkrit46EJBshpx81 d/qUB37V0jUGEZa1I1NVwfn6+R9QcSUt+sGks7+1dfufYPVeBfW7zGJ2MaUtUCPThbVL R58jLZDuW3dS2YzAcY6rMa9ahEBQ14HmeZ77PiwCc3kCJlPsPO/ZBzWAnX2apA8UUTl5 wkQe8hBX5LDugobTD8NydeLkGUe6xmRhIY/3omIbRg3cA+Ik6YI2AM5pSSdErqpvFnNF bfyNfJN+YiKLjnTOrUzB2ON2iWB4mA95bFCCGbCjHrsepW9gJvHqgypaFP2PeU5hvVbW zQKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=/FrVbuG+NmXdRaEhMkfyj7JdlCIJB5MvqaHthubPGLI=; fh=UZZHgiH8SWvMh1VtvORaanwkzf5KFOM61Ivc6eb4yxQ=; b=gK9NHVq+WCT7OEERGjojC/PDTjyWwpH2ypAKX3qtfw5WpWfIp+t1OdtE1xkjb3PPzh FfLDYwlgUjw3gSzpJwxAaWCpXnQOpV1dBJPqw7EVniT1u8zmCY8z2OfFupCZPNJSc8kU OjW8zDp26GNmD55DHzm8JYp4JZs0xr0ERozlO/DaJzVJcDalQRu9pj5zP+zqy/8um5gV H8v4qfTppjZz+jkwAz4N2XtNFe/sK7UKOtBISm13Z8ghxgUXjWDHOzZ/sR+fVBrdlv/z CLQkHtS37Drdza6F4Dvi6u6SPmrgo4uZhQoFMaxup+ulqoqvnFfy8TGFH2peKK1YwL3n j6hA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=u+y5s3AA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=bI98yQUl; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-92901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92901-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d3-20020a170906304300b00a44ddb16d6asi3292543ejd.74.2024.03.05.11.41.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 11:41:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=u+y5s3AA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=bI98yQUl; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-92901-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92901-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F042B1F28EDF for ; Tue, 5 Mar 2024 19:41:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36B25128834; Tue, 5 Mar 2024 19:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="u+y5s3AA"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="bI98yQUl" Received: from wfout5-smtp.messagingengine.com (wfout5-smtp.messagingengine.com [64.147.123.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FDA186AC3; Tue, 5 Mar 2024 19:40:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709667609; cv=none; b=afjMZVwzckNYh2coLlzUPuCbz6cG1t9ei05cfSVAyEi+fQSlmPS/lyDHfUvE107h/MQcDRloGFJhYIkHbV9HoZfw/IZIssVKJ/qXSKRjBmr4MBR/97k69QDDTw3cvNBHucIzFBnq0+Q4OGeZC0/+l9dpLzSM78DhCTBqd4TMUBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709667609; c=relaxed/simple; bh=UdiRxD3hjdDoNoN6V/B0gO/ecb68kq+k4lK7Gr0p4hM=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=oUKLbPoMolpxhr/3dDSfG7Ut2G79Gfoke6b3G2dS4npOCt4MyGOWkQchMJGEwAHPa4E7FuBG33F8Kq+REBH//H1aYaXHfzvsggw+egPmAPDr1KvzefpFMi4bftpLv/AXV6HlXUYWPZDOSdPTxHNqbEpOZb6+QaY83HvEFdA/oKM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=u+y5s3AA; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=bI98yQUl; arc=none smtp.client-ip=64.147.123.148 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id ABA8C1C000BF; Tue, 5 Mar 2024 14:40:05 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Tue, 05 Mar 2024 14:40:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1709667605; x=1709754005; bh=/FrVbuG+NmXdRaEhMkfyj7JdlCIJB5MvqaHthubPGLI=; b= u+y5s3AAcSrVGb/JG8he5PBmKDOIvxjrwOHdIL87rOvKwMJPyQiaXkgjiLGJoDmJ vQ68/D+qg/6dOekc2yRJIgBeXof3hdc4KEHNBJBx1BmYQbwW2UDdDsV440l3FDm2 HLetPu0T1oPI74a/+7icglyS8KVKjcZ2lea/2WzWUBr+6ZQpdsP7E5OKdBmPd0Dv i38PKFc65hSDD0mi7GLWvYZ+CiPBuKwyFWG+gRwbGEZMZ5Os+h186BmeCRhMHgjH d3Ao67bTRY1HiP7Hx+JHdjvhO4l7aRjO95FaVqFvLZBdWyMuAfBwO6DETYuEmATL Jr5hKsqqQAKwZKz9STvKqQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709667605; x= 1709754005; bh=/FrVbuG+NmXdRaEhMkfyj7JdlCIJB5MvqaHthubPGLI=; b=b I98yQUlraA9OEhljwZxi0xGj/KiX5jmpLe8XfDfafzNLIXrW/onPeGW4mFpbLe9i 3I8GN/VaGrfcercwlZmFiHf5qumPxnzUPv4W16NYSpU+wodrpmoIw6g2bIVPKtmF 56oLPpmTIXUr+1O8h3H+d+WwR//OiFnBWVconbGjVSi6Sqo/CaLxhoKi5LoMF+M4 jbgnUBVi0gMCGz1el3xvqJdob/9W3QBVEZsUXXpwYbc7Cu/rL9Ark7CH17ytR0Jn BQwiewVJJQji0TFDpF61+b6TlTtWhnaIa6DyXgB+MFRzvktoyzbVdsD3fdJvGlWW w0A1xatwpmxDb9UFKAxdw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrheelgdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id DD7D2B6008F; Tue, 5 Mar 2024 14:40:04 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-208-g3f1d79aedb-fm-20240301.002-g3f1d79ae Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: References: <20240305020153.2787423-1-almasrymina@google.com> <20240305020153.2787423-13-almasrymina@google.com> Date: Tue, 05 Mar 2024 20:39:44 +0100 From: "Arnd Bergmann" To: "Mina Almasry" Cc: Netdev , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Linux-Arch , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, "David S . Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" , "Jonathan Corbet" , "Richard Henderson" , "Ivan Kokshaysky" , "Matt Turner" , "Thomas Bogendoerfer" , "James E . J . Bottomley" , "Helge Deller" , "Andreas Larsson" , "Jesper Dangaard Brouer" , "Ilias Apalodimas" , "Steven Rostedt" , "Masami Hiramatsu" , "Mathieu Desnoyers" , "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Martin KaFai Lau" , "Eduard Zingerman" , "Song Liu" , "Yonghong Song" , "John Fastabend" , "KP Singh" , "Stanislav Fomichev" , "Hao Luo" , "Jiri Olsa" , "David Ahern" , "Willem de Bruijn" , shuah , "Sumit Semwal" , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pavel Begunkov" , "David Wei" , "Jason Gunthorpe" , "Yunsheng Lin" , "Shailend Chand" , "Harshitha Ramamurthy" , "Shakeel Butt" , "Jeroen de Borst" , "Praveen Kaligineedi" , "Willem de Bruijn" , "Kaiyuan Zhang" Subject: Re: [RFC PATCH net-next v6 12/15] tcp: RX path for devmem TCP Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Mar 5, 2024, at 20:22, Mina Almasry wrote: > On Tue, Mar 5, 2024 at 12:42=E2=80=AFAM Arnd Bergmann = wrote: >> On Tue, Mar 5, 2024, at 03:01, Mina Almasry wrote: >> >> This structure requires a special compat handler to run >> x86-32 binaries on x86-64 because of the different alignment >> requirements. Any uapi-visible structures should be defined >> to avoid this and just have no holes in them. Maybe extend >> one of the __u32 members to __u64 or add another 32-bit padding field? >> > > Honestly the 32-bit fields as-is are somewhat comically large. I don't > think extending the __u32 -> __u64 is preferred because I don't see us > needing that much, so maybe I can add another 32-bit padding field. > Does this look good to you? Having a reserved field works but requires that you check it for being zero already, so you can detect an incompatible caller. > struct dmabuf_cmsg { > __u64 frag_offset; > __u32 frag_size; > __u32 frag_token; > __u32 dmabuf_id; > __u32 ext; /* reserved for future flags */ > }; Maybe call it 'flags'? > Another option is to actually compress frag_token & dmabuf_id to be > 32-bit combined size if that addresses your concern. I prefer that > less in case they end up being too small for future use cases. I don't know what either of those fields is. Is dmabuf_id not a file descriptor? If it is, it has to be 32 bits wide. Otherwise having two 16-bit fields and a 32-bit field would indeed add up to a multiple of the structure alignment on all architectures and solve the problem. Arnd