From: Ben Hutchings <bhutchings@solarflare.com>
To: Ben Greear <greearb@candelatech.com>
Cc: "Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
Andrea Merello <andrea.merello@gmail.com>,
"e1000-devel@lists.sourceforge.net"
<e1000-devel@lists.sourceforge.net>,
netdev@vger.kernel.org
Subject: Re: [E1000-devel] [PATCH] e100: Fix inconsistency in bad frames handling
Date: Mon, 06 Jun 2011 21:15:15 +0100 [thread overview]
Message-ID: <1307391315.22348.454.camel@localhost> (raw)
In-Reply-To: <4DED14E7.2050405@candelatech.com>
On Mon, 2011-06-06 at 10:56 -0700, Ben Greear wrote:
> On 06/06/2011 10:49 AM, Brandeburg, Jesse wrote:
> >
> > <added netdev>, removed other useless lists.
> >
> > On Sat, 4 Jun 2011, Andrea Merello wrote:
> >> In e100 driver it seems that the intention was to accept bad frames in
> >> promiscuous mode and loopback mode.
> >> I think this is evident because of the following code in the driver:
> >>
> >> if (nic->flags& promiscuous || nic->loopback) {
> >> config->rx_save_bad_frames = 0x1; /* 1=save, 0=discard */
> >> config->rx_discard_short_frames = 0x0; /* 1=discard, 0=save */
> >> config->promiscuous_mode = 0x1; /* 1=on, 0=off */
> >> }
> >>
> >
> > Hi, thanks for your work on e100.
> >
> >> However this intention is not really realized because bad frames are
> >> discarded later by SW check.
> >> This patch finally honors the above intention, making the RX code to
> >> let bad frames to pass when the NIC is in promiscuous or loopback
> >> mode.
> >
> > I think this may be a mistake by the authors of the software developers
> > manual. The manual suggests that save bad frames and save short frames
> > should be enabled in promisc mode, but all of our other drivers *do not*
> > save bad frames when in promiscuous mode (by design). This is intentional
> > because a bad frame is just that, bad, and with no hope of knowing if the
> > data in it is okay/malicious/other. I understand your reasoning above,
> > but realistically the rx_save_bad_frames should NOT be set. I'd ack a
> > patch to comment that line out.
> >
> >> This helped me a lot to debug an FPGA ethernet core.
> >> Maybe it can be also useful to someone else..
> >
> > I think this patch is just that, debug only. As a developer I understand
> > why this is useful, but there is no reason any normal user would be able
> > to benefit from this, so for now, sorry:
> >
> > NACK.
>
> I think anyone sniffing a funky network would have benefit in
> receiving all frames. So, while it shouldn't be enabled by default,
> it would be nice to have an ethtool command to turn on receiving
> bad-crc frames, as well as receiving the 4-byte CRC on the end of
> the packets.
>
> It just so happens I have such a patch, in case others agree :)
How would a received skb be flagged as having a CRC error?
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-06-06 20:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BANLkTimpYniHhN6ccMXN7Lx3xDdK6sC+FQ@mail.gmail.com>
2011-06-06 17:49 ` [E1000-devel] [PATCH] e100: Fix inconsistency in bad frames handling Brandeburg, Jesse
2011-06-06 17:56 ` Ben Greear
2011-06-06 20:15 ` Ben Hutchings [this message]
2011-06-06 20:20 ` Ben Greear
2011-06-06 20:29 ` Eric Dumazet
2011-06-06 22:45 ` Ben Greear
2011-06-14 17:30 ` Ben Greear
2011-06-14 18:57 ` [E1000-devel] " Brandeburg, Jesse
2011-06-14 19:05 ` Ben Greear
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=1307391315.22348.454.camel@localhost \
--to=bhutchings@solarflare.com \
--cc=andrea.merello@gmail.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=greearb@candelatech.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
/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).