All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS
@ 2012-07-09 19:56 Ira W. Snyder
  2012-07-09 19:56 ` [PATCH 1/3] can: make the echo stack keep packet information longer Ira W. Snyder
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Ira W. Snyder @ 2012-07-09 19:56 UTC (permalink / raw)
  To: linux-can; +Cc: Ira W. Snyder

From: "Ira W. Snyder" <iws@ovro.caltech.edu>

This is another different approach to fixing the Janz ICAN3 support for
CAN_RAW_RECV_OWN_MSGS.

The can_put_echo_skb() function is changed to always keep all packets
until can_get_echo_skb() is called. Previously, it would drop packets if
they were not needed to be looped back. This makes it possible for the
new function can_cmp_echo_skb() to work with hardware-assisted loopback
support on the Janz ICAN3, which does not have TX-complete interrupts of
any kind.

Since we are now storing packets even in the non-loopback case, there is
some extra memory overhead, to store the extra packets between the calls
to can_put_echo_skb() and can_get_echo_skb().

After this patch series is applied, the SocketCAN tst-rcv-own-msgs test
passes.

Performance is rougly 15% less than using the previously posted patch:
[PATCH ALTERNATE VERSION 1/1] can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS

This performance drop is due to the extra overhead of receiving the echo
packets from the card itself. This involves one extra interrupt for each
packet sent, and the associated overhead of running ican3_napi() for
each packet sent.

Ira W. Snyder (3):
  can: make the echo stack keep packet information longer
  can: add can_cmp_echo_skb() for echo skb comparison
  can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS

 drivers/net/can/dev.c        |   75 ++++++++++++++++++++++++++++++-----------
 drivers/net/can/janz-ican3.c |   56 +++++++++++++++++--------------
 include/linux/can/dev.h      |    2 +
 3 files changed, 87 insertions(+), 46 deletions(-)

-- 
1.7.8.6


^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH 0/3] can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS
@ 2012-07-12 16:15 Ira W. Snyder
  0 siblings, 0 replies; 16+ messages in thread
From: Ira W. Snyder @ 2012-07-12 16:15 UTC (permalink / raw)
  To: linux-can; +Cc: Ira W. Snyder

From: "Ira W. Snyder" <iws@ovro.caltech.edu>

Per reviewer feedback, I have moved the janz-ican3 driver-specific
modifications to the can_put_echo_skb() and can_get_echo_skb() into the
janz-ican3 driver itself.

The first patch brings support up to the level of the previously posted
patch series.

The second patch modifies the driver-specific versions of
can_put_echo_skb() and can_get_echo_skb() to use an SKB queue. This
removes the burden of index management, and allows increased TX buffer
queue length.

The third patch adds support for CAN_CTRLMODE_ONE_SHOT. My coworker has
requested this, and it seems like a good enhancement.

Ira W. Snyder (3):
  can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS
  can: janz-ican3: increase tx buffer size
  can: janz-ican3: add support for one shot mode

 drivers/net/can/janz-ican3.c |  164 +++++++++++++++++++++++++++++++++++-------
 1 files changed, 137 insertions(+), 27 deletions(-)

-- 
1.7.8.6


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-07-12 16:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09 19:56 [PATCH 0/3] can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS Ira W. Snyder
2012-07-09 19:56 ` [PATCH 1/3] can: make the echo stack keep packet information longer Ira W. Snyder
2012-07-09 21:09   ` Oliver Hartkopp
2012-07-09 19:56 ` [PATCH 2/3] can: add can_cmp_echo_skb() for echo skb comparison Ira W. Snyder
2012-07-09 19:56 ` [PATCH 3/3] can: janz-ican3: fix support for CAN_RAW_RECV_OWN_MSGS Ira W. Snyder
2012-07-09 20:57   ` Oliver Hartkopp
2012-07-09 21:16     ` Ira W. Snyder
2012-07-10  6:40       ` Wolfgang Grandegger
2012-07-09 21:05 ` [PATCH 0/3] " Oliver Hartkopp
2012-07-09 21:29   ` Ira W. Snyder
2012-07-10  6:09 ` Wolfgang Grandegger
2012-07-10  6:59   ` Wolfgang Grandegger
2012-07-10 15:22     ` Ira W. Snyder
2012-07-10 19:19       ` Oliver Hartkopp
2012-07-10 20:34       ` Wolfgang Grandegger
2012-07-12 16:15 Ira W. Snyder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.