[PATCH v1 00/40] implement support for huge ETP transfers

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

 



The ETP transfer can be as big as 112 MiB. The challenge is to keep easy
socket programming model, support 112 MiB MTU and not consume insane
amount of resources.

With this patch set, kernel do not need to copy complete 112 MiB packet in one
run. It will by copied from user space by kernel in small chunks (max
1785 Byte, which is equal to maximal TP size) and added to the session
skb queue. The size of skb queue is limited to wmem size. As soon as one
skb is transceived and confirmed by receiver, it is removed from the skb
queue and other portion of data can be copied from userspace.

For testing I wrote small too called jcat (netcat for j1939). I'll
clean it up and send pull request for can utils, with hope you'll do
more testing and bug hunting.

The test setup was configured like this:
# on sender and receiver:
ip link set can0 type can bitrate 250000
ip link set up can0
# on receiver:
jcat can0:0x90 -r > /tmp/bla

#on sender:
jcat -i /my_test_image  can0:0x80 :0x90,0x12300

as you can see, the sender is not using stdin. For proper ETP testing
we need to know size of the transfer. On other hand it should be
possible to implement stdin as well, just for fun or for use in cases
like socat.

Oleksij Rempel (40):
  j1939: rework j1939_send data path
  j1939: transport: rework TP size check
  j1939: move j1939_tp_max_packet_size to priv
  j1939: transport: add j1939_xtp_rx_rts_new() function
  j1939: transport: add j1939_xtp_rx_rts_current() function
  j1939: transport: j1939_xtp_rx_rts: remove useless check
  j1939: transport add warning for j1939_xtp_rx_rts_current()
  j1939: transport: j1939_tp_send(): fix skb refcounting
  j1939: transport: warn if skb can't be freed in
    j1939_session_destroy()
  j1939: socket: make sure all sessions are finished on close
  j1939: transport: rework j1939_xtp_rx_bad_message_one
  j1939: transport: move j1939_sessionq() the the
    j1939_session_get_by_skb()
  j1939: transport: simplify j1939_session_list_unlock()
  j1939: transport: move TP_CMD related code to j1939_tp_cmd_recv()
  j1939: transport: move most of j1939_session_get_by_skb to the
    j1939_tp_cmd_recv
  j1939: transport: use per session skcb
  j1939: transport: use session->total_message_size instead of skb->len
  j1939: transport: document packet related variables
  j1939: add ofsset to j1939_sk_buff_cb
  j1939: transport: remove useless ifindex check
  j1939: transport: don't use can_skb_prv(session->skb)->ifindex with
    netdev_alert
  j1939: transport: add multi skb support
  j1939: socket: add j1939_sk_alloc_skb()
  j1939: socket: add j1939_sk_send_multi() and j1939_sk_send_one()
  j1939: allow to use session by socket code
  j1939: transport: don't use skb->len
  j1939: socket: j1939_sk_send_multi: start using skb queue
  j1939: transport: print last command in j1939_xtp_rx_rts_current in
    cases of error
  j1939: transport: use skcb instead of skb in transmitter or receiver
    related functions
  j1939: transport: rework j1939_session_fresh_new and
    j1939_tp_tx_dat_new paths
  j1939: transport: remove unused j1939_session_skb_find
  j1939: transport: use skcb instead of skb in
    j1939_tp_im_involved_anydir()
  j1939: transport: remove useless check in j1939_session_cancel
  j1939: transport: rework j1939_xtp_do_tx_ctl() path
  j1939: transport: reduce use of j1939_session_skb_find in
    j1939_tp_txnext
  j1939: move j1939_socks socket list to the priv
  j1939: transport: use skbc instead of skb in j1939_session_match()
    path
  j1939: link sock to the session
  j1939: transport: remove rest of ifindex calls from netdev_* prints
  j1939: bus: drop ecu_dbg

 net/can/j1939/bus.c        |   8 -
 net/can/j1939/j1939-priv.h |  94 +++-
 net/can/j1939/main.c       |  26 +-
 net/can/j1939/socket.c     | 240 ++++++----
 net/can/j1939/transport.c  | 868 ++++++++++++++++++++-----------------
 5 files changed, 719 insertions(+), 517 deletions(-)

-- 
2.19.1




[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