From: "Michał Mirosław" <mirqus@gmail.com>
To: greearb@candelatech.com
Cc: netdev@vger.kernel.org
Subject: Re: [RFC 2/2] e1000e: Support RXALL feature flag.
Date: Wed, 8 Feb 2012 01:06:42 +0100 [thread overview]
Message-ID: <CAHXqBFJ9=fXYuzZd0SM0hGsDxQee5UPzOwThbxNkks03VLFunw@mail.gmail.com> (raw)
In-Reply-To: <1328656063-13129-2-git-send-email-greearb@candelatech.com>
2012/2/8 <greearb@candelatech.com>:
> From: Ben Greear <greearb@candelatech.com>
>
> This allows the NIC to receive all frames available, including
> those with bad FCS, un-matched vlans, ethernet control frames,
> and more.
>
> Tested by sending frames with bad FCS.
This should probably mark the bad packets somehow, so they are not
passed up the stack and mixed with correct traffic.
[...]
> @@ -2996,6 +3001,25 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
> ew32(PSRCTL, psrctl);
> }
>
> + /* This is useful for sniffing bad packets. */
> + if (adapter->netdev->features & NETIF_F_RXALL) {
> + rctl |= (E1000_RCTL_SBP | /* Receive bad packets */
> + E1000_RCTL_UPE | /* RX all Unicast Pkts */
> + E1000_RCTL_MPE | /* RX all Mcast Pkts */
> + E1000_RCTL_BAM | /* RX All Bcast Pkts Pkts */
> + E1000_RCTL_PMCF); /* RX All MAC Ctrl Pkts */
> +
> + rctl &= ~(E1000_RCTL_VFE | /* Disable VLAN filter */
> + E1000_RCTL_DPF | /* Allow filtered pause */
> + E1000_RCTL_CFIEN); /* Dis VLAN CFIEN Filter */
> + /* disable VLAN tagging/striping */
> + /* SKIP This, it also affects transmit side and
> + screws up VLANs --Ben. */
> + /* ctrl = er32(CTRL); */
> + /* ctrl &= ~E1000_CTRL_VME; */
> + /* ew32(CTRL, ctrl); */
> + }
> +
[...]
Looks like it can be enabled independently of promisc mode: rx-all +
no-promisc would receive only bad packets destined for this host.
Best Regards,
Michał Mirosław
next prev parent reply other threads:[~2012-02-08 0:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 23:07 [RFC 1/2] net: Support RX-ALL feature flag greearb
2012-02-07 23:07 ` [RFC 2/2] e1000e: Support RXALL " greearb
2012-02-08 0:06 ` Michał Mirosław [this message]
2012-02-08 0:19 ` Ben Greear
2012-02-08 9:31 ` Michał Mirosław
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='CAHXqBFJ9=fXYuzZd0SM0hGsDxQee5UPzOwThbxNkks03VLFunw@mail.gmail.com' \
--to=mirqus@gmail.com \
--cc=greearb@candelatech.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).