From nobody Mon Apr 15 16:07:16 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 4VJBrh38s1z5Gsby; Mon, 15 Apr 2024 16:07:16 +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 4VJBrh2HMmz4sVk; Mon, 15 Apr 2024 16:07:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713197236; 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=A1uc+uUfV+nxvWesT+l52Ne2aPah5+EBFQ5BChhGIzw=; b=dlJrGX69YlMFtfDnHYt12wC7rR0to2VX0JyClnpg1SU8imqvy6VY2teXwP453gQHyaaSjZ AkHBua1Z9fq5FWx/jXJdpXiXuh7eFBLWqrw6erP5gxY8icvMjYxeD+TbsFr5fhuwayG0Ev t5CvkG7VmLsUbrAbbXMH8baMpWUr4T9Z+NTeuc2VLak94PTCPJSOaDGpOcsC4AWKJ+WArA B6bURmLVNWrkRbBabAxxPKNWDF40hXfM+SBvWxyNsscKlkKBegAjxzAaxY7RhYenJJHBbm 09nhL7KRTiccdSWi6SOxjij0XthVXYr5aEOiRQpE3aZcZfiiPt2tzoMHBf0r8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713197236; a=rsa-sha256; cv=none; b=oiapR7NXB+NnuY8MADWsGYOc8dQyMzjIA0ilBzco+VEdt/7BHTUnMmcUxcP+0Xx1dbtpQQ T6xbl6YjYz/5tz5BJcUOiRGn6rTu28BdX/FzoxdpAKDvq4N8vuA8wOC2Kk1v/AQBpY48Cq nrBzIu8Tdws5TshZ8JLQSt2KhKmSIvvLpzulHRgZkHL5FxUMi7qfXwz0LmCLeyk0lXsWoI Ci5lpUHeoEbBlLkd5GvmM1FrrtkVRWHke4MPHPNfwXCadCSknN3AXmEC032GaICuH+0ryP VbRauY5VSrRw3ANV6voduIENYBZ3+GKcvCi7MYkupDpUxoFCj6kiAKwCnZ94/Q== 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=1713197236; 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=A1uc+uUfV+nxvWesT+l52Ne2aPah5+EBFQ5BChhGIzw=; b=gqCfHRVDc26MokSEZiOXa0/XmWAOK1LqUvUF/0HOTDo/GzoHvXuJTepoWu7VkZStVNdutu EQ58vnN6XdCn1/ElXcgpIMrBT9K9g0JmVmj2T2tKTycZyJIsteINUCWwp81YiGZVUX0GqU 2sXeA7NAJLa+O4+LV9rPNlC/b/xftZHWbESJ8GdXJ1rUo8DPYDv2KZpCSVcuGswZiBJAqQ ULO9M7Om/Vd16+YbPSHGYcBq3YE8/BACr2eXR2lXnI4sWzIeNUBVWFYzCxvereqijU4vsU bgmsM/h0ALyjdOB/mxMKYspKNaY/eiseWjsR4eDxQSGbqqE+dtwGrM7oYkyQZQ== 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 4VJBrh1rRRz15Vb; Mon, 15 Apr 2024 16:07:16 +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 43FG7GM9072463; Mon, 15 Apr 2024 16:07:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43FG7Gbn072460; Mon, 15 Apr 2024 16:07:16 GMT (envelope-from git) Date: Mon, 15 Apr 2024 16:07:16 GMT Message-Id: <202404151607.43FG7Gbn072460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3d3ec17825a1 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 3d3ec17825a124f0119d76c4d2523d73012fa226 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3d3ec17825a124f0119d76c4d2523d73012fa226 commit 3d3ec17825a124f0119d76c4d2523d73012fa226 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:17:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-04-15 16:06:11 +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 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44590 --- 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); }