Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1060425rwl; Wed, 29 Mar 2023 12:03:49 -0700 (PDT) X-Google-Smtp-Source: AKy350ZxCctjM59raBNwHldIQd4RQVt6QON+MDstSy2U6LJHC5hz9zxthhLfVjhCawt5mRfb/iAv X-Received: by 2002:a17:90b:1d01:b0:23f:abfc:5acb with SMTP id on1-20020a17090b1d0100b0023fabfc5acbmr21659253pjb.18.1680116629105; Wed, 29 Mar 2023 12:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680116629; cv=none; d=google.com; s=arc-20160816; b=odLKTsIvj9KCy7WhKWc9m0S1wozOfxwEFcNbAb01bHM35OLL//O8vJfzUSHoPAW338 OGe6R5QRQIXg3mShpa0oOV/jxw7tuur28s7Tn0h8cU3xW32q0Luu8ZgIitJbl3K6mgTm Cz2Z3ch4Y1SeI9pyxL+VXRU9+VkkxRiBqShGgfgaLuVxz38x/en93XMb7YpztWhYJ7f9 Ori7RjHwX77/daG8geEFlItvYTEVUijrAjzlvSWYwpHAqsElSslvlb3sCnFEAOOdcdE0 LigMRdzMkR0dbKG/3WLQ0tne4Th9t5iMfECSzJSs4JbdNMG9Mv/02Q+thvreNNoRgMM/ kYXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=pM8ulVGVCx+HFUHyjXmlEYig7gRCScbLpQSmmvC68OE=; b=otwZ7ndD/usMG6cxHC1eLClWK1pv5N7PBEALlA2EeTbjIa38KE/A1n6BEENfrGeI/g x2GZo0YL33yenx6jhNTWIiHjM99vtVWAkkXxXkhbbqcX5vfE/ibJDaFJMIKFX/lzgc2L PiRbT9AGkxKT0OF2KpgpHmV41Zl1x8VzTVz6lQOMv4Om0L8pKk82N7gILMy1xhoqBVsc V7C4lT+fWJdb0wGj1kqMmDrRmxcBWsGkHCscf/ewXwzaXE4q72Hr9LMmJJCUBBTA2sJJ Y4xSewv54vkH8p4dAnL46KVOXO8yR/hqfgdycJDLaFwb25q8MkKlkmitzMytN5XZJafy h4fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=PNw3S6f8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a170902988800b001a1a0db7f61si30895279plp.336.2023.03.29.12.03.37; Wed, 29 Mar 2023 12:03:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=PNw3S6f8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbjC2S5c (ORCPT + 59 others); Wed, 29 Mar 2023 14:57:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbjC2S5b (ORCPT ); Wed, 29 Mar 2023 14:57:31 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA31D5251; Wed, 29 Mar 2023 11:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=pM8ulVGVCx+HFUHyjXmlEYig7gRCScbLpQSmmvC68OE=; t=1680116250; x=1681325850; b=PNw3S6f8ByRabHV3al6YN41hitZvJt2utF+nsLvW55Dcga3 6zpzke5bUD+5tOG97d3WLaszWhFv0BrZcuDESsmdDRdE/dqhznSnszH2WvEkdUA0eduG3ReKUMoyb hS25FVf8G0+YGU+nRMJ1oVu7bkpjGl3uhM4X74h1TgA6OzdKeWACzMXwLjYIRJuE8RyjVjuEAWCU1 FYQm4XFASgYfqzeJASV7/+9YuO2u5glqzpoF7T+VMpC3lUBFvWt8WoGNhdE+rpegTHvJKFtM4resk /SWuYI4PqU/GtQuEnt0FfqTkCEoRjEMVQSD7W9uy0cRYVLjprctE6zcl7pOENk3g==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1phaz9-000CVe-1i; Wed, 29 Mar 2023 20:57:27 +0200 Message-ID: <37311ab0f31d719a65858de31cec7a840cf8fe40.camel@sipsolutions.net> Subject: Re: traceability of wifi packet drops From: Johannes Berg To: Jakub Kicinski Cc: Eric Dumazet , netdev@vger.kernel.org, linux-wireless@vger.kernel.org Date: Wed, 29 Mar 2023 20:57:26 +0200 In-Reply-To: <20230329110205.1202eb60@kernel.org> References: <00659771ed54353f92027702c5bbb84702da62ce.camel@sipsolutions.net> <20230327180950.79e064da@kernel.org> <20230328155826.38e9e077@kernel.org> <8304ec7e430815edf3b79141c90272e36683e085.camel@sipsolutions.net> <20230329110205.1202eb60@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 2023-03-29 at 11:02 -0700, Jakub Kicinski wrote: >=20 > No, no what I was trying to say is that instead of using the upper bits > to identify the space (with 0 being the current enum skb_drop_reason) > we could use entries in enum skb_drop_reason. In hope that it'd make > the fine grained subsystem reason seem more like additional information > than a completely parallel system. Ah! Looking at your code example ... right, so you'd see "mac80211 drop unusable" or "mac80211 drop to monitor", and fine-grained in the higher bits. > But it's just a thought, all of the approaches seem acceptable. I _think_ I like the one I prototyped this morning better, I'm not sure I like the subsystem =3D=3D existing reason part _that_ much. It ultimately doesn't matter much, it just feels odd that you'd be allowed to have a, I don't know picking a random example, SKB_DROP_REASON_DUP_FRAG with a fine-grained higher bits value? Not that we'll ever be starved for space ... > Quick code change perhaps illustrates it best: >=20 Yeah, that ends up really looking very similar :-) Then again thinking about the implementation, we'd not be able to use a simple array for the sub-reasons, or at least that'd waste a bunch of space, since there are already quite a few 'main' reasons and we'd want/need to add the mac80211 ones (with sub-reason) at the end. So that makes a big array for the sub-reasons that's very sparsely populated (*) Extending with a high 'subsystem' like I did this morning is more compact here. (*) or put the sub-reasons pointer/num with the 'main' reasons into the drop_reasons[] array but that would take the same additional space So ... which one do _you_ like better? I think I somewhat prefer the one with adding a high bits subsystem, but I can relatively easily rejigger my changes from this morning to implement the semantics you had here too. Anyone else have an opinion? :) johannes