From: Simon Horman <horms@kernel.org>
To: Christian Hopps <chopps@labn.net>
Cc: Christian Hopps <chopps@chopps.org>,
devel@linux-ipsec.org,
Steffen Klassert <steffen.klassert@secunet.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH ipsec-next v1 8/8] iptfs: impl: add new iptfs xfrm mode impl
Date: Mon, 26 Feb 2024 20:57:46 +0000 [thread overview]
Message-ID: <20240226205746.GK13129@kernel.org> (raw)
In-Reply-To: <m24je013cj.fsf@ja.int.chopps.org>
On Thu, Feb 22, 2024 at 03:23:36PM -0500, Christian Hopps wrote:
>
> Simon Horman <horms@kernel.org> writes:
>
> > On Mon, Feb 19, 2024 at 03:57:35AM -0500, Christian Hopps wrote:
> > > From: Christian Hopps <chopps@labn.net>
> > >
> > > Add a new xfrm mode implementing AggFrag/IP-TFS from RFC9347.
> > >
> > > This utilizes the new xfrm_mode_cbs to implement demand-driven IP-TFS
> > > functionality. This functionality can be used to increase bandwidth
> > > utilization through small packet aggregation, as well as help solve PMTU
> > > issues through it's efficient use of fragmentation.
> > >
> > > Link: https://www.rfc-editor.org/rfc/rfc9347.txt
> > >
> > > Signed-off-by: Christian Hopps <chopps@labn.net>
> >
> > ...
> >
> > > diff --git a/net/xfrm/xfrm_iptfs.c b/net/xfrm/xfrm_iptfs.c
> >
> > ...
> >
> > > +/**
> > > + * skb_head_to_frag() - initialize a skb_frag_t based on skb head data
> > > + * @skb: skb with the head data
> > > + * @frag: frag to initialize
> > > + */
> > > +static void skb_head_to_frag(const struct sk_buff *skb, skb_frag_t *frag)
> > > +{
> > > + struct page *page = virt_to_head_page(skb->data);
> > > + unsigned char *addr = (unsigned char *)page_address(page);
> > > +
> > > + BUG_ON(!skb->head_frag);
> >
> > Is it strictly necessary to crash the Kernel here?
> > Likewise, many other places in this patch.
>
> In all use cases it represents a programming error (bug) if the condition is met.
>
> What is the correct use of BUG_ON?
Hi Christian,
I would say that BUG_ON should used in situations where
there is an unrecoverable error to the extent where
the entire system cannot continue to function.
...
next prev parent reply other threads:[~2024-02-26 20:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 8:57 [PATCH ipsec-next v1 0/8] Add IP-TFS mode to xfrm Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 1/8] iptfs: config: add CONFIG_XFRM_IPTFS Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 2/8] iptfs: uapi: ip: add ip_tfs_*_hdr packet formats Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 3/8] iptfs: uapi: IPPROTO_AGGFRAG AGGFRAG in ESP Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 4/8] iptfs: sysctl: allow configuration of global default values Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 5/8] iptfs: netlink: add config (netlink) options Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 6/8] iptfs: xfrm: Add mode_cbs module functionality Christian Hopps
2024-02-25 12:17 ` [devel-ipsec] " Antony Antony
2024-03-08 22:21 ` Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 7/8] iptfs: xfrm: add generic iptfs defines and functionality Christian Hopps
2024-02-19 8:57 ` [PATCH ipsec-next v1 8/8] iptfs: impl: add new iptfs xfrm mode impl Christian Hopps
2024-02-19 20:13 ` Simon Horman
2024-02-22 20:23 ` Christian Hopps
2024-02-26 20:57 ` Simon Horman [this message]
2024-02-29 9:12 ` Christian Hopps
2024-02-20 23:16 ` kernel test robot
2024-02-25 12:16 ` [devel-ipsec] " Antony Antony
2024-03-06 13:57 ` Sabrina Dubroca
2024-03-06 15:30 ` 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=20240226205746.GK13129@kernel.org \
--to=horms@kernel.org \
--cc=chopps@chopps.org \
--cc=chopps@labn.net \
--cc=devel@linux-ipsec.org \
--cc=netdev@vger.kernel.org \
--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).