Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1343427lqt; Wed, 20 Mar 2024 00:15:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUIcFW1pytkTN8f+/iJvQsNuw7T5ASyR1tlby7DfUU5eIGJqQEAMi4pWUz9NLMbpStWYztgvYUY9cjJvtfXHHVoMDcxqt6xr4mTXPmfyA== X-Google-Smtp-Source: AGHT+IEy5yXbtYPVa7I+3Oi4srdUPIYfh1yro0VGJZjGMy1esJ7ipaxXZlVqQB8Hcs7RbidCz8op X-Received: by 2002:a05:620a:359:b0:788:7583:7647 with SMTP id t25-20020a05620a035900b0078875837647mr1017645qkm.69.1710918901864; Wed, 20 Mar 2024 00:15:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710918901; cv=pass; d=google.com; s=arc-20160816; b=CVaeFx+4DxInKSFxt2iAUFOEgIdSdv4drxs3eb7TvDThLbCaT//smt/zkVmF9fAevH ibIW0pZJoL/vpXrMRPmjdPpbWJ3S/3nELuzjUxGdpkRPGqVwh0FpiMw5F57CinWzSzn2 uQMEAKS4wpcTQuGJ4+3pmpxack0vK4PYt63l0fZrjfZf3Rnl/aW4X8ZKjzMD3Y4yGTEU UFfX9zbFK0/1ewV6BLivmwi1LyeWEhmjke2FKuHKgs0fBuUGZXnwKNrtsFIH0CfYE5hw oSVZxnBj7dzbycPcKXp5Xz9PLVvMc5b9Z9jobal+ElzXdEK0MHe2phVhNAZ8/f6LOoE3 gKbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=kdSO0T9wJiNQDWYgqkyoEYTGlM+NyshC9Eh5YXy/SMo=; fh=TquNsOiV+zNY1csTpltVB6A9QFW5SbuNs6JlqcKCQkw=; b=khFZA6NufI0HkG7Hg0grGv4UxVjaW12fuO7s8h+wuXLW98CAyLcWWka1bY8o9haXmJ Y2Qq+l6PwDWMa/EZRYfLko76C/zTvfb5avI0clQBqwSxYPpI6ZNRte3A/8TTpBSmbeYB qVCWUkYq9c7wLDi0s0J75Bqi2yinveioAJBUsrbPv/nGldymHBY8zAZA1jOj7DpVIOfr ucHO2wqr7w8iLG0TiDW2juPwEULumgbQPWcx5hjDPLg4YmLdNoe9CAx+B5d3SxjhJFk5 2ig12NComfh0ld4D8rAbO8MFp6dmJzyqN9EUHHTbjPpQFPjOmosgjo2ruiL3rOYWrwR7 NTaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QlqKCtjk; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f25-20020a05620a15b900b0078a100072d2si3321326qkk.3.2024.03.20.00.15.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 00:15:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QlqKCtjk; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 89FF61C22730 for ; Wed, 20 Mar 2024 07:15:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2470C20DCD; Wed, 20 Mar 2024 07:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QlqKCtjk" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6695C1EB44 for ; Wed, 20 Mar 2024 07:14:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918872; cv=none; b=mM4jcVx8RKOKR8qvUIlq2/ZY6nauxZUbi1hT9JALI86j0HLzkSRwJ+OUg092kkJOShu+9YiBM7DTrF4UDOab/U8yey5NOvZkOiVDXVbcScIC0m/ZhaVxsInOI/4oFiUVsSN88rm3wmoU1uIkNsomepaKCfrMQXoxrIKTcaFkaW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918872; c=relaxed/simple; bh=ZtKFd3Bi4Cle40OK/sRPs46B+k4y2b9A0Jtju5McVHI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mgxJSs6LRpk+6sDdaiBkQKQgUdCPSJmPYP5x8IpawE7vGPULsIY50K91ViDnhSh2lPxWj5MItv0YqN9UIY8q3EfbpAJfOySnIOJLuS2mc7Ht9jzCParsliiXCURnUJpcCPsCxwAQjXJkiDanYs26tzAa7qGGYd19ySBp1+olR70= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QlqKCtjk; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710918870; x=1742454870; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZtKFd3Bi4Cle40OK/sRPs46B+k4y2b9A0Jtju5McVHI=; b=QlqKCtjkUvLwv/2xil1FDO80K8aBBD9cmzHOshCk3cO3afBXIpnS/Njz NiFZQ91NT/Quow+9+8e03BT18r/LYuNmkqJQUAbEP1tfQlXQmJPyHqxmd CFtm0F8Bb8/39l+aNcepAIw8f3d3TegHtIQHZdl5kP59puY6GSFEKudDA 4g5ETRSvftRrgIa2I0NbbVjr01vxxrnaRA3bsldfF7P8ysS2w7835e9Ec CJTbBAFEs0EGUcomewxkM6ZEa7a0fYhDvTwOIUOCKz5hhQPROKG4Uh4JZ ODAMKB6e39gOcdUs4Ntadgi+JdbdN6bkNfsYCb9pTb7rzkjeCbZRmqgVY A==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763847" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763847" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477421" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:29 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 7/8] wifi: mac80211: improve drop for action frame return Date: Wed, 20 Mar 2024 09:14:04 +0200 Message-Id: <20240320091155.34daf0a89eb4.I60e0639511f9de64e40e6105b640adf90f8f57f7@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> References: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Johannes Berg If we use a drop we not only save the extra call to dev_kfree_skb(), but also have a better reason in tracing, so do that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/drop.h | 3 ++- net/mac80211/rx.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net/mac80211/drop.h b/net/mac80211/drop.h index 12a6f0e9eca6..59e3ec4dc960 100644 --- a/net/mac80211/drop.h +++ b/net/mac80211/drop.h @@ -2,7 +2,7 @@ /* * mac80211 drop reason list * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation */ #ifndef MAC80211_DROP_H @@ -66,6 +66,7 @@ typedef unsigned int __bitwise ieee80211_rx_result; R(RX_DROP_U_UNEXPECTED_STA_4ADDR) \ R(RX_DROP_U_UNEXPECTED_VLAN_MCAST) \ R(RX_DROP_U_NOT_PORT_CONTROL) \ + R(RX_DROP_U_UNKNOWN_ACTION_REJECTED) \ /* this line for the trailing \ - add before this */ /* having two enums allows for checking ieee80211_rx_result use with sparse */ diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index c1f850138405..4b4cbd8bf35d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3958,8 +3958,8 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx) __ieee80211_tx_skb_tid_band(rx->sdata, nskb, 7, -1, status->band); } - dev_kfree_skb(rx->skb); - return RX_QUEUED; + + return RX_DROP_U_UNKNOWN_ACTION_REJECTED; } static ieee80211_rx_result debug_noinline -- 2.34.1