Re: j1939: discussion: RX path

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

 





On 25.06.19 10:43, David Jander wrote:
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?

ACK.

Kind regards,
Oleksij Rempel

--
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



[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