From nobody Tue Apr 29 11:41:47 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Zmz1S2k6Mz5tvL4; Tue, 29 Apr 2025 11:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zmz1R2sRDz3wdr; Tue, 29 Apr 2025 11:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745926907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxZly2o0NMnS+B+K0utw3nRZxX3gPKEh4WJZnaDB9yU=; b=tcmekE+G/cXjqqalkPY7r6shoVPY+2mc43Ydfk98x4V6afC1pfRRHAW4Eyz5MvjsM33yUY qcOzs3oXoe7XVhsYVqqX7trbNL1P50ieyYMFVqPMT2EBd6kED2WRFkmFe6KfLy1Myeb7bN CNfzyOspNFj8IGEg7KJdD6P94hdoez3v8vsTNrQlZd1piuAl9i7y8tFefTMFS9naxwy0Hh ulzp0ilEpIG1+ZVuwiFrRU1xuddk+y7YlekdKidCuQZ8D6nwrZAAg6s1bfGb9t8L9iLXFf kZ/6ErCr+WDweDhUU6QluJXLThhYdMpoxmBRhSpXxTsL2FcsKb+OAxN/O/04PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745926907; a=rsa-sha256; cv=none; b=sVZLA9dHXzcSz7gJSyIpkXZpLBuxCDCZ8v6B+qakX4w8Ta0Xoqjzg1v+oAoPhbWScRorwZ AsKgQTlB4CjBL9uwUyllyQYAzxkrDkI8OnPtGeZxD5PZTSYbtVapFSCarkXYPPB8jPdeUN YbbXG5fwXI+9sdar6UjqUtpGlforkfC8Vbfp54SynHcNY/ov6ehbV5B+ZlkplAF6L8pnuQ QMGLGxhlk7c2qz8J189ZpscxlDi7x/E0Vp3ythil94bmd2y9lUCgP8QFI8m1ZpSHDHnSeW LLZdHruxwINfcBWfIoXhPIsSsx8tV7oW6vWL4Dpp1f7y1ZVrTAmcMUiP7eN4kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745926907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxZly2o0NMnS+B+K0utw3nRZxX3gPKEh4WJZnaDB9yU=; b=lx+98KwoLKrtypO+j86r7PoHlLsOLqrCtDZ0RRtZ3hwBvTstDAi83ubb2eIHn1acL9YQ5N 04uD/xMcrzmzN77wSBMuT4avZebZ+Jr23Z9NPGLauV9xXWoWSpr9VNkEmFib9J7P6ei98L wwYoCmK9VarrRE8rF65wJ5ACjdFpHJB3RHCwxzNySGRkrcIW9rY/s/Mf4LkPz1u2mDPUL0 p1ijxmezX/WLomyTU3wgcq/6kyyv5Pa6g+WyuS14XGRyjAOHVrWpNd1u2C4/+SGugMYTG2 vBT/5C0x48VbRME5BQIIc/2CDi8vPogTawh4yem+IMtKyFNp3x3CKmgfrP+WEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Zmz1R2TSXz44q; Tue, 29 Apr 2025 11:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53TBfluE046080; Tue, 29 Apr 2025 11:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53TBfl1I046077; Tue, 29 Apr 2025 11:41:47 GMT (envelope-from git) Date: Tue, 29 Apr 2025 11:41:47 GMT Message-Id: <202504291141.53TBfl1I046077@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ce537904d415 - stable/14 - LinuxKPI: skbuff: fix types, shuffle fields List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ce537904d415526246dcefcd11d35ff500ff3c14 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ce537904d415526246dcefcd11d35ff500ff3c14 commit ce537904d415526246dcefcd11d35ff500ff3c14 Author: Bjoern A. Zeeb AuthorDate: 2025-04-14 21:05:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-04-29 10:49:29 +0000 LinuxKPI: skbuff: fix types, shuffle fields Fix the types of a few remaining fields. Shuffle the fields around so the important ones align to 64byte on a 64bit platform. Sponsored by: The FreeBSD Foundation (cherry picked from commit 59481c7db2340c9e64f9d3d9d05dafc2d72c157e) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 45 ++++++++++++++--------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 7a8521e6fd38..8fe6bf158bc6 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -154,37 +154,46 @@ struct sk_buff { }; struct list_head list; }; + + uint8_t *head; /* Head of buffer. */ + uint8_t *data; /* Head of data. */ + uint8_t *tail; /* End of data. */ + uint8_t *end; /* End of buffer. */ + uint32_t len; /* ? */ uint32_t data_len; /* ? If we have frags? */ + union { + __wsum csum; + struct { + uint16_t csum_offset; + uint16_t csum_start; + }; + }; + uint16_t protocol; + uint8_t ip_summed; + /* uint8_t */ + + /* "Scratch" area for layers to store metadata. */ + /* ??? I see sizeof() operations so probably an array. */ + uint8_t cb[64] __aligned(CACHE_LINE_SIZE); + + struct skb_shared_info *shinfo __aligned(CACHE_LINE_SIZE); + uint32_t truesize; /* The total size of all buffers, incl. frags. */ - uint16_t mac_len; /* Link-layer header length. */ - __sum16 csum; - uint16_t l3hdroff; /* network header offset from *head */ - uint16_t l4hdroff; /* transport header offset from *head */ uint32_t priority; uint16_t qmap; /* queue mapping */ uint16_t _flags; /* Internal flags. */ #define _SKB_FLAGS_SKBEXTFRAG 0x0001 - enum sk_buff_pkt_type pkt_type; + uint16_t l3hdroff; /* network header offset from *head */ + uint16_t l4hdroff; /* transport header offset from *head */ uint16_t mac_header; /* offset of mac_header */ + uint16_t mac_len; /* Link-layer header length. */ + enum sk_buff_pkt_type pkt_type; refcount_t refcnt; - /* "Scratch" area for layers to store metadata. */ - /* ??? I see sizeof() operations so probably an array. */ - uint8_t cb[64] __aligned(CACHE_LINE_SIZE); - struct net_device *dev; void *sk; /* XXX net/sock.h? */ - int csum_offset, csum_start, ip_summed, protocol; - - uint8_t *head; /* Head of buffer. */ - uint8_t *data; /* Head of data. */ - uint8_t *tail; /* End of data. */ - uint8_t *end; /* End of buffer. */ - - struct skb_shared_info *shinfo; - /* FreeBSD specific bandaid (see linuxkpi_kfree_skb). */ void *m; void(*m_free_func)(void *);