On Tue, 23 Jul 2019 10:59:07 +0200 Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote: > On 7/22/19 3:37 PM, Oleksij Rempel wrote: > > We just noticed, in current implementation J1939_SOCK_RECV_OWN doesn't > > work anymore (for ETP). And ...naively thinking it probably makes no > > sense to support it for different reasons: > > > > - we have a better feedback mechanism via the error queue feature > > - with RECV_OWN the socket receives the complete payload back into user > > space, where the error queue will give back message number at state of > > the message/transfer. > > - the error queue mechanism is extendable with more information and even > > backwards compatible. > > > > However in the current implementation you'll receive an ACK via error > > queue if the (E)TP transfer is completed, but for simple messages, the > > ACK is received as soon as the packet has been put into the packet > > scheduler. It would be better to wait and send the ACK only after the > > simple message has been send onto the wire (i.e.: after the CAN > > controller's TX-complete interrupt). > > > > We'll remove J1939_SOCK_RECV_OWN for now. I see no real reason to use RECV_OWN here, other than for solving issues that cannot be solved with the current UAPI. In that case, IMHO we should fix the UAPI now, and not use RECV_OWN. In other words, I am fine with removing it. > > But we already noticed that this will break jacd, however we think we > > can fix it, by using a separate socket to receive. Are there any other > > use cases or existing applications relying on this feature? > > I think in AGL they switch on self reception of j1939 sockets by default. Wow, I hadn't realized AGL already is including this... But why would they enable self-reception? Probably because of the lack of a solution to the exact problem Oleksij is trying to solve with this patch-stack? Best Regards, -- David Jander Protonic Holland.