Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp123052lql; Fri, 12 Apr 2024 05:55:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUgoA4QwzYyInesQ4wMhh7Lo7EpMSPLxlyDVbH7j5tRc0Io8cICBAqNRicdQBEoEzUEFgYLE4TLueJuk3HSQpgClJ9Fxl6ba3X71HwDSg== X-Google-Smtp-Source: AGHT+IHJ1kjLYthR8TJoTzBsuX+BhsCPHhoH0L2Lh5v8rjhnXyi/9eawTjVxNVedKnhmVFZepuwj X-Received: by 2002:a05:6a00:989:b0:6ed:7684:4833 with SMTP id u9-20020a056a00098900b006ed76844833mr8072517pfg.0.1712926547503; Fri, 12 Apr 2024 05:55:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712926547; cv=pass; d=google.com; s=arc-20160816; b=GkRk3oOkvx+ox/67jocId64BTY7RjtYFYk9974ERJYDUouU8w9Mp9LoT12phB9EUdJ F0oMR2T56x+hclxz+gt5RC3mcJDn3BXncX0tD+UcJLkYWoalfOTCSLfZTVaVlN/AW7nU J4UUPJ+OCheFOSNnfrE6qeBSn5wpQ8XguW7Xa+nmPgzpXZUjKP4iCN1P6ts1ngGFoFXc Yk5IYmncayjJUNR4j+W/DIIFNVitUgD+/nvTBGagmnWQcGAeIx0Xmr+vOdhAI9rGGncg ulhITtl3T0b+m7zUC1Jx2vNhSbb6voDtFSEcigG5u2DA3NNTV5yJ4pWGOLTj3BJlbA3k XwRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:to :from:subject:message-id:dkim-signature; bh=Q2Q5oexKChOJsHREgyUydwQTcT4MafNv0i0HOD9th0o=; fh=leM3Gm7i6QxQ3zlCjEj2OqgpbJE5R6GETfXFPbHoR5s=; b=exjExJsokhc11Y8QeBcldDc3r+RSA11URIb7SGTCSQc76NopnpS3pZKBx890oPajT5 2AOfPum3ZiKzSovpwpYeWkaZdUt5ARPoyROi3iSVOzlKIdlnAHjpVH/6wnnMT/nqU4LX vR+Q9nGTzVA2zckTmgb4rOgYU2+eagy9pWUTqgmp6WowIXstkEMhzSIq9XyhbjSroOpR KWLb0M7bfBvXMGPgzYQ0kGzOkIMYG0oV+1LjLKgXm+j6y1hOYih63S+C/3VniU9J+e9o CDWY34rEUdnE4HKpKwpavkrSEOkGWvfsNPJJsEoaP1Xg4N/2exPxPppxDfZWnhvc9eHI lHiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=KGY6kajR; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-6255-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6255-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u190-20020a6379c7000000b005dc9daed2d2si3077178pgc.429.2024.04.12.05.55.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 05:55:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6255-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=KGY6kajR; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-6255-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6255-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 675DEB21495 for ; Fri, 12 Apr 2024 12:55:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0746655C3B; Fri, 12 Apr 2024 12:55:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="KGY6kajR" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 D4D4E56443 for ; Fri, 12 Apr 2024 12:55:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712926537; cv=none; b=nuFrWJ+grF/ExejCHP/ByWoNeVO8jXLnxstbbdugfSZFFqP8jOALn1+8e1WUc+QE/s0kG/ggO2epcozTilPPpmUJuoug/5bcyz7RTmV8oYhFL9GhLaroKMpfFO0iZHykIwrdFhga/EU5lWuIFglEcmCdILm0PIjqWKi5X2W7hw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712926537; c=relaxed/simple; bh=sLLSuqzDeadadhrpOPlHNnwH6VbQcoKnVqb12ma8bcI=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References: Content-Type:MIME-Version; b=MT+1crJXluZQBPjvdrK+8f5q3/G9nAnhSAN7ynY2tTVOYuGp74zpwQukgXDqXaSAVuC8GnxfVkLGJxErw1LWLN7dOwCrViAb83EAg9q3GhEUEgGD9G+Jg/mvILhc80hcudeL4YN+cS6OlHifzH4BdVleye/HDkXHeTJUkPCQXRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=KGY6kajR; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net 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:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Q2Q5oexKChOJsHREgyUydwQTcT4MafNv0i0HOD9th0o=; t=1712926534; x=1714136134; b=KGY6kajRHlK1slErcX0bogQMY2M+Byi9pLtH12z7dcHr0kr /vOioZnOHPmdXDioTta4s7Wwoj+yrdb2EQxMUV74W3uXYOGoNHZMF3sbWUh60Mt0xRytE52Z0PBZD jKWb8ZxVp3Pksy/uSojB74UkaTOzAardBAbq9FNf2DHx5YxcOmyha9zbQt8vigUNTu3F2lcaZ9cnD kba65qFkwaOl6qb51N2nsp1ZD30wcBp8Qvt/ERtR7wOno95NViCceAgR9HRqyLpR+k1nDj0XLbuQC +KnOqo/YN03W30EPOayc44jtFuXMyNdWYcIBjtFMfZgsoa9V8YIiu3IPRT3voACw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rvGRC-0000000442M-2aSy; Fri, 12 Apr 2024 14:55:26 +0200 Message-ID: <893ca115e668c6778344bcbd30168fe37bd5c80d.camel@sipsolutions.net> Subject: Re: [PATCH] wifi: mac80211: split mesh fast tx cache into local/proxied/forwarded From: Johannes Berg To: Felix Fietkau , linux-wireless@vger.kernel.org Date: Fri, 12 Apr 2024 14:55:25 +0200 In-Reply-To: <20240412120634.88972-1-nbd@nbd.name> References: <20240412120634.88972-1-nbd@nbd.name> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Fri, 2024-04-12 at 14:06 +0200, Felix Fietkau wrote: >=20 > +struct ieee80211_mesh_fast_tx_key { > + u8 addr[ETH_ALEN] __aligned(2); > + enum ieee80211_mesh_fast_tx_type type; > +}; Does it make sense to hash a bunch of zeroes there if the compiler allocates more than a single byte for "type"? It's uglier, but maybe makes more sense to not do that? There's also padding in there in that case. > @@ -646,12 +653,18 @@ void mesh_fast_tx_flush_addr(struct ieee80211_sub_i= f_data *sdata, > const u8 *addr) > { > struct mesh_tx_cache *cache =3D &sdata->u.mesh.tx_cache; > + struct ieee80211_mesh_fast_tx_key key =3D {}; > struct ieee80211_mesh_fast_tx *entry; > + int i; > =20 > + ether_addr_copy(key.addr, addr); > spin_lock_bh(&cache->walk_lock); > - entry =3D rhashtable_lookup_fast(&cache->rht, addr, fast_tx_rht_params)= ; > - if (entry) > - mesh_fast_tx_entry_free(cache, entry); > + for (i =3D MESH_FAST_TX_TYPE_LOCAL; i < MESH_FAST_TX_TYPE_FORWARDED; i+= +) { Seems that should be "i <=3D ...FORWARDED". Maybe better then to add a NUM_MESH_FAST_TX_TYPES or so to the enum and then use "i < NUM_MESH_FAST_TX_TYPES", so new additions won't have to update this, if they ever happen. johannes