From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH net-next 11/18] vxlan: Add netif_is_vxlan() Date: Mon, 15 Oct 2018 13:33:23 -0700 Message-ID: <20181015133323.790f3059@xeon-e3> References: <20181013171725.3261-1-idosch@mellanox.com> <20181013171725.3261-12-idosch@mellanox.com> <20181015115756.13b6c0da@cakuba.netronome.com> <20181015195748.GA25940@splinter> <20181015131642.4bd6e564@xeon-e3> <20181015202741.GA27066@splinter> <20181015133041.6118aab1@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Ido Schimmel , Ido Schimmel , netdev@vger.kernel.org To: Jakub Kicinski Return-path: Received: from mail-pg1-f194.google.com ([209.85.215.194]:38596 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbeJPEUR (ORCPT ); Tue, 16 Oct 2018 00:20:17 -0400 Received: by mail-pg1-f194.google.com with SMTP id f8-v6so9701830pgq.5 for ; Mon, 15 Oct 2018 13:33:26 -0700 (PDT) In-Reply-To: <20181015133041.6118aab1@cakuba.netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 15 Oct 2018 13:30:41 -0700 Jakub Kicinski wrote: > On Mon, 15 Oct 2018 23:27:41 +0300, Ido Schimmel wrote: > > On Mon, Oct 15, 2018 at 01:16:42PM -0700, Stephen Hemminger wrote: > > > On Mon, 15 Oct 2018 22:57:48 +0300 > > > Ido Schimmel wrote: > > > > > > > On Mon, Oct 15, 2018 at 11:57:56AM -0700, Jakub Kicinski wrote: > > > > > On Sat, 13 Oct 2018 17:18:38 +0000, Ido Schimmel wrote: > > > > > > Add the ability to determine whether a netdev is a VxLAN netdev by > > > > > > calling the above mentioned function that checks the netdev's private > > > > > > flags. > > > > > > > > > > > > This will allow modules to identify netdev events involving a VxLAN > > > > > > netdev and act accordingly. For example, drivers capable of VxLAN > > > > > > offload will need to configure the underlying device when a VxLAN netdev > > > > > > is being enslaved to an offloaded bridge. > > > > > > > > > > > > Signed-off-by: Ido Schimmel > > > > > > Reviewed-by: Petr Machata > > > > > > > > > > Is this preferable over > > > > > > > > > > !strcmp(netdev->rtnl_link_ops->kind, "vxlan") > > > > > > > > > > which is what TC offloads do? > > > > > > > > Using a flag seemed like the more standard way. > > > > > > > > That being said, we considered using net_device_ops instead, given we > > > > are about to run out of available private flags, so I don't mind > > > > adopting a technique already employed by another driver. > > > > > > > > P.S. Had to Cc netdev again. I think your client somehow messed the Cc > > > > list? I see Cc list in your reply, but with back slashes at the end of > > > > two email addresses. > > > > > > Agree that using a global resource bit in flags is probably overkill. > > > If you can use kind that would be good example for other drivers as well. > > > > OK, will change. > > > > Jakub, any objections if I implement netif_is_vxlan() using 'kind' and > > convert nfp to use the helper? Having all these helpers in the same > > location will increase the chances of others reusing them. > > Sounds very good :) We could even do this for bridge, and other devices that are using private flags.