From nobody Mon Apr 22 19:44:00 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 4VNbKY0dcSz5Hm1D; Mon, 22 Apr 2024 19:44:01 +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 4VNbKX5VCvz4mPR; Mon, 22 Apr 2024 19:44:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713815040; 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=D4uxfh9wFhuLhZJYYPbp2XK35Lar8Hp9GRvA38ElBXY=; b=G2JttdPBUMqNPUUv0XM+19SivishLwNUY2Aw3cPvY2Muqu/5J6MUspLhTAvIWjg/rZbogz lJlVpNumXZ8dAGazHAjM6ZE5ovSFgfvAfNbhX3zB0JWFvTgk84Kd79hqVG2mG1FPvanJDJ RvwY+VFOxcJUyg6NIDLcvDlGdGDuBInJFgl8cMYuTP1vFiZ+Ltm5TE9MY2HhBFl7HXocGj skt5xRsTB0/Er7XTjqCYpk+bh4ywom/Q5kEc6J6gh69rsJaxIOt+vGzCECH6LUkLDiZCL9 KEcJ/nYSz4SrGDpoQO45EdHEWEd6nrAcZT88+csATn+eUHOc+ws6rjlXBSAESA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713815040; a=rsa-sha256; cv=none; b=SO455EXuPLQ+4I+c0emsJJMc/bJS0ZDzzjPZE4AC3AWzMbYbKyTOx6sG3YpVea2HDKsN43 HIboCpc+AeZ8rGzdZjRgrPZ6iadGiCJPPS+wRhXyLK57O/A18qrNZsZx1WhqtlW/PQVVCc nUwd3Gcvd34kLMbwxO9aw1SO3knftDSIDadWNze0WQn50j5LL1z4Adrso5G0gGYTE4y+Df zI4TmrnXU9zkGIr5RBhwo5s9V8cLpeAypGoiWDtW5GNPDL73n43A+oTXBkpTMwwQsv2b7x Sr9XC2b83GLZmEhzLDjJROKM6fbghgNhYw4/rxyb1C4BT1/AlT3PhNjHMukCjg== 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=1713815040; 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=D4uxfh9wFhuLhZJYYPbp2XK35Lar8Hp9GRvA38ElBXY=; b=HhuliBHRCvMl5+u9kM9i/0XaIBgbMxuAbAJT2F7ml0plGQCSijWENUdK+MXQLvCPWZGPPx 6mKsufXqe269mtMNndTLUoUP2IL2JBuQFlOS4KnUf3WeRykfGVQhkXTevNe+8K98+IunSq T7ZndjpxQ+N/3PaCIvS1IJMuC4kAfWM1g1fgzNdWBx+3vAOJ6Wg8PtvmdmiZDbKm+/0Vo0 6sH3zDyrnnea4DHkQpKRMEhHaNZeaGCqhZtUeOC7UJhUkw60R73U7uryxojhX5njVsmvxy Z7KdK3yVdU5gi0aOLzjWC33M6EODCzHjU+BFbLJljBYxQ5n/ldvuMs0FCfqa1w== 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 4VNbKX52sMz11tZ; Mon, 22 Apr 2024 19:44:00 +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 43MJi0qx032165; Mon, 22 Apr 2024 19:44:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43MJi0JV032162; Mon, 22 Apr 2024 19:44:00 GMT (envelope-from git) Date: Mon, 22 Apr 2024 19:44:00 GMT Message-Id: <202404221944.43MJi0JV032162@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: 6b2686ca9bc6 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 6b2686ca9bc600f6658e9bd02093484a9b5a4fe5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6b2686ca9bc600f6658e9bd02093484a9b5a4fe5 commit 6b2686ca9bc600f6658e9bd02093484a9b5a4fe5 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:17:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-04-22 16:59:54 +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); }