From: "Kok, Auke" <sofar@foo-projects.org>
To: Joonwoo Park <joonwpark81@gmail.com>
Cc: "'Kok, Auke'" <auke-jan.h.kok@intel.com>,
"'Patrick McHardy'" <kaber@trash.net>,
"'Herbert Xu'" <herbert@gondor.apana.org.au>,
"'David Miller'" <davem@davemloft.net>,
w@1wt.eu, cfriesen@nortel.com, netdev@vger.kernel.org,
djohnson+linux-kernel@sw.starentnetworks.com,
linux-kernel@vger.kernel.org, e1000-devel@lists.sourceforge.net
Subject: Re: [PATCH 2/2] [e1000 VLAN] Disable vlan hw accel when promiscuous mode
Date: Tue, 13 Nov 2007 21:12:13 -0800 [thread overview]
Message-ID: <473A83AD.6030101@foo-projects.org> (raw)
In-Reply-To: <000001c82679$796d1770$9c94fea9@jason>
Joonwoo Park wrote:
> 2007/11/14, Kok, Auke <auke-jan.h.kok@intel.com>:
>> Patrick McHardy wrote:
>>> Kok, Auke wrote:
>>>> Patrick McHardy wrote:
>>>>
>>>>> I already posted a patch for this, not sure what happened to it.
>>>>> Auke, any news on merging the secondary unicast address support?
>>>> I dropped the ball on that one. Care to resend it and send me one for
>>>> e1000e as well?
>>> Patch for e1000 attached.
>>>
>>> Does e1000e also work with PCI cards if I add the proper IDs?
>>> Otherwise I could only send an untested patch.
>>
>> Johnwoo,
>>
>> your patch unfortunately does not apply after patrick's unicast patch,
>>
>> also, ich8lan support is removed from e1000 in the e1000 version in
>> jgarzik/netdev-2.6 #upstream as planned (moved over to e1000e!).
>>
>> Can you resend your patch so that it applies to jgarzik/netdev-2.6 #upstream with
>> Patrick's patch applied? That would help a lot. And possibly do the e1000e patch
>> as well :)
>>
>
> This is a patch for the jgarzik/netdev-2.6 #upstream with Patrick's one was applied.
> But the ich8lan stuff was not removed at this patch.
no, my TODO list is insane at the moment :)
thanks for the patch. I'll apply and rip the ich8 workarounds out myself later
when appropriate.
> I'll work e1000e too :-)
awesome, looking forward to that.
Auke
>
> Thanks.
> Joonwoo
>
> [E1000]: Disable vlan hw accel when promiscuous mode
>
> Even though netdevice is in the promiscuous mode, we should receive all of ingress packets.
> This disable the vlan filtering feature when a vlan hw accel configured e1000 device goes into promiscuous mode.
> This make packets visible to sniffers though it's not vlan id of itself.
>
> Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
>
> ---
> drivers/net/e1000/e1000_main.c | 23 ++++++++++++++++++-----
> 1 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
> index 5fd5f51..edf2ced 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -2425,7 +2425,7 @@ e1000_set_rx_mode(struct net_device *netdev)
> struct e1000_hw *hw = &adapter->hw;
> struct dev_addr_list *uc_ptr;
> struct dev_addr_list *mc_ptr;
> - uint32_t rctl;
> + uint32_t rctl, ctrl;
> uint32_t hash_value;
> int i, rar_entries = E1000_RAR_ENTRIES;
> int mta_reg_count = (hw->mac_type == e1000_ich8lan) ?
> @@ -2442,13 +2442,23 @@ e1000_set_rx_mode(struct net_device *netdev)
> /* Check for Promiscuous and All Multicast modes */
>
> rctl = E1000_READ_REG(hw, RCTL);
> + ctrl = E1000_READ_REG(hw, CTRL);
>
> if (netdev->flags & IFF_PROMISC) {
> rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
> - } else if (netdev->flags & IFF_ALLMULTI) {
> - rctl |= E1000_RCTL_MPE;
> + if (adapter->hw.mac_type != e1000_ich8lan) {
> + if (ctrl & E1000_CTRL_VME)
> + rctl &= ~E1000_RCTL_VFE;
> + }
> } else {
> - rctl &= ~E1000_RCTL_MPE;
> + if (adapter->hw.mac_type != e1000_ich8lan) {
> + if (ctrl & E1000_CTRL_VME)
> + rctl |= E1000_RCTL_VFE;
> + } else if (netdev->flags & IFF_ALLMULTI) {
> + rctl |= E1000_RCTL_MPE;
> + } else {
> + rctl &= ~E1000_RCTL_MPE;
> + }
> }
>
> uc_ptr = NULL;
> @@ -4967,7 +4977,10 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
> if (adapter->hw.mac_type != e1000_ich8lan) {
> /* enable VLAN receive filtering */
> rctl = E1000_READ_REG(&adapter->hw, RCTL);
> - rctl |= E1000_RCTL_VFE;
> + if (netdev->flags & IFF_PROMISC)
> + rctl &= ~E1000_RCTL_VFE;
> + else
> + rctl |= E1000_RCTL_VFE;
> rctl &= ~E1000_RCTL_CFIEN;
> E1000_WRITE_REG(&adapter->hw, RCTL, rctl);
> e1000_update_mng_vlan(adapter);
> ---
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: "Kok, Auke" <sofar@foo-projects.org>
To: Joonwoo Park <joonwpark81@gmail.com>
Cc: "'Kok, Auke'" <auke-jan.h.kok@intel.com>,
'Herbert Xu' <herbert@gondor.apana.org.au>,
'Patrick McHardy' <kaber@trash.net>,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
djohnson+linux-kernel@sw.starentnetworks.com,
linux-kernel@vger.kernel.org, w@1wt.eu, cfriesen@nortel.com,
'David Miller' <davem@davemloft.net>
Subject: Re: [PATCH 2/2] [e1000 VLAN] Disable vlan hw accel when promiscuous mode
Date: Tue, 13 Nov 2007 21:12:13 -0800 [thread overview]
Message-ID: <473A83AD.6030101@foo-projects.org> (raw)
In-Reply-To: <000001c82679$796d1770$9c94fea9@jason>
Joonwoo Park wrote:
> 2007/11/14, Kok, Auke <auke-jan.h.kok@intel.com>:
>> Patrick McHardy wrote:
>>> Kok, Auke wrote:
>>>> Patrick McHardy wrote:
>>>>
>>>>> I already posted a patch for this, not sure what happened to it.
>>>>> Auke, any news on merging the secondary unicast address support?
>>>> I dropped the ball on that one. Care to resend it and send me one for
>>>> e1000e as well?
>>> Patch for e1000 attached.
>>>
>>> Does e1000e also work with PCI cards if I add the proper IDs?
>>> Otherwise I could only send an untested patch.
>>
>> Johnwoo,
>>
>> your patch unfortunately does not apply after patrick's unicast patch,
>>
>> also, ich8lan support is removed from e1000 in the e1000 version in
>> jgarzik/netdev-2.6 #upstream as planned (moved over to e1000e!).
>>
>> Can you resend your patch so that it applies to jgarzik/netdev-2.6 #upstream with
>> Patrick's patch applied? That would help a lot. And possibly do the e1000e patch
>> as well :)
>>
>
> This is a patch for the jgarzik/netdev-2.6 #upstream with Patrick's one was applied.
> But the ich8lan stuff was not removed at this patch.
no, my TODO list is insane at the moment :)
thanks for the patch. I'll apply and rip the ich8 workarounds out myself later
when appropriate.
> I'll work e1000e too :-)
awesome, looking forward to that.
Auke
>
> Thanks.
> Joonwoo
>
> [E1000]: Disable vlan hw accel when promiscuous mode
>
> Even though netdevice is in the promiscuous mode, we should receive all of ingress packets.
> This disable the vlan filtering feature when a vlan hw accel configured e1000 device goes into promiscuous mode.
> This make packets visible to sniffers though it's not vlan id of itself.
>
> Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
>
> ---
> drivers/net/e1000/e1000_main.c | 23 ++++++++++++++++++-----
> 1 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
> index 5fd5f51..edf2ced 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -2425,7 +2425,7 @@ e1000_set_rx_mode(struct net_device *netdev)
> struct e1000_hw *hw = &adapter->hw;
> struct dev_addr_list *uc_ptr;
> struct dev_addr_list *mc_ptr;
> - uint32_t rctl;
> + uint32_t rctl, ctrl;
> uint32_t hash_value;
> int i, rar_entries = E1000_RAR_ENTRIES;
> int mta_reg_count = (hw->mac_type == e1000_ich8lan) ?
> @@ -2442,13 +2442,23 @@ e1000_set_rx_mode(struct net_device *netdev)
> /* Check for Promiscuous and All Multicast modes */
>
> rctl = E1000_READ_REG(hw, RCTL);
> + ctrl = E1000_READ_REG(hw, CTRL);
>
> if (netdev->flags & IFF_PROMISC) {
> rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
> - } else if (netdev->flags & IFF_ALLMULTI) {
> - rctl |= E1000_RCTL_MPE;
> + if (adapter->hw.mac_type != e1000_ich8lan) {
> + if (ctrl & E1000_CTRL_VME)
> + rctl &= ~E1000_RCTL_VFE;
> + }
> } else {
> - rctl &= ~E1000_RCTL_MPE;
> + if (adapter->hw.mac_type != e1000_ich8lan) {
> + if (ctrl & E1000_CTRL_VME)
> + rctl |= E1000_RCTL_VFE;
> + } else if (netdev->flags & IFF_ALLMULTI) {
> + rctl |= E1000_RCTL_MPE;
> + } else {
> + rctl &= ~E1000_RCTL_MPE;
> + }
> }
>
> uc_ptr = NULL;
> @@ -4967,7 +4977,10 @@ e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
> if (adapter->hw.mac_type != e1000_ich8lan) {
> /* enable VLAN receive filtering */
> rctl = E1000_READ_REG(&adapter->hw, RCTL);
> - rctl |= E1000_RCTL_VFE;
> + if (netdev->flags & IFF_PROMISC)
> + rctl &= ~E1000_RCTL_VFE;
> + else
> + rctl |= E1000_RCTL_VFE;
> rctl &= ~E1000_RCTL_CFIEN;
> E1000_WRITE_REG(&adapter->hw, RCTL, rctl);
> e1000_update_mng_vlan(adapter);
> ---
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-11-14 5:13 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 4:47 [PATCH 2/2] [e1000 VLAN] Disable vlan hw accel when promiscuous mode Joonwoo Park
2007-11-14 4:47 ` Joonwoo Park
2007-11-14 5:12 ` Kok, Auke [this message]
2007-11-14 5:12 ` Kok, Auke
2007-11-14 6:15 ` Joonwoo Park
2007-11-14 6:15 ` Joonwoo Park
-- strict thread matches above, loose matches on Subject: below --
2007-11-11 0:51 Joonwoo Park
2007-11-11 0:51 ` Joonwoo Park
2007-11-12 17:12 ` Kok, Auke
2007-11-12 17:21 ` Patrick McHardy
2007-11-12 17:21 ` Patrick McHardy
2007-11-12 18:01 ` Kok, Auke
2007-11-12 22:33 ` David Miller
2007-11-12 22:33 ` David Miller
2007-11-12 22:43 ` Chris Friesen
2007-11-12 22:54 ` Kok, Auke
2007-11-12 22:54 ` Kok, Auke
2007-11-14 11:48 ` Benny Amorsen
2007-11-14 11:48 ` Benny Amorsen
2007-11-12 22:57 ` David Miller
2007-11-12 22:57 ` David Miller
2007-11-12 23:15 ` Willy Tarreau
2007-11-12 23:15 ` Willy Tarreau
2007-11-12 23:19 ` David Miller
2007-11-12 23:19 ` David Miller
2007-11-12 23:32 ` Willy Tarreau
2007-11-12 23:32 ` Willy Tarreau
2007-11-12 23:38 ` Kok, Auke
2007-11-12 23:38 ` Kok, Auke
2007-11-12 23:40 ` David Miller
2007-11-12 23:40 ` David Miller
2007-11-13 1:21 ` Joonwoo Park
2007-11-13 1:21 ` Joonwoo Park
2007-11-13 10:21 ` Patrick McHardy
2007-11-13 11:09 ` Herbert Xu
2007-11-13 11:36 ` David Miller
2007-11-13 11:36 ` David Miller
2007-11-13 12:03 ` Herbert Xu
2007-11-13 12:06 ` David Miller
2007-11-13 12:16 ` Herbert Xu
2007-11-13 12:18 ` Patrick McHardy
2007-11-13 16:41 ` Kok, Auke
2007-11-13 16:41 ` Kok, Auke
2007-11-13 17:26 ` Patrick McHardy
2007-11-13 17:26 ` Patrick McHardy
2007-11-13 17:30 ` Kok, Auke
2007-11-13 17:30 ` Kok, Auke
2007-11-14 9:42 ` Patrick McHardy
2007-11-14 23:30 ` Kok, Auke
2007-11-14 23:30 ` Kok, Auke
2007-11-13 19:59 ` Kok, Auke
2007-11-13 12:32 ` David Miller
2007-11-13 12:32 ` David Miller
2007-11-13 1:21 ` Joonwoo Park
2007-11-12 22:28 ` David Miller
2007-11-12 22:28 ` David Miller
2007-11-13 20:43 ` Stephen Hemminger
2007-11-13 20:43 ` Stephen Hemminger
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=473A83AD.6030101@foo-projects.org \
--to=sofar@foo-projects.org \
--cc=auke-jan.h.kok@intel.com \
--cc=cfriesen@nortel.com \
--cc=davem@davemloft.net \
--cc=djohnson+linux-kernel@sw.starentnetworks.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=herbert@gondor.apana.org.au \
--cc=joonwpark81@gmail.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=w@1wt.eu \
/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 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.