All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.r.fastabend@intel.com>
To: Vlad Yasevich <vyasevich@gmail.com>,
	Ding Tianhong <dingtianhong@huawei.com>,
	kaber@trash.net, davem@davemloft.net, edumazet@google.com,
	vyasevic@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/4] macvlan: don't update the uc and vlan list for L2 forwarding offload
Date: Thu, 05 Jun 2014 07:12:24 -0700	[thread overview]
Message-ID: <53907AC8.50607@intel.com> (raw)
In-Reply-To: <5390761A.5030808@gmail.com>

On 6/5/2014 6:52 AM, Vlad Yasevich wrote:
> On 06/05/2014 02:50 AM, Ding Tianhong wrote:
>> If lowerdev supports L2 forwarding offload, no need to set mac address
>> to uc list and vlan list, so also don't do that when the macvlan mac address
>> changes.
>>
>
> Are you sure about this?  How would the lower dev receive traffic
> destined to the new HW address if it is not in the device unicast filter
> list?

I don't think the offload path works as it is either though (need to
test). The issue is sync'ing with the lowerdev doesn't give the lowerdev
any information on which fwd_priv to set so the lowerdev sets the normal
path with the address. It won't "break" traffic just receive flows wont
use the direct hardware queues. This will be a bigger issue once we get
support for metering and hardware ACLs.

Agreed though, Ding how does this work? Looks like a step back to me. At
very least can we get the commit message to explain this a bit better.

.John

>> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
>> ---
>>   drivers/net/macvlan.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
>> index 453d55a..c3a54a6 100644
>> --- a/drivers/net/macvlan.c
>> +++ b/drivers/net/macvlan.c
>> @@ -515,7 +515,7 @@ static int macvlan_sync_address(struct net_device *dev, unsigned char *addr)
>>   	struct net_device *lowerdev = vlan->lowerdev;
>>   	int err;
>>
>> -	if (!(dev->flags & IFF_UP)) {
>> +	if (!(dev->flags & IFF_UP) || vlan->fwd_priv) {
>>   		/* Just copy in the new address */
>>   		ether_addr_copy(dev->dev_addr, addr);
>>   	} else {
>>
>
> --
> 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
>

  reply	other threads:[~2014-06-05 14:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05  6:50 [PATCH net-next 0/4] macvlan: fix some problem if mac address changes Ding Tianhong
2014-06-05  6:50 ` [PATCH net-next 1/4] macvlan: don't update the uc and vlan list for L2 forwarding offload Ding Tianhong
2014-06-05 13:52   ` Vlad Yasevich
2014-06-05 14:12     ` John Fastabend [this message]
2014-06-05  6:50 ` [PATCH net-next 2/4] net: dev: don't set the same mac address for netdev Ding Tianhong
2014-06-05  9:09   ` Toshiaki Makita
2014-06-05  9:50     ` Ding Tianhong
2014-06-05 10:51       ` Toshiaki Makita
2014-06-05 11:42         ` Ding Tianhong
2014-06-05 14:06       ` Vlad Yasevich
2014-06-06  3:54         ` Ding Tianhong
2014-06-06 14:09           ` Vlad Yasevich
2014-06-07  5:53             ` Ding Tianhong
2014-06-05  6:50 ` [PATCH net-next 3/4] net: dev: revert the mac address when notifier failed Ding Tianhong
2014-06-05  6:50 ` [PATCH net-next 4/4] macvlan: don't set the same mac address for non-passthru mode Ding Tianhong

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=53907AC8.50607@intel.com \
    --to=john.r.fastabend@intel.com \
    --cc=davem@davemloft.net \
    --cc=dingtianhong@huawei.com \
    --cc=edumazet@google.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevic@redhat.com \
    --cc=vyasevich@gmail.com \
    /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.