public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ding Tianhong <dingtianhong@huawei•com>
To: Vlad Yasevich <vyasevich@gmail•com>, <kaber@trash•net>,
	<davem@davemloft•net>, <edumazet@google•com>,
	<vyasevic@redhat•com>, <makita.toshiaki@lab•ntt.co.jp>
Cc: <netdev@vger•kernel.org>
Subject: Re: [PATCH net-next v2 1/3] macvlan: don't update the uc and vlan list for L2 forwarding offload
Date: Fri, 6 Jun 2014 11:45:56 +0800	[thread overview]
Message-ID: <53913974.3080006@huawei.com> (raw)
In-Reply-To: <53908814.8080303@gmail.com>

On 2014/6/5 23:09, Vlad Yasevich wrote:
> On 06/05/2014 08:01 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.
> 
> Same issue as in v1.  Please explain how this actually works, since the
> new address never makes it to the hw.
> 

Hi, vlad:

The fwd only support 82599 nic, and when fwd_priv is true, this means the lowerdev support L2 forwarding offload, and will set the macvlan
to the ixgbe_fwd_adapter->netdev, and then it is clear that the lowerdev could know that the the upper device is macvlan and could handle
the skb to the upperdev.

If I miss something, please remind me, thanks.

Ding

> -vlad
>>
>> 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 {
>>
> 
> 
> 

  parent reply	other threads:[~2014-06-06  3:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 12:01 [PATCH net-next v2 0/3] macvlan: fix some problem if mac address changes Ding Tianhong
2014-06-05 12:01 ` [PATCH net-next v2 1/3] macvlan: don't update the uc and vlan list for L2 forwarding offload Ding Tianhong
2014-06-05 15:09   ` Vlad Yasevich
2014-06-06  1:42     ` Ding Tianhong
2014-06-06  3:45     ` Ding Tianhong [this message]
2014-06-06 17:11       ` Vlad Yasevich
2014-06-07  5:59         ` Ding Tianhong
2014-06-05 12:01 ` [PATCH net-next v2 2/3] net: dev: revert the mac address when notifier failed Ding Tianhong
2014-06-05 12:01 ` [PATCH net-next v2 3/3] 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=53913974.3080006@huawei.com \
    --to=dingtianhong@huawei$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=kaber@trash$(echo .)net \
    --cc=makita.toshiaki@lab$(echo .)ntt.co.jp \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=vyasevic@redhat$(echo .)com \
    --cc=vyasevich@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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