From: Xie He <xie.he.0141@gmail.com>
To: Willem de Bruijn <willemdebruijn.kernel@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>,
Linux X25 <linux-x25@vger.kernel.org>,
Martin Schiller <ms@dev.tdt.de>
Subject: Re: [PATCH net] drivers/net/wan/lapbether: Added needed_tailroom
Date: Sat, 15 Aug 2020 19:28:14 -0700 [thread overview]
Message-ID: <CAJht_EOsQ-QLFBeJCytTRSRuor6jnCEE+zMBV+ngtwr25OSCSQ@mail.gmail.com> (raw)
In-Reply-To: <CAJht_EPGD1RmnU6-ZJYocXCY-qcPxXeEuurQ6GJod=WGO69-jg@mail.gmail.com>
I took some time to look at the history of needed_tailroom. I found it
was added in this commit:
f5184d267c1a (net: Allow netdevices to specify needed head/tailroom)
The author tried to make use of needed_tailroom at various places in
the kernel by replacing the macro LL_RESERVED_SPACE with his new macro
LL_ALLOCATED_SPACE.
However, the macro LL_ALLOCATED_SPACE was later found to have
problems. So it was removed 3 years later and was replaced by explicit
handling of needed_tailroom. See:
https://lkml.org/lkml/2011/11/18/198
So maybe only those places considered by these two authors have taken
needed_tailroom into account.
Other places might not have taken needed_tailroom into account because
of the rarity of the usage of needed_tailroom.
The second author also said in the commit message of his Patch 5/6
(which changes af_packet.c), that:
While auditing LL_ALLOCATED_SPACE I noticed that packet_sendmsg_spkt
did not include needed_tailroom when allocating an skb. This isn't
a fatal error as we should always tolerate inadequate tail room but
it isn't optimal.
This shows not taking needed_tailroom into account is not a bug but
it'd be better to take it into account.
next prev parent reply other threads:[~2020-08-16 2:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-08 17:52 [PATCH net] drivers/net/wan/lapbether: Added needed_tailroom Xie He
2020-08-09 8:48 ` Willem de Bruijn
2020-08-09 17:11 ` Xie He
2020-08-10 7:31 ` Willem de Bruijn
2020-08-10 18:13 ` Xie He
2020-08-16 2:28 ` Xie He [this message]
2020-08-19 0:17 ` Xie He
2020-08-19 22:11 ` Xie He
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=CAJht_EOsQ-QLFBeJCytTRSRuor6jnCEE+zMBV+ngtwr25OSCSQ@mail.gmail.com \
--to=xie.he.0141@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-x25@vger.kernel.org \
--cc=ms@dev.tdt.de \
--cc=netdev@vger.kernel.org \
--cc=willemdebruijn.kernel@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).