From: David Miller <davem@davemloft.net>
To: xie.he.0141@gmail.com
Cc: khc@pm.waw.pl, kuba@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ms@dev.tdt.de
Subject: Re: [PATCH net] drivers/net/wan/hdlc: Change the default of hard_header_len to 0
Date: Wed, 02 Sep 2020 15:43:01 -0700 (PDT) [thread overview]
Message-ID: <20200902.154301.2111662696967293761.davem@davemloft.net> (raw)
In-Reply-To: <20200902120706.3411-1-xie.he.0141@gmail.com>
From: Xie He <xie.he.0141@gmail.com>
Date: Wed, 2 Sep 2020 05:07:06 -0700
> Change the default value of hard_header_len in hdlc.c from 16 to 0.
>
> Currently there are 6 HDLC protocol drivers, among them:
>
> hdlc_raw_eth, hdlc_cisco, hdlc_ppp, hdlc_x25 set hard_header_len when
> attaching the protocol, overriding the default. So this patch does not
> affect them.
>
> hdlc_raw and hdlc_fr don't set hard_header_len when attaching the
> protocol. So this patch will change the hard_header_len of the HDLC
> device for them from 16 to 0.
>
> This is the correct change because both hdlc_raw and hdlc_fr don't have
> header_ops, and the code in net/packet/af_packet.c expects the value of
> hard_header_len to be consistent with header_ops.
>
> In net/packet/af_packet.c, in the packet_snd function,
> for AF_PACKET/DGRAM sockets it would reserve a headroom of
> hard_header_len and call dev_hard_header to fill in that headroom,
> and for AF_PACKET/RAW sockets, it does not reserve the headroom and
> does not call dev_hard_header, but checks if the user has provided a
> header of length hard_header_len (in function dev_validate_header).
>
> Cc: Krzysztof Halasa <khc@pm.waw.pl>
> Cc: Martin Schiller <ms@dev.tdt.de>
> Signed-off-by: Xie He <xie.he.0141@gmail.com>
Applied, thanks.
prev parent reply other threads:[~2020-09-02 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 12:07 Xie He
2020-09-02 22:43 ` David Miller [this message]
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=20200902.154301.2111662696967293761.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=khc@pm.waw.pl \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ms@dev.tdt.de \
--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
all inboxes | Powered by JetHome®