netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Hopps <chopps@chopps.org>
To: Florian Westphal <fw@strlen.de>
Cc: Christian Hopps <chopps@chopps.org>,
	Sabrina Dubroca <sd@queasysnail.net>,
	devel@linux-ipsec.org,
	Steffen Klassert <steffen.klassert@secunet.com>,
	netdev@vger.kernel.org, Christian Hopps <chopps@labn.net>
Subject: Re: [PATCH ipsec-next v8 10/16] xfrm: iptfs: add fragmenting of larger than MTU user packets
Date: Tue, 06 Aug 2024 06:05:46 -0400	[thread overview]
Message-ID: <m2ed72otio.fsf@ja-home.int.chopps.org> (raw)
In-Reply-To: <20240806100304.GA32447@breakpoint.cc>


Florian Westphal <fw@strlen.de> writes:

> Christian Hopps <chopps@chopps.org> wrote:
>> > > > > +	if (!l3resv) {
>> > > > > +		resv = XFRM_IPTFS_MIN_L2HEADROOM;
>> > > > > +	} else {
>> > > > > +		resv = skb_headroom(tpl);
>> > > > > +		if (resv < XFRM_IPTFS_MIN_L3HEADROOM)
>> > > > > +			resv = XFRM_IPTFS_MIN_L3HEADROOM;
>> > > > > +	}
>> > > > > +
>> > > > > +	skb = alloc_skb(len + resv, GFP_ATOMIC);
>> > > > > +	if (!skb) {
>> > > > > +		XFRM_INC_STATS(dev_net(tpl->dev), LINUX_MIB_XFRMNOSKBERROR);
>> > > >
>> > > > Hmpf, so we've gone from incrementing the wrong counter to
>> > > > incrementing a new counter that doesn't have a precise meaning.
>> > >
>> > > The new "No SKB" counter is supposed to mean "couldn't get an SKB",
>> > > given plenty of other errors are logged under "OutErr" or "InErr"
>> > > i'm not sure what level of precision you're looking for here. :)
>> >
>> > OutErr and InErr would be better than that new counter IMO.
>>
>> Why?
>>
>> My counter tracks the SKB depletion failure that is actually happening. Would
>> you have me now pass in the direction argument just so I can tick the correct
>> overly general MIB counter that provides less value to the user in identifying
>> the actual problem? How is that good design?
>>
>> I'm inclined to just delete the thing altogether rather than block on this thing that will almost never happen.
>
> Makes sense to me, skb allocation failure is transient anyway, there is
> no action that could be taken if this error counter is incrementing.
>
> You might want to pass GFP_ATOMIC | __GFP_NOWARN to alloc_skb() to avoid
> any splats given this is a high-volume allocation.

Will do.

Thanks,
Chris.


  reply	other threads:[~2024-08-06 10:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 20:33 [PATCH ipsec-next v8 00/16] Add IP-TFS mode to xfrm Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 01/16] xfrm: config: add CONFIG_XFRM_IPTFS Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 02/16] include: uapi: add ip_tfs_*_hdr packet formats Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 03/16] include: uapi: add IPPROTO_AGGFRAG for AGGFRAG in ESP Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 04/16] xfrm: netlink: add config (netlink) options Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 05/16] xfrm: add mode_cbs module functionality Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 06/16] xfrm: add generic iptfs defines and functionality Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 07/16] xfrm: iptfs: add new iptfs xfrm mode impl Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 08/16] xfrm: iptfs: add user packet (tunnel ingress) handling Christian Hopps
2024-08-05 17:10   ` Simon Horman
2024-08-06 10:19     ` [devel-ipsec] " Christian Hopps
2024-08-06 15:24       ` Simon Horman
2024-08-04 20:33 ` [PATCH ipsec-next v8 09/16] xfrm: iptfs: share page fragments of inner packets Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 10/16] xfrm: iptfs: add fragmenting of larger than MTU user packets Christian Hopps
2024-08-04 22:25   ` Sabrina Dubroca
2024-08-05  2:33     ` Christian Hopps
2024-08-05  4:19       ` Christian Hopps
2024-08-06  8:47       ` Sabrina Dubroca
2024-08-06  8:54         ` Christian Hopps
2024-08-06 10:03           ` Florian Westphal
2024-08-06 10:05             ` Christian Hopps [this message]
2024-08-06 11:05           ` Sabrina Dubroca
2024-08-06 11:07             ` Christian Hopps
2024-08-08 11:30             ` Christian Hopps
2024-08-08 13:28               ` Sabrina Dubroca
2024-08-08 13:35                 ` Christian Hopps
2024-08-08 14:01                   ` Sabrina Dubroca
2024-08-08 21:42                     ` Christian Hopps
2024-08-06 11:07           ` Steffen Klassert
2024-08-07 16:23             ` Christian Hopps
2024-08-06 11:32     ` Steffen Klassert
2024-08-07 19:40       ` Christian Hopps
2024-08-08  9:26         ` Sabrina Dubroca
2024-08-08 11:23           ` Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 11/16] xfrm: iptfs: add basic receive packet (tunnel egress) handling Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 12/16] xfrm: iptfs: handle received fragmented inner packets Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 13/16] xfrm: iptfs: add reusing received skb for the tunnel egress packet Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 14/16] xfrm: iptfs: add skb-fragment sharing code Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 15/16] xfrm: iptfs: handle reordering of received packets Christian Hopps
2024-08-04 20:33 ` [PATCH ipsec-next v8 16/16] xfrm: iptfs: add tracepoint functionality Christian Hopps

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=m2ed72otio.fsf@ja-home.int.chopps.org \
    --to=chopps@chopps.org \
    --cc=chopps@labn.net \
    --cc=devel@linux-ipsec.org \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    --cc=steffen.klassert@secunet.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).