From: Johannes Berg <johannes@sipsolutions.net>
To: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] wifi: mac80211: split mesh fast tx cache into local/proxied/forwarded
Date: Fri, 12 Apr 2024 14:55:25 +0200 [thread overview]
Message-ID: <893ca115e668c6778344bcbd30168fe37bd5c80d.camel@sipsolutions.net> (raw)
In-Reply-To: <20240412120634.88972-1-nbd@nbd.name>
On Fri, 2024-04-12 at 14:06 +0200, Felix Fietkau wrote:
>
> +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_if_data *sdata,
> const u8 *addr)
> {
> struct mesh_tx_cache *cache = &sdata->u.mesh.tx_cache;
> + struct ieee80211_mesh_fast_tx_key key = {};
> struct ieee80211_mesh_fast_tx *entry;
> + int i;
>
> + ether_addr_copy(key.addr, addr);
> spin_lock_bh(&cache->walk_lock);
> - entry = rhashtable_lookup_fast(&cache->rht, addr, fast_tx_rht_params);
> - if (entry)
> - mesh_fast_tx_entry_free(cache, entry);
> + for (i = MESH_FAST_TX_TYPE_LOCAL; i < MESH_FAST_TX_TYPE_FORWARDED; i++) {
Seems that should be "i <= ...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
next prev parent reply other threads:[~2024-04-12 12:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 12:06 [PATCH] wifi: mac80211: split mesh fast tx cache into local/proxied/forwarded Felix Fietkau
2024-04-12 12:55 ` Johannes Berg [this message]
2024-04-13 13:30 ` Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=893ca115e668c6778344bcbd30168fe37bd5c80d.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox