From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Xie He <xie.he.0141@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Network Development <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Krzysztof Halasa <khc@pm.waw.pl>
Subject: Re: [PATCH net-next v4 3/5] net: hdlc_fr: Improve the initial checks when we receive an skb
Date: Fri, 30 Oct 2020 17:20:04 -0400 [thread overview]
Message-ID: <CAF=yD-+fQMZxSWT-_XLvdO9bQA_8xTMry49WA-ZsrcOQcz6H2A@mail.gmail.com> (raw)
In-Reply-To: <CAJht_EOCba57aFarDYWU=Mhzn+k1ABn8HwgYt=Oq+kXijQPGvA@mail.gmail.com>
On Fri, Oct 30, 2020 at 3:21 PM Xie He <xie.he.0141@gmail.com> wrote:
>
> On Fri, Oct 30, 2020 at 9:31 AM Willem de Bruijn
> <willemdebruijn.kernel@gmail.com> wrote:
> >
> > > Add an fh->ea2 check to the initial checks in fr_rx. fh->ea2 == 1 means
> > > the second address byte is the final address byte. We only support the
> > > case where the address length is 2 bytes.
> >
> > Can you elaborate a bit for readers not intimately familiar with the codebase?
> >
> > Is there something in the following code that has this implicit
> > assumption on 2-byte address lengths?
>
> Yes, the address length must be 2 bytes, otherwise the 3rd and 4th
> bytes would not be the control and protocol fields as we assumed in
> the code.
>
> The frame format is specified in RFC 2427
> (https://tools.ietf.org/html/rfc2427). We can see the overall frame
> format on Page 3. If the address length is longer than 2 bytes, all
> the following fields will be shifted behind.
Thanks for that context. If it's not captured in the code, it would be
great to include in the commit message.
From a quick scan, RFC 2427 does not appear to actually define the
Q.922 address. For that I ended up reading ITU-T doc "Q.922 : ISDN
data link layer specification for frame mode bearer services", section
3.2.
next prev parent reply other threads:[~2020-10-30 21:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 2:28 [PATCH net-next v4 0/5] net: hdlc_fr: Improve fr_rx and add support for any Ethertype Xie He
2020-10-30 2:28 ` [PATCH net-next v4 1/5] net: hdlc_fr: Simpify fr_rx by using "goto rx_drop" to drop frames Xie He
2020-10-30 16:34 ` Willem de Bruijn
2020-10-30 20:01 ` Xie He
2020-10-30 21:11 ` Willem de Bruijn
2020-10-30 21:27 ` Xie He
2020-10-30 2:28 ` [PATCH net-next v4 2/5] net: hdlc_fr: Change the use of "dev" in fr_rx to make the code cleaner Xie He
2020-10-30 2:28 ` [PATCH net-next v4 3/5] net: hdlc_fr: Improve the initial checks when we receive an skb Xie He
2020-10-30 16:30 ` Willem de Bruijn
2020-10-30 19:21 ` Xie He
2020-10-30 21:20 ` Willem de Bruijn [this message]
2020-10-30 21:36 ` Xie He
2020-10-30 2:28 ` [PATCH net-next v4 4/5] net: hdlc_fr: Do skb_reset_mac_header for skbs received on normal PVC devices Xie He
2020-10-30 16:29 ` Willem de Bruijn
2020-10-30 20:08 ` Xie He
2020-10-30 21:28 ` Willem de Bruijn
2020-10-30 21:49 ` Xie He
2020-10-30 22:22 ` Willem de Bruijn
2020-10-30 22:52 ` Xie He
2020-10-30 2:28 ` [PATCH net-next v4 5/5] net: hdlc_fr: Add support for any Ethertype Xie He
2020-10-30 16:32 ` Willem de Bruijn
2020-10-30 19:29 ` Xie He
2020-10-30 21:25 ` Willem de Bruijn
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='CAF=yD-+fQMZxSWT-_XLvdO9bQA_8xTMry49WA-ZsrcOQcz6H2A@mail.gmail.com' \
--to=willemdebruijn.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=khc@pm.waw.pl \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xie.he.0141@gmail.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).