Re: [PATCH net-next v22 2/2] mctp pcc: Implement MCTP over PCC Transport

From
Jeremy Kerr <jk@codeconstruct.com.au>
Date
2025-07-14 08:22:01
Also in
lkml
Reply to
Adam Young, 2025-07-11
Hi Adam,
If the sk_buff allocation fails, the logic falls back to the old code, 
which passes on a null buffer. There is logic there with notifying the 
sender that I don't want to skip or modify.
OK, so this will happen if we didn't allocate a buffer in the first
place - we'd still get a completion occurring. Let me know if my
understanding is incorrect.
quoted
I think the issue is that the mbox API is using the void * buffer
as both the data to transfer, and the callback context, so we can't
stash useful context across the completion?
Correct, the SK_buff is a structure  that points to a buffer, and
what gets to the send_data function is the buffer itself. That buffer
has no pointer back to the sk_buff.
OK, that's a bit unfortunate. Might be good to see if you can add a
context pointer to the mailbox request, in which you could stuff the
skb pointer. USB does this for the transfer completions: there are
members on the transfer (the struct urb) for both a context and buffer
pointer.

Of course, that is more a mailbox API change, so you may want to
consider that as a separate thing later.
The NETDEV_TX_BUSY is correct, as it means resend the packet, and we 
don't have any reference to it.
OK, you may want to have the tx queue stopped at that point then, if
you have some facility to re-start it when the mailbox ring buffer has
space.

Cheers,


Jeremy
Thread (10 messages) 10 messages, 5 authors, last reply 2025-07-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help