From nobody Wed Jun 12 19:16:42 2024 X-Original-To: dev-commits-src-all@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 4VzwJV6pfbz5NHbX; Wed, 12 Jun 2024 19:16:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJV60Tpz56fB; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219802; 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=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=vYTq2JN/qDVpQfN2CbBU2Emk/v8F1vDKEIrWL/3+L9RcvBSfMAoL7JkNMFSuavFQuz+qCW ouE9rdBdOE7e/CiFRueNhHLyz5dXNdWr8f763PnbV4KrgguGQMBR2hsJvyrR7I4JJMH2Xi P+Mvpbu9Gm1dG4j1M2pBadiZR/MhVjAf2H4t+syiKKZmshvCURbqh4yG/jVDj7q3bzHo0p 6/EYOUr0d6JPtHyVLwyBkgxMRwt3QCnfTi0d0bATWtK5dUy3WsHLITQ9aITrB2UknzJPAf 15REUOd5V+j5YqV6hGJNJKTaDlYHyj8ix05nqCj+GOk4vHMGBYEngym5MOHyTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219802; a=rsa-sha256; cv=none; b=lHjkcsOyiIHkUhM9cUvjo/aC6YIyfaV8WU1zXXcWMpScF7Uf3pw29SJhNiKRxgHzUWEQ28 Kij+CMX3WcMqxT7NyazKYL3L5vmwdq+5FihV5E9BPE+CYAi/cs1/KQlgtGuRodgoZ9RXu7 /CFK3XIsuYPUjCQH6rW26vE4EdqQ7gVmMBkyHhI4wPgHpglDSWqugznPbnEYcRbys1wQfX 1XXKodMRK/fZkVcwRmL/NMxgaI8saBYVoKURUsD9fWBgp6UKM9uTto3hA5FPP+v8i35vu0 j4r3l7H4oey2I/PKTGTfSm68ZeLbA7G8Ms3eQW1Y33s0y8GG5QGOB4KM7TF1YA== 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=1718219802; 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=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=Ndwb08PaqHrZ1KnK3/oYVZn0ePGZK50xKv9OAyVBNHOS9mSZst19j9kXtigb8iyy3oRLPz r+9btfyqhfW1zWSWnzkHpknahb+T2l+fNEE3CF1mZxurTnMvXoSB3X+Df2vy5f7TuOYmlL 5JbZG9F4MetbIuyLmCf5VzzXWjZ5+1N3USg3fhuI8/tLzaJ9VpNtw7rLScuE/XzB0Prv/S d/JJeNu1WSNX79OXtMv+HvGNRzCFUgbiVLTfFpg3QUysBt29FupfGrQNDWq4FOQh2TZczs 3lCyeNc9q9BM+/y2PHBdLSos3YPuwhrNmgcUyWD3wdhxOxnHaQm1PTzaFjjGmg== 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 4VzwJV5WyLz15BF; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGg2h003803; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGgaZ003800; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:42 GMT Message-Id: <202406121916.45CJGgaZ003800@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: 425edb6fc2d5 - stable/13 - LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/13 X-Git-Reftype: branch X-Git-Commit: 425edb6fc2d5e1fcc38e8e194639980d1115b511 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=425edb6fc2d5e1fcc38e8e194639980d1115b511 commit 425edb6fc2d5e1fcc38e8e194639980d1115b511 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:17:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:25 +0000 LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() Implement skb_queue_splice_tail_init() and SKB_DATA_ALIGN() as needed by the mt76 wireless driver. Sponsord by: The FreeBD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44590 (cherry picked from commit 3d3ec17825a124f0119d76c4d2523d73012fa226) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 02190a29e241..ee3f427aa6e9 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -89,6 +89,7 @@ struct skb_shared_hwtstamps { }; #define NET_SKB_PAD max(CACHE_LINE_SIZE, 32) +#define SKB_DATA_ALIGN(_x) roundup2(_x, CACHE_LINE_SIZE) struct sk_buff_head { /* XXX TODO */ @@ -824,7 +825,7 @@ skb_mark_not_on_list(struct sk_buff *skb) } static inline void -___skb_queue_splice_init(const struct sk_buff_head *from, +___skb_queue_splice(const struct sk_buff_head *from, struct sk_buff *p, struct sk_buff *n) { struct sk_buff *b, *e; @@ -847,7 +848,21 @@ skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) if (skb_queue_empty(from)) return; - ___skb_queue_splice_init(from, (struct sk_buff *)to, to->next); + ___skb_queue_splice(from, (struct sk_buff *)to, to->next); + to->qlen += from->qlen; + __skb_queue_head_init(from); +} + +static inline void +skb_queue_splice_tail_init(struct sk_buff_head *from, struct sk_buff_head *to) +{ + + SKB_TRACE2(from, to); + + if (skb_queue_empty(from)) + return; + + ___skb_queue_splice(from, to->prev, (struct sk_buff *)to); to->qlen += from->qlen; __skb_queue_head_init(from); }