]> www.infradead.org Git - users/hch/misc.git/commitdiff
psp: clarify checksum behavior of psp_dev_rcv()
authorDaniel Zahka <daniel.zahka@gmail.com>
Thu, 18 Sep 2025 21:27:20 +0000 (14:27 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 20 Sep 2025 00:02:57 +0000 (17:02 -0700)
psp_dev_rcv() decapsulates psp headers from a received frame. This
will make any csum complete computed by the device inaccurate. Rather
than attempt to patch up skb->csum in psp_dev_rcv() just make it clear
to callers what they can expect regarding checksum complete.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20250918212723.17495-1-daniel.zahka@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/psp/psp_main.c

index 0f8c50c8e94358a060722614a59278320c33134b..481aaf0fc9fcf219481221290729c283cd13607c 100644 (file)
@@ -228,7 +228,8 @@ EXPORT_SYMBOL(psp_dev_encapsulate);
  * Presently it accepts only already-authenticated packets and does not
  * support optional fields, such as virtualization cookies. The caller should
  * ensure that skb->data is pointing to the mac header, and that skb->mac_len
- * is set.
+ * is set. This function does not currently adjust skb->csum (CHECKSUM_COMPLETE
+ * is not supported).
  */
 int psp_dev_rcv(struct sk_buff *skb, u16 dev_id, u8 generation, bool strip_icv)
 {