From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Stefan Schmidt <stefan@datenfreihafen.org>
Cc: Alexander Aring <alex.aring@gmail.com>,
linux-wpan@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
netdev@vger.kernel.org, David Girault <david.girault@qorvo.com>,
Romuald Despres <romuald.despres@qorvo.com>,
Frederic Blain <frederic.blain@qorvo.com>,
Nicolas Schodet <nico@ni.fr.eu.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH wpan/next v4 8/8] mac802154: Ensure proper scan-level filtering
Date: Sat, 15 Oct 2022 10:58:38 +0200 [thread overview]
Message-ID: <20221012153507.045c3843@xps-13> (raw)
In-Reply-To: <e0e2a450-e70a-fffb-9c9d-6108347e2eaa@datenfreihafen.org>
Hi Stefan,
stefan@datenfreihafen.org wrote on Wed, 12 Oct 2022 12:50:34 +0200:
> Hello Miquel.
>
> On 07.10.22 10:53, Miquel Raynal wrote:
> > We now have a fine grained filtering information so let's ensure proper
> > filtering in scan mode, which means that only beacons are processed.
> >
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > net/mac802154/rx.c | 16 ++++++++++++----
> > 1 file changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
> > index 14bc646b9ab7..4d799b477a7f 100644
> > --- a/net/mac802154/rx.c
> > +++ b/net/mac802154/rx.c
> > @@ -34,6 +34,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
> > struct sk_buff *skb, const struct ieee802154_hdr *hdr)
> > {
> > struct wpan_dev *wpan_dev = &sdata->wpan_dev;
> > + struct wpan_phy *wpan_phy = sdata->local->hw.phy;
> > __le16 span, sshort;
> > int rc;
> > > @@ -42,6 +43,17 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
> > span = wpan_dev->pan_id;
> > sshort = wpan_dev->short_addr;
> > > + /* Level 3 filtering: Only beacons are accepted during scans */
> > + if (sdata->required_filtering == IEEE802154_FILTERING_3_SCAN &&
> > + sdata->required_filtering > wpan_phy->filtering) {
> > + if (mac_cb(skb)->type != IEEE802154_FC_TYPE_BEACON) {
> > + dev_dbg(&sdata->dev->dev,
> > + "drop !beacon frame (0x%x) during scan\n",
>
> This ! before the beacon looks like a typo. Please fix.
Actually it's not, I meant "this is a non-beacon frame", but I might
have been too lazy to write it in plain english. But you're right, it
looks like a typo, so I'll rephrase this string.
>
> > + mac_cb(skb)->type);
> > + goto fail;
> > + }
> > + }
> > +
> > switch (mac_cb(skb)->dest.mode) {
> > case IEEE802154_ADDR_NONE:
> > if (hdr->source.mode != IEEE802154_ADDR_NONE)
> > @@ -277,10 +289,6 @@ void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb)
> > > ieee802154_monitors_rx(local, skb);
> > > - /* TODO: Handle upcomming receive path where the PHY is at the
> > - * IEEE802154_FILTERING_NONE level during a scan.
> > - */
> > -
> > /* Level 1 filtering: Check the FCS by software when relevant */
> > if (local->hw.phy->filtering == IEEE802154_FILTERING_NONE) {
> > crc = crc_ccitt(0, skb->data, skb->len);
>
> When trying to apply the patch it did not work:
>
> Failed to apply patch:
> error: patch failed: net/mac802154/rx.c:42
> error: net/mac802154/rx.c: patch does not apply
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> Applying: mac802154: Ensure proper scan-level filtering
> Patch failed at 0001 mac802154: Ensure proper scan-level filtering
>
> On top of what tree or branch is this? Maybe you based it on some not applied patches? Please rebase against wpan-next and re-submit. The rest of the patches got applied.
This series was based on top of wpan/next, but I assumed it would have
been applied on top of this fix that was picked up a month ago:
https://lkml.kernel.org/stable/57b7d918-1da1-f490-4882-5ed25ea17503@datenfreihafen.org/
I will update the above dev_dbg string, but I suggest we wait for
6.1-rc1 to be out before applying it? Otherwise if I "fix" it for
immediate appliance on the current wpan-next branch, it will likely
conflict with linux-next.
>
> Thanks for the ongoing work on this.
You're welcome, thank you both for the reviews and time spent on your
side as well!
Thanks,
Miquèl
next prev parent reply other threads:[~2022-10-15 8:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 8:53 [PATCH wpan/next v4 0/8] net: ieee802154: Improve filtering support Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 1/8] mac802154: Introduce filtering levels Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 2/8] mac802154: move receive parameters above start Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 3/8] mac802154: set filter at drv_start() Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 4/8] ieee802154: hwsim: Record the address filter values Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 5/8] ieee802154: hwsim: Implement address filtering Miquel Raynal
2022-10-11 1:04 ` Alexander Aring
2022-10-11 1:13 ` Alexander Aring
2022-10-11 1:21 ` Alexander Aring
2022-10-15 8:59 ` Miquel Raynal
2022-10-16 0:59 ` Alexander Aring
2022-10-12 10:48 ` Stefan Schmidt
2022-10-15 8:59 ` Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 6/8] mac802154: Drop IEEE802154_HW_RX_DROP_BAD_CKSUM Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 7/8] mac802154: Avoid delivering frames received in a non satisfying filtering mode Miquel Raynal
2022-10-07 8:53 ` [PATCH wpan/next v4 8/8] mac802154: Ensure proper scan-level filtering Miquel Raynal
2022-10-12 10:50 ` Stefan Schmidt
2022-10-15 8:58 ` Miquel Raynal [this message]
2022-10-11 1:01 ` [PATCH wpan/next v4 0/8] net: ieee802154: Improve filtering support Alexander Aring
2022-10-12 10:59 ` Stefan Schmidt
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=20221012153507.045c3843@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=david.girault@qorvo.com \
--cc=edumazet@google.com \
--cc=frederic.blain@qorvo.com \
--cc=kuba@kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nico@ni.fr.eu.org \
--cc=pabeni@redhat.com \
--cc=romuald.despres@qorvo.com \
--cc=stefan@datenfreihafen.org \
--cc=thomas.petazzoni@bootlin.com \
/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;
as well as URLs for NNTP newsgroup(s).