From nobody Wed Oct 04 15:23:43 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 4S0z401tFBz4w6LX; Wed, 4 Oct 2023 15:23:44 +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 4S0z401M25z4N1H; Wed, 4 Oct 2023 15:23:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696433024; 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=9DfLnf+PLEa86eARgEDePZua4X/MnV1hiaQeNuE5A0o=; b=cRUMDhBvS2WPfh/56+uHKBnnOwvi9V+/DwRIPGBbq6XZ7pm2wZale88rAUyntCzYnPqms0 DxwYs3Abaz8Q+DN2QzG44Fq4g6m1GAb5W8I9F0dNh4sPp8y32qvHlISHie9CR94qFMizyF +BEyANSUY9+SKOE9ySKxYjXLWPOqq/b4n/2Y6bAaKqRtm2kA/j+NChVZbsj7V2vPeCxP+3 RSwDQNIRMzOjp8BodLOhRuKeeQAbrHgwEfYjD35PASrWZcdAkfKOi8uDZkDHbLuhOdjNVO 1OYFksClQ8WI+5bo6wpZyuVrIb79WIXcLX3FVYy8oJc8HJKm9n5fMwWFaHuw9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696433024; a=rsa-sha256; cv=none; b=CRtYNkdAxDIFYcJdaVknmMlbyfgbTUH7HUQk2P4dseBsowAU1beLuqG1t6feU5TOjHmnkf jlxUkqcJ4baFwxhLYClbIkGwcLpF/ChFESjXJejnRQyZnHQtothR7JL5Z23nC1i5AkMo49 7dT3YhNNn+Yq0J4JiUOKn2amO21K3ZjI0jnmjyrP31+xSUxxhuYw7AoS5+OH7LF9tcit14 sScDYTViDHfqa+44kQdP2Mlf+jHPq7m/x5corBzs9/NFvjm6hItvxWQZArxZeqpr9Vyh8p ABUXYMMrtzryCRN9haWZ06D/XKxEReb8e3UnObv5d9X3nvbnlLcTGJaPATc/jQ== 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=1696433024; 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=9DfLnf+PLEa86eARgEDePZua4X/MnV1hiaQeNuE5A0o=; b=L23gM2HHW/O2kjKGXYpEkdDQCAEDHp+N+2G6/siTA8JRqMAZNzj1j9VG49H41Y6o6T5Fc6 wvWjyMoXrsezI/ATIxM1jJHZ08nHlCmlncggyLr7Mu+S3jPpdXvPaMEz8EA1g03ws3txVS Z0UtZm2CsXWEbptlRW2HIQ03xEdfQP/A6yis9/w/3mnVRF2GHXXywZFxx0IOUZy3HptW8C B9ememwXQPN3ZXp/O6Q7s2aHkpV5MqbTTqoyjEjU/XUuC2Lm0HNRvoTKcUfPre45wqtThP p93kgCB2LPwxhuuzzn7x6WtpiNC/FKNvnUwAY5FamAwOdkSfcdJLFEOEdnr+5w== 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 4S0z400RYBzjmC; Wed, 4 Oct 2023 15:23:44 +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 394FNhqm086903; Wed, 4 Oct 2023 15:23:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 394FNh54086900; Wed, 4 Oct 2023 15:23:43 GMT (envelope-from git) Date: Wed, 4 Oct 2023 15:23:43 GMT Message-Id: <202310041523.394FNh54086900@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: 46e5d2b0c6e0 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 46e5d2b0c6e01fd0789a6ef543c8b9f52852301b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=46e5d2b0c6e01fd0789a6ef543c8b9f52852301b commit 46e5d2b0c6e01fd0789a6ef543c8b9f52852301b Author: Bjoern A. Zeeb AuthorDate: 2023-09-08 12:47:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-04 15:19:18 +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) {