linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Xie He <xie.he.0141@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	John Ogness <john.ogness@linutronix.de>,
	Wang Hai <wanghai38@huawei.com>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH net-next] net/packet: Fix a comment about mac_header
Date: Thu, 17 Sep 2020 10:50:30 +0200	[thread overview]
Message-ID: <CA+FuTSf4di9Zsw+7XD1+3rwRMT4f0pUPprWKtmg83mVkHum9Zw@mail.gmail.com> (raw)
In-Reply-To: <20200916122308.11678-1-xie.he.0141@gmail.com>

On Wed, Sep 16, 2020 at 8:54 PM Xie He <xie.he.0141@gmail.com> wrote:
>
> 1. Change all "dev->hard_header" to "dev->header_ops"
>
> 2. On receiving incoming frames when header_ops == NULL:
>
> The comment only says what is wrong, but doesn't say what is right.
> This patch changes the comment to make it clear what is right.
>
> 3. On transmitting and receiving outgoing frames when header_ops == NULL:
>
> The comment explains that the LL header will be later added by the driver.
>
> However, I think it's better to simply say that the LL header is invisible
> to us. This phrasing is better from a software engineering perspective,
> because this makes it clear that what happens in the driver should be
> hidden from us and we should not care about what happens internally in the
> driver.
>
> 4. On resuming the LL header (for RAW frames) when header_ops == NULL:
>
> The comment says we are "unlikely" to restore the LL header.
>
> However, we should say that we are "unable" to restore it.
> It's not possible (rather than not likely) to restore it, because:
>
> 1) There is no way for us to restore because the LL header internally
> processed by the driver should be invisible to us.
>
> 2) In function packet_rcv and tpacket_rcv, the code only tries to restore
> the LL header when header_ops != NULL.
>
> Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Signed-off-by: Xie He <xie.he.0141@gmail.com>

Acked-by: Willem de Bruijn <willemb@google.com>

  reply	other threads:[~2020-09-17  8:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 12:23 [PATCH net-next] net/packet: Fix a comment about mac_header Xie He
2020-09-17  8:50 ` Willem de Bruijn [this message]
2020-09-17 10:17   ` Xie He
2020-09-17 23:25 ` David Miller

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=CA+FuTSf4di9Zsw+7XD1+3rwRMT4f0pUPprWKtmg83mVkHum9Zw@mail.gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=john.ogness@linutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wanghai38@huawei.com \
    --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).