# 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 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/07/3133182
- Thread: https://ratatoskr.run/netdev/2025/07/3130033/t.md

```text
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.
> 

> > 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
```
