From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5C42C04AB4 for ; Sat, 18 May 2019 03:10:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9518621744 for ; Sat, 18 May 2019 03:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727808AbfERDKi (ORCPT ); Fri, 17 May 2019 23:10:38 -0400 Received: from m97188.mail.qiye.163.com ([220.181.97.188]:12264 "EHLO smtp.qiye.163.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727073AbfERDKh (ORCPT ); Fri, 17 May 2019 23:10:37 -0400 Received: from [192.168.1.5] (unknown [58.38.1.117]) by smtp.qiye.163.com (Hmail) with ESMTPA id 8C827962962; Sat, 18 May 2019 11:10:32 +0800 (CST) Subject: Re: [PATCH] net/mlx5e: restrict the real_dev of vlan device is the same as uplink device To: Saeed Mahameed , Gavi Teitz , Roi Dayan , Vlad Buslov , Jianbo Liu Cc: "netdev@vger.kernel.org" References: <1557912345-14649-1-git-send-email-wenxu@ucloud.cn> <32affe9e97f26ff1c7b5993255a6783533fe6bff.camel@mellanox.com> From: wenxu Message-ID: Date: Sat, 18 May 2019 11:10:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <32affe9e97f26ff1c7b5993255a6783533fe6bff.camel@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kIGBQJHllBWVZKVUJDTEtLS0hPTUpDSExDWVdZKFlBSUI3V1ktWUFJV1 kJDhceCFlBWTU0KTY6NyQpLjc#WQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Ohw6Nzo*Tzg6Ki4aEEIdODAc IyhPCgtVSlVKTk5DSk9CS0hJQ0xNVTMWGhIXVQweFQMOOw4YFxQOH1UYFUVZV1kSC1lBWU5DVUhD VUpVSkpMWVdZCAFZQUlCQkk3Bg++ X-HM-Tid: 0a6ac8eb6b6d20bckuqy8c827962962 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There will be multiple vlan device which maybe not belong to the uplink rep device, so wen can limit it 在 2019/5/18 4:30, Saeed Mahameed 写道: > On Wed, 2019-05-15 at 17:25 +0800, wenxu@ucloud.cn wrote: >> From: wenxu >> >> When register indr block for vlan device, it should check the >> real_dev >> of vlan device is same as uplink device. Or it will set offload rule >> to mlx5e which will never hit. >> > I would improve the commit message, it is not really clear to me what > is going on here. > > Anyway Roi and team, can you please provide feedback .. > >> Signed-off-by: wenxu >> --- >> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c >> b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c >> index 91e24f1..a39fdac 100644 >> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c >> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c >> @@ -796,7 +796,7 @@ static int mlx5e_nic_rep_netdevice_event(struct >> notifier_block *nb, >> struct net_device *netdev = netdev_notifier_info_to_dev(ptr); >> >> if (!mlx5e_tc_tun_device_to_offload(priv, netdev) && >> - !is_vlan_dev(netdev)) >> + !(is_vlan_dev(netdev) && vlan_dev_real_dev(netdev) == >> rpriv->netdev)) >> return NOTIFY_OK; >> >> switch (event) {