Re: j1939: discussion: RX path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 25 Jun 2019 09:30:09 +0200
Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> wrote:

> Hello all,
> 
> We already had a discussion about the J1939 use case for server
> implementation. Short description of the challenge will looks as follow:
> - main socket is listening on DST address and PGN.
> - as soon as connection was requested from peer the server will
>   create new connect()ed socket with SRC, DST addresses and PGN.
> 
> With current stack implementation both sockets (main and connected) will
> receive same packages. At least with huge packages it will start to be
> not really good :).
> 
> To solve this issue we have following variants:
> variant a:
>  - all sockets can receive everything (as currently implemented)
> variant b:
>  - only one socket will receive specific tuple. In this case kernel
>    should calculate RX "priority". Only highest priority will RX packet.
>    - all sockets with same priority will receive the matching packet
>    - socket option promisc == same priority as exact match

How is this "priority" determined?
Something like this:

 for each socket:
	 prio = 0
	 listening on same DST or PGN ==> prio++
	 listening on same DST and PGN ==> prio++
	 connect()ed to same SRC ==> prio++
 deliver frame to socket(s) with highest prio.

Is that what you mean?

> variant c:
>  - all sockets can receive everything
>    add socket option: "ignore me if other can rx"

That will be confusing I believe...

> We think variant b makes most sense to us.

I think I agree.

> Opinions?
> 
> regards, Oleksij & Marc
> 

Best regards,

-- 
David Jander
Protonic Holland.



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux