From mboxrd@z Thu Jan 1 00:00:00 1970 From: Saeed Mahameed Subject: Re: [PATCH net-next 1/4] mlx5: Make building eswitch configurable Date: Fri, 27 Jan 2017 23:15:56 +0200 Message-ID: References: <20170126233241.2268449-1-tom@herbertland.com> <20170126233241.2268449-2-tom@herbertland.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Or Gerlitz , Saeed Mahameed , David Miller , Linux Netdev List , Kernel Team To: Tom Herbert Return-path: Received: from mail-qt0-f174.google.com ([209.85.216.174]:34853 "EHLO mail-qt0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbdA0Vqr (ORCPT ); Fri, 27 Jan 2017 16:46:47 -0500 Received: by mail-qt0-f174.google.com with SMTP id x49so157235270qtc.2 for ; Fri, 27 Jan 2017 13:46:46 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Jan 27, 2017 at 8:42 PM, Tom Herbert wrote: > On Fri, Jan 27, 2017 at 10:28 AM, Saeed Mahameed > wrote: >> On Fri, Jan 27, 2017 at 8:16 PM, Tom Herbert wrote: >>> On Fri, Jan 27, 2017 at 10:05 AM, Saeed Mahameed >>> wrote: >>>> On Fri, Jan 27, 2017 at 7:50 PM, Tom Herbert wrote: >>>>> On Fri, Jan 27, 2017 at 9:38 AM, Saeed Mahameed >>>>> wrote: >>>>>> On Fri, Jan 27, 2017 at 7:34 AM, Or Gerlitz wrote: >>>>>>> On Fri, Jan 27, 2017 at 1:32 AM, Tom Herbert wrote: >>>>>>>> Add a configuration option (CONFIG_MLX5_CORE_ESWITCH) for controlling >>>>>>>> whether the eswitch code is built. Change Kconfig and Makefile >>>>>>>> accordingly. >>>>>>> >>>>>>> Tom, FWIW, please note that the basic e-switch functionality is needed >>>>>>> also when SRIOV isn't of use, this is for a multi host configuration. >>>>>>> >>>>>> >>>>>> Right, set_l2_table_entry@eswitch.c need to be called by PF for any UC >>>>>> MAC address wanted by VF or PF. >>>>>> To keep one flow in the code, the implementation is done as part of eswitch. >>>>>> >>>>>> so in multi-host configuration (where there are 4 PFs) each PF should >>>>>> invoke set_l2_table_entry_cmd for each one of its own UC MACs. >>>>>> >>>>>> populating the l2 table is done using the whole eswitch event driven >>>>>> mechanisms, it is not easy and IMH not right to separate eswitch >>>>>> tables from l2 table (same management logic, different tables). >>>>>> >>>>>> Anyways as Or stated this is just an FYI, eswitch needs to be enabled >>>>>> on Multi-host configuration. >>>>>> >>>>> What indicate a multi-host configuration? >>>> >>>> nothing in the driver, it is transparent. >>>> >>> So then we always need the eswitch code to be built even if someone >>> never uses any of it? >>> >> >> yes. >> but for your convenience all you need is to compile eswitch.c. >> esiwtch_offoalds.c and en_rep.c can be compiled out for basic ethernet. >> > Well eswitch.c is 2200 LOC. en_rep.c and eswitch_offloads.c are 1600 > LOC. If we _must_ have eswitch.c then there's probably not much point > then. But I am still finding it hard to fathom that eswitch has now > become a mandatory component of Ethernet drivers/devices. > It is only mandatory for configurations that needs eswitch, where the driver has no way to know about them, for a good old bare metal box, eswitch is not needed. we can do some work to strip the l2 table logic - needed for PFs to work on multi-host - out of eswitch but again that would further complicate the driver code since eswitch will still need to update l2 tables for VFs. > Tom > >>>>> >>>>>>> Or. >>>>>>> >>>>>>> My WW (and same for the rest of the IL team..) has ended so I will be >>>>>>> able to further look on this series and comment on Sunday.