linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
Cc: linux-can@vger.kernel.org
Subject: Re: candump -x: brs esi is set on non-canfd interfaces
Date: Thu, 24 Jan 2013 10:01:42 +0100	[thread overview]
Message-ID: <52273885.5b5dnNaNTl@ws-stein> (raw)
In-Reply-To: <2827513.Ik1JmLTmS7@ws-stein>

On Tuesday 22 January 2013 09:58:54, Alexander Stein wrote:
> Hello Oliver,
> 
> On Tuesday 22 January 2013 09:44:09, Oliver Hartkopp wrote:
> > Am 22.01.2013 08:55, schrieb Alexander Stein:
> > 
> > > a student noticed that during his CANopen SDO transfer traffic candump sometimes shows e.g.
> > >> (000.000124)  can0  TX B E  641   [8]  00 32 33 34 35 36 37 38
> > > while on a non-canfd interfaces. It seem to occur at some time and disappears again for one SDO transfer and it occurs for another transfer and stays forever. I see that candump always uses struct canfd_frame, but AFAICS the flags member should not be set at all, as alloc_can_skb does a memset on struct can_frame. So the padding bytes in can_frame are zero which are used for flags in canfd_frame.
> > > When printing flags directly it is set to 0x7F. Has anybody an idea what could cause this? I could find any position which would manipulate the flags byte.
> > >
> > 
> > Is it possible that you generate that CAN frame on the local host?
> > If you do not zero the struct CAN frame before sending it e.g. via CAN_RAW 
> > socket this could be an idea where it comes from.
> > 
> > Because as you already pointed out alloc_can_skb() initializes the struct 
> > properly. But this only is relevant from CAN frames from 'the outside'.
> 
> I don't know about the details that much, but you actually might be right. I will forward your suggestion and reply with the response.

Oliver, you were right. This issue was raised by local CAN frames and a memset on the struct solves this annoyance. Thanks for the hint.

Regards,
Alexander


      reply	other threads:[~2013-01-24  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22  7:55 candump -x: brs esi is set on non-canfd interfaces Alexander Stein
2013-01-22  8:44 ` Oliver Hartkopp
2013-01-22  8:58   ` Alexander Stein
2013-01-24  9:01     ` Alexander Stein [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52273885.5b5dnNaNTl@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=linux-can@vger.kernel.org \
    --cc=oliver.hartkopp@volkswagen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).