[PATCH net-next] mctp i2c: notify user space on TX failure
Jeremy Kerr
jk at codeconstruct.com.au
Thu Nov 14 14:13:33 AEDT 2024
Hi Jakub,
> > @@ -551,6 +552,14 @@ static void mctp_i2c_xmit(struct mctp_i2c_dev *midev, struct sk_buff *skb)
> > dev_warn_ratelimited(&midev->adapter->dev,
> > "__i2c_transfer failed %d\n", rc);
> > stats->tx_errors++;
> > +
> > + sk = skb->sk;
> > + if (sk) {
> > + sk->sk_err = -rc;
> > + if (!sock_flag(sk, SOCK_DEAD))
> > + sk_error_report(sk);
> > + }
>
> notifying socket in the xmit handler of a netdev is a bit strange,
> could you do it somewhere higher in the MCTP stack?
Sounds like that would be useful in general for MCTP, but we don't have
a facility for that at present. Any existing implementation you would
suggest modelling this on?
Cheers,
Jeremy
More information about the openbmc
mailing list