From nobody Wed Nov 29 16:38:11 2023 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 4SgQ433TMmz52wqL; Wed, 29 Nov 2023 16:38:11 +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 4SgQ432wQdz3HN2; Wed, 29 Nov 2023 16:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275891; 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=boH6FTQT4oKL60vKUzwFb9av+WYAwgwDVBVeL466Q8Q=; b=Ds6p7oE1bqDah7e87uujHBZ8sYapF1KvsUdpWk4WPH+wIA3Gl3saiUA3RegvyXMcAMNafS RPTHTMVIjfpXiH+Kjz15YO963L2rrSUh1RJppK3BFuD71u6MXzLViGZsQQSP+Uz1hpZ2Yu RS7rD6KLSG57TE6ymGp2Zy1w5BlAP6I0iXTb8NzgMR1x5bdV6G/RwH7tyx69FqSFw9JmUx mIYuUdbwv2GCI8ElQxeSEUaHqJegQU8NfFo3zrONB392i4laCJnWj4p3HUxltjITu8m4WL /Z0kY8eikqjwgGVnrn7qRGTE0im2tmrHGkSdbSQjg3sVNwU1QgW7AMlfos2BuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275891; 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=boH6FTQT4oKL60vKUzwFb9av+WYAwgwDVBVeL466Q8Q=; b=fg8F9yiE8WMp1CB9HdK3RkSLDoHq3T2Z9paioDgtnakN8+RsTxBhGjFF8+vbwW7rDa3D2R 6OulpWYTep7yTrVy78uSe8SLf2+AITNdpGvvcu552ee+3lStFN/388AhoW+opmMVVVX/0q oSN+qNzEGPvs20OwhP8WeZmPxhYUuAlHXWUspI3hjQAASt3KONh7yS9tjFxYDz5eXaA4XL opBOoHtZAJJXCLCzei98Tx5jWax4rcPq3oHkbVZmsoTLrLu8qnHP/cZZ1arvSZMzNxitxi WGQz3OUX3kZRddA397gsiUaW8+94snb+pLsnkicldFqPDTEY3zpJUizEeenl1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701275891; a=rsa-sha256; cv=none; b=qTRwTOYoksYacTYeEKsr95/kdIpe/QEd7yQ7ry+YOoHrhYjasQTibGjMELbNpqxiFrE8sx VSCU6FMz7HkJZW1McPyd0pxNSuIc1rQvxoFqLETT6MenxV8m0gbQ/YXa8YBHVbU79GG+jm +uhJDIepG+LNVjiTxpLjdldQVeajBAl/EvrC21osYo9SNsKi1vj4pF1sDI9TcMRQBG+oDn uKHJCBC5yLmvew1TYj9L3qwDdudNmG9sagrgghEYfxbHl8KezLkdrrjI7gppVO5xo4jZF9 ciOzcWJ7zcnRuxVjnzHOihdjkuuUqy/v4ATXrl6vAOQurwHSt7AwnaL7wnCc7g== 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 4SgQ4321jlz1C2F; Wed, 29 Nov 2023 16:38:11 +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 3ATGcBWl045151; Wed, 29 Nov 2023 16:38:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ATGcBsb045148; Wed, 29 Nov 2023 16:38:11 GMT (envelope-from git) Date: Wed, 29 Nov 2023 16:38:11 GMT Message-Id: <202311291638.3ATGcBsb045148@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: b5e94d0bad60 - stable/13 - LinuxKPI: skbuff: remove assumption about mac_header 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b5e94d0bad60705239ddd865bfc7cf93c400e0a4 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e94d0bad60705239ddd865bfc7cf93c400e0a4 commit b5e94d0bad60705239ddd865bfc7cf93c400e0a4 Author: Bjoern A. Zeeb AuthorDate: 2023-09-08 12:47:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-29 16:36:06 +0000 LinuxKPI: skbuff: remove assumption about mac_header It seems the mac_header can be set to offset 0 for frames received. Remove the warning splattering messages to the console for each packet. Sponsored by: The FreeBSD Foundation (cherry picked from commit f0e59b6903c881859d7f4eaf269b2336b774c7bc) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index c917b3f09ac9..f8ce212e7853 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -935,10 +935,9 @@ static inline uint8_t * skb_mac_header(const struct sk_buff *skb) { SKB_TRACE(skb); - /* Make sure the mac_header was set as otherwise we return garbage. */ - WARN_ON(skb->mac_header == 0); return (skb->head + skb->mac_header); } + static inline void skb_reset_mac_header(struct sk_buff *skb) {