Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp87496ybm; Thu, 28 May 2020 16:51:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+xm/X6rCk4B1pda+1x9qmLXz2r5H8M6MCK25ypTBL7utEVhmV0bnODJskR0qljjE2V31C X-Received: by 2002:a17:906:15cb:: with SMTP id l11mr5101845ejd.224.1590709866831; Thu, 28 May 2020 16:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590709866; cv=none; d=google.com; s=arc-20160816; b=CtJMiIxsm542pjFc34gawFIf4ZkplCrIsl5gQ31Ogxz7IGoTDODesRiA40yq2fbgE4 yrx/xLaDCOE9hN0K7+4DvfvvXjtYuEm9cgRUYe/heAroW7W4r39xrJdtrJ9a/yH2hmpt MdfTyJtsT4+/g67CCoL8m+kVhJTNNjXM1DF17ec5dq3ocEz1YPcH6WwQLb8pxBUfAJ6F j5R3gqMhCC6W6RPatHL6RQ4IqPV3wcZw+j51wsoPgZVuaZpqaUnOzm47B6JI8NgPIuzl qmyCzJKTyp3vVJYr0zcdOI36o/h0UQ4hTaYPPArovIldDEoPm10g5ecua8TpfjR5U7n3 rP5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=9zXVfSo++GI9qUoLfy2sJjDCrj6XdEeY+63UPRVfoH4=; b=gfijf4aDoivR8A/F917b9y1LNKC9N3IPYC49FytKXpGdjHIn0A9rR2rNFWmbnZN6zE 73HFM8B04q+VGGRBQPL8/V0qnu2MQCh+WVhScpgbp0kz+pkz8VxfqNgO8sPP32VY2weg hchM8HwjPibmc1TetHXgHBpxCdMOu+Y8tfCaE7UEpl1SKz68uQNEa7wY1ObPc1B0ZXUK iwjLsuSaudyP1uwaTHgKvnyZH7J1B+oGOFdmzpUP/5q0qpnnTzaYD+fuKoboMAxGc8z1 sz+c1ZoUrsHKzzFwyR/YPrXiNDNkojIuGghPY4/mOcK30Uq8YW+zRhlTxPpczG/0ocKo XEcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jp7si4878068ejb.617.2020.05.28.16.50.43; Thu, 28 May 2020 16:51:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437719AbgE1Xqb convert rfc822-to-8bit (ORCPT + 99 others); Thu, 28 May 2020 19:46:31 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2256 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2437677AbgE1Xq1 (ORCPT ); Thu, 28 May 2020 19:46:27 -0400 Received: from lhreml704-chm.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 3416019FFA0122A31601; Fri, 29 May 2020 00:46:25 +0100 (IST) Received: from lhreml703-chm.china.huawei.com (10.201.108.52) by lhreml704-chm.china.huawei.com (10.201.108.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Fri, 29 May 2020 00:46:24 +0100 Received: from lhreml703-chm.china.huawei.com ([10.201.68.198]) by lhreml703-chm.china.huawei.com ([10.201.68.198]) with mapi id 15.01.1913.007; Fri, 29 May 2020 00:46:24 +0100 From: Salil Mehta To: Jakub Kicinski , tanhuazhong CC: David Miller , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Zhuangyuzeng (Yisen)" , Linuxarm Subject: RE: [PATCH V2 net-next 0/2] net: hns3: adds two VLAN feature Thread-Topic: [PATCH V2 net-next 0/2] net: hns3: adds two VLAN feature Thread-Index: AQHWL2SRCDH7TdC4jUyLacrsUtfjv6iy2UmAgAAnNACAAMiEAIAHZXCAgAEck4CAAbd90A== Date: Thu, 28 May 2020 23:46:24 +0000 Message-ID: References: <1590061105-36478-1-git-send-email-tanhuazhong@huawei.com> <20200521121707.6499ca6b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200521.143726.481524442371246082.davem@davemloft.net> <356be994-7cf9-e7b2-8992-46a70bc6a54b@huawei.com> <20200527123031.7fd4834d@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: <20200527123031.7fd4834d@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.29.93] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jakub/David, > From: Jakub Kicinski [mailto:kuba@kernel.org] > Sent: Wednesday, May 27, 2020 8:31 PM > To: tanhuazhong > Cc: David Miller ; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; Salil Mehta ; > Zhuangyuzeng (Yisen) ; Linuxarm > Subject: Re: [PATCH V2 net-next 0/2] net: hns3: adds two VLAN feature > > On Wed, 27 May 2020 10:31:59 +0800 tanhuazhong wrote: > > Hi, Jakub & David. > > > > For patch#1, is it acceptable adding "ethtool --get-priv-flags" > > to query the VLAN. If yes, I will send a RFC for it. > > The recommended way of implementing vfs with advanced vlan > configurations is via "switchdev mode" & representors. AFAIK, switchdev ops only facilitates the standard abstract interface to any underlying standard or proprietary hardware which could be ASIC, eswitch etc. Therefore, standard tools like ip, bridge or even stacks like FRR etc. could be used while leveraging the below hardware forwarding. Not sure how will switchdev ops will be of help here? Just curious how does Mellanox supports Hybrid port mode? In general, We can have port being configured as Access/Trunk ports. Access port = Only untagged packets are sent or are expected. RX'ed Tagged packets are dropped. Trunk Port = Only Tagged packet are received or sent and any Untagged packets received are dropped. Mellanox also support Hybrid mode in Onyx platform: Hybrid - packets are sent tagged or untagged, the port expects both tagged and untagged packets. This mode is a combination of Access and Trunk modes. There is an option to configure multiple VLANs on the hybrid port. PVID is configured on the port for untagged ingress packets. First two configuration are easy to realize using the standard Linux configuration tools like ip/bridge but not sure about the hybrid? also, why do we even need to create a bridge to realize any of above port modes? Note: HNS hardware does not have eswitch support. Salil.