[PATCH net-next] mctp i2c: notify user space on TX failure

Marc Kleine-Budde mkl at pengutronix.de
Fri Nov 15 19:30:54 AEDT 2024


On 14.11.2024 07:02:35, Jakub Kicinski wrote:
> On Thu, 14 Nov 2024 14:48:57 +0800 Jeremy Kerr wrote:
> > > routing isn't really my forte, TBH, what eats the error so that it
> > > doesn't come out of mctp_local_output() ? Do you use qdiscs on top
> > > of the MCTP devices?  
> > 
> > There are no qdiscs involved at this stage, as we need to preserve
> > packet ordering in most cases. The route output functions will end up
> > in a dev_queue_xmit, so any tx error would have been decoupled from the
> > route output at that stage.
> 
> Ah, it's the driver eating the errors, it puts the packet on a local
> queue and returns OK no matter what. The I2C transfer happens from 
> a thread.
> 
> I wonder if there is precedent, let's ask CAN experts.
> 
> Mark, MCTP would like to report errors from the drivers all the way 
> to the socket. Do CAN drivers do something along these lines?

On CAN_RAW we send fixed size messages (struct can_frame) and there is a
bit left to mark a can_frame as an error frame. This basically means we
send the error notification inline.

What about using sock_queue_err_skb()? We do this in CAN_J1939.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20241115/a76926ee/attachment.sig>


More information about the openbmc mailing list