netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirqus@gmail.com>
To: Ben Greear <greearb@candelatech.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC v2 2/2] e100: Support RXFCS feature flag.
Date: Wed, 29 Jun 2011 17:06:05 +0200	[thread overview]
Message-ID: <BANLkTi=-ibpBiWBZ=AANybmWMWfMVGfe4Q@mail.gmail.com> (raw)
In-Reply-To: <4E0B383E.8020807@candelatech.com>

W dniu 29 czerwca 2011 16:35 użytkownik Ben Greear
<greearb@candelatech.com> napisał:
> On 06/29/2011 07:33 AM, Michał Mirosław wrote:
>> W dniu 29 czerwca 2011 16:22 użytkownik Ben Greear
>> <greearb@candelatech.com>  napisał:
>>> On 06/29/2011 04:37 AM, Michał Mirosław wrote:
>>>> 2011/6/24<greearb@candelatech.com>:
>>>>> From: Ben Greear<greearb@candelatech.com>
>>>>>
>>>>> This allows e100 to be configured to append the
>>>>> Ethernet FCS to the skb.
>>>>>
>>>>> Useful for sniffing networks.
>>>>>
>>>>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>>>>> ---
>>>>> :100644 100644 c1352c6... 761f6f5... M  drivers/net/e100.c
>>>>>  drivers/net/e100.c |   15 ++++++++++++---
>>>>>  1 files changed, 12 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
>>>>> index c1352c6..761f6f5 100644
>>>>> --- a/drivers/net/e100.c
>>>>> +++ b/drivers/net/e100.c
>>>>> @@ -1089,6 +1089,7 @@ static void e100_configure(struct nic *nic,
>>>>> struct
>>>>> cb *cb, struct sk_buff *skb)
>>>>>  {
>>>>>        struct config *config =&cb->u.config;
>>>>>        u8 *c = (u8 *)config;
>>>>> +       struct net_device *netdev = nic->netdev;
>>>>>
>>>>>        cb->command = cpu_to_le16(cb_config);
>>>>>
>>>>> @@ -1132,6 +1133,9 @@ static void e100_configure(struct nic *nic,
>>>>> struct
>>>>> cb *cb, struct sk_buff *skb)
>>>>>                config->promiscuous_mode = 0x1;         /* 1=on, 0=off
>>>>> */
>>>>>        }
>>>>>
>>>>> +       if (netdev->wanted_features&    NETIF_F_RXFCS)
>>>>> +               config->rx_crc_transfer = 0x1;  /* 1=save, 0=discard */
>>>>> +
>>>>
>>>> You should check netdev->features here.
>>>
>>> I thought 'features' was what the NIC could support, and wanted_features
>>> was what the NIC was currently configured to support?  I don't want
>>> to rx the CRC all the time, just when users enable it...
>>
>> hw_features is what device could support, and features is what device
>> has currently turned on.
> Ok, thanks for that correction.
> What does wanted_features mean, then?

What user wants to be active. It should be more clear to you if you
read the implemetation: netdev_update_features() and friends.

Best Regards,
Michał Mirosław

  reply	other threads:[~2011-06-29 15:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-24 19:06 [RFC v2 0/2] Enable RX-FCS in e100 greearb
2011-06-24 19:06 ` [RFC v2 1/2] net: Support RXFCS feature flag greearb
2011-06-24 19:06 ` [RFC v2 2/2] e100: " greearb
2011-06-29 11:37   ` Michał Mirosław
2011-06-29 14:22     ` Ben Greear
2011-06-29 14:33       ` Michał Mirosław
2011-06-29 14:35         ` Ben Greear
2011-06-29 15:06           ` Michał Mirosław [this message]
2011-06-29 15:20             ` Ben Greear
2011-07-12 15:49               ` Michał Mirosław
2011-07-12 16:00                 ` Stephen Hemminger
2011-07-12 16:23                   ` Ben Hutchings
2011-07-12 19:01                   ` [PATCH] net: Add documentation for netdev features handling Michał Mirosław
2011-07-12 19:19                     ` Randy Dunlap
2011-07-12 19:41                     ` [PATCH v2] " Michał Mirosław
2011-07-13  5:27                       ` David Miller

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='BANLkTi=-ibpBiWBZ=AANybmWMWfMVGfe4Q@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).