Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-21 Thread Or Gerlitz
On Fri, Sep 14, 2018 at 10:17 PM, Jesse Brandeburg
 wrote:
> On Fri, 14 Sep 2018 12:10:45 +0300 Or wrote:
>> On Fri, Sep 14, 2018 at 1:31 AM, Jesse Brandeburg
>>  wrote:
>> on what HW ring format do you standardize? do i40e/Fortville and
>> ice/what's-the-intel-code-name?  HWs can/use the same posting/completion
>> descriptor?
>
> The initial ring format is the same as used for XL710/X722 devices, and
> planned be supported for the Intel Ethernet E800 series (ice driver) and
> future VF devices using SR-IOV.
>
>> > This solves 2 issues we saw coming or were already present, the
>> > first was constant code duplication happening with i40e/i40evf,
>> > when much of the duplicate code in the i40evf was not used or was
>> > not needed.
>>
>> could you spare few words on the origin/nature of these duplicates? were them
>> just developer C mistakes for functionality which is irrelevant for
>> a VF? like what?
>> if not, what was there?
>
> In particular, some of the code was not used at all, but was not caught
> by any automation because it was in a header file and included into
> multiple file scopes.  Other big chunk of the duplicate code was for
> the PF's usage of the communication channel to firmware, which for some
> reason was left in the VF driver code (probably just to avoid changing
> the file) - but the VF driver doesn't communicate to firmware, just to
> the PF.
>
>> > The second was to remove the future confusion of why
>> > future VF devices that were not considered "40GbE" only devices
>> > were supported by i40evf.
>>
>> can elaborate further?
>
> The name i40evf was generating customer questions, and was confusing
> when you add in multiple generations of PF hardware that are no longer
> using the i40e driver.
>
>> > The thought is that iavf will be the virtual function driver for
>> > all future devices, so it should have a "generic" name to propery
>> > represent that it is the VF driver for multiple generations of
>> > devices.
>>
>> for that end,  as I think was explained @ the netdev Tokyo AVF session,
>> you would need a mechanism for feature negotiation, is it here or coming up?
>
> The driver already has it (a feature negotitiation), please see the
> function called iavf_send_vf_config_msg, and follow from where it is
> called.  Basically the VF driver negotiates with the PF for what it can
> do, and the PF guarantees that the base set of features will always
> work, with optional advanced features which the code may/may-not have
> in the future.

got it, same goes to the other replies below/above

>
>> >  41 files changed, 3436 insertions(+), 7581 deletions(-)
>>
>> code diet is cool!
>
> Thanks! ~4000 lines less made me very happy too.


Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-14 Thread Jesse Brandeburg
On Fri, 14 Sep 2018 12:10:45 +0300 Or wrote:
> On Fri, Sep 14, 2018 at 1:31 AM, Jesse Brandeburg
>  wrote:
> on what HW ring format do you standardize? do i40e/Fortville and
> ice/what's-the-intel-code-name?  HWs can/use the same posting/completion
> descriptor?

The initial ring format is the same as used for XL710/X722 devices, and
planned be supported for the Intel Ethernet E800 series (ice driver) and
future VF devices using SR-IOV.

> > This solves 2 issues we saw coming or were already present, the
> > first was constant code duplication happening with i40e/i40evf,
> > when much of the duplicate code in the i40evf was not used or was
> > not needed.  
> 
> could you spare few words on the origin/nature of these duplicates? were them
> just developer C mistakes for functionality which is irrelevant for
> a VF? like what?
> if not, what was there?

In particular, some of the code was not used at all, but was not caught
by any automation because it was in a header file and included into
multiple file scopes.  Other big chunk of the duplicate code was for
the PF's usage of the communication channel to firmware, which for some
reason was left in the VF driver code (probably just to avoid changing
the file) - but the VF driver doesn't communicate to firmware, just to
the PF.

> > The second was to remove the future confusion of why
> > future VF devices that were not considered "40GbE" only devices
> > were supported by i40evf.  
> 
> can elaborate further?

The name i40evf was generating customer questions, and was confusing
when you add in multiple generations of PF hardware that are no longer
using the i40e driver.

> > The thought is that iavf will be the virtual function driver for
> > all future devices, so it should have a "generic" name to propery
> > represent that it is the VF driver for multiple generations of
> > devices.  
> 
> for that end,  as I think was explained @ the netdev Tokyo AVF session,
> you would need a mechanism for feature negotiation, is it here or coming up?

The driver already has it (a feature negotitiation), please see the
function called iavf_send_vf_config_msg, and follow from where it is
called.  Basically the VF driver negotiates with the PF for what it can
do, and the PF guarantees that the base set of features will always
work, with optional advanced features which the code may/may-not have
in the future.

> >  41 files changed, 3436 insertions(+), 7581 deletions(-)  
> 
> code diet is cool!

Thanks! ~4000 lines less made me very happy too.


Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-14 Thread Jesse Brandeburg
On Fri, 14 Sep 2018 13:39:17 +0900 Benjamin wrote:
> > Jesse Brandeburg (14):
> >   intel-ethernet: rename i40evf to iavf  
> 
> Seems like patch 1 didn't make it to netdev
> https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20180910/014025.html

Hi Ben, Thanks for the note, I don't know why it didn't show up for
you, it's here if you want to take a look:
https://patchwork.ozlabs.org/patch/969557/



Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-14 Thread Or Gerlitz
On Fri, Sep 14, 2018 at 1:31 AM, Jesse Brandeburg
 wrote:

Hi Jesse,

> This series contains changes to i40evf so that it becomes a more
> generic virtual function driver for current and future silicon.
>
> While doing the rename of i40evf to a more generic name of iavf,
> we also put the driver on a severe diet due to how much of the
> code was unneeded or was unused.  The outcome is a lean and mean
> virtual function driver that continues to work on existing 40GbE
> (i40e) virtual devices and prepped for future supported devices,
> like the 100GbE (ice) virtual devices.

on what HW ring format do you standardize? do i40e/Fortville and
ice/what's-the-intel-code-name?  HWs can/use the same posting/completion
descriptor?

> This solves 2 issues we saw coming or were already present, the
> first was constant code duplication happening with i40e/i40evf,
> when much of the duplicate code in the i40evf was not used or was
> not needed.

could you spare few words on the origin/nature of these duplicates? were them
just developer C mistakes for functionality which is irrelevant for
a VF? like what?
if not, what was there?

> The second was to remove the future confusion of why
> future VF devices that were not considered "40GbE" only devices
> were supported by i40evf.

can elaborate further?

> The thought is that iavf will be the virtual function driver for
> all future devices, so it should have a "generic" name to propery
> represent that it is the VF driver for multiple generations of
> devices.

for that end,  as I think was explained @ the netdev Tokyo AVF session,
you would need a mechanism for feature negotiation, is it here or coming up?


>  41 files changed, 3436 insertions(+), 7581 deletions(-)

code diet is cool!


Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-13 Thread Benjamin Poirier
On 2018/09/13 15:31, Jesse Brandeburg wrote:
[...]
> 
> ---
> v1: initial RFC
> 
> Jesse Brandeburg (14):
>   intel-ethernet: rename i40evf to iavf

Seems like patch 1 didn't make it to netdev
https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20180910/014025.html

>   iavf: diet and reformat
>   iavf: rename functions and structs to new name
>   iavf: rename i40e_status to iavf_status
>   iavf: move i40evf files to new name
>   iavf: remove references to old names
>   iavf: rename device ID defines
>   iavf: rename I40E_ADMINQ_DESC
>   iavf: rename i40e_hw to iavf_hw
>   iavf: replace i40e_debug with iavf version
>   iavf: tracing infrastructure rename
>   iavf: rename most of i40e strings
>   iavf: finish renaming files to iavf
>   intel-ethernet: use correct module license


Re: [RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-13 Thread David Miller
From: Jesse Brandeburg 
Date: Thu, 13 Sep 2018 15:31:30 -0700

> This series contains changes to i40evf so that it becomes a more
> generic virtual function driver for current and future silicon.
> 
> While doing the rename of i40evf to a more generic name of iavf,
> we also put the driver on a severe diet due to how much of the
> code was unneeded or was unused.  The outcome is a lean and mean
> virtual function driver that continues to work on existing 40GbE
> (i40e) virtual devices and prepped for future supported devices,
> like the 100GbE (ice) virtual devices.
> 
> This solves 2 issues we saw coming or were already present, the
> first was constant code duplication happening with i40e/i40evf,
> when much of the duplicate code in the i40evf was not used or was
> not needed.  The second was to remove the future confusion of why
> future VF devices that were not considered "40GbE" only devices
> were supported by i40evf.
> 
> The thought is that iavf will be the virtual function driver for
> all future devices, so it should have a "generic" name to propery
> represent that it is the VF driver for multiple generations of
> devices.

Having a common vf driver for current and future devices is a major
accomplishment and I fully support these changes.

Nice work!

> Known Caveats:
> This may cause some user confusion, especially for Kconfig not
> migrating cleanly to the new CONFIG_IAVF from CONFIG_I40EVF.
> 
> Existing user configurations may have to change, but the module
> alias in patch 1 helps a bit here.

You can deal with this by retaining the existing I40EVF Kconfig
knob and just let it 'select' IAVF.


[RFC PATCH net-next v1 00/14] rename and shrink i40evf

2018-09-13 Thread Jesse Brandeburg
This series contains changes to i40evf so that it becomes a more
generic virtual function driver for current and future silicon.

While doing the rename of i40evf to a more generic name of iavf,
we also put the driver on a severe diet due to how much of the
code was unneeded or was unused.  The outcome is a lean and mean
virtual function driver that continues to work on existing 40GbE
(i40e) virtual devices and prepped for future supported devices,
like the 100GbE (ice) virtual devices.

This solves 2 issues we saw coming or were already present, the
first was constant code duplication happening with i40e/i40evf,
when much of the duplicate code in the i40evf was not used or was
not needed.  The second was to remove the future confusion of why
future VF devices that were not considered "40GbE" only devices
were supported by i40evf.

The thought is that iavf will be the virtual function driver for
all future devices, so it should have a "generic" name to propery
represent that it is the VF driver for multiple generations of
devices.

Known Caveats:
This may cause some user confusion, especially for Kconfig not
migrating cleanly to the new CONFIG_IAVF from CONFIG_I40EVF.

Existing user configurations may have to change, but the module
alias in patch 1 helps a bit here.

---
v1: initial RFC

Jesse Brandeburg (14):
  intel-ethernet: rename i40evf to iavf
  iavf: diet and reformat
  iavf: rename functions and structs to new name
  iavf: rename i40e_status to iavf_status
  iavf: move i40evf files to new name
  iavf: remove references to old names
  iavf: rename device ID defines
  iavf: rename I40E_ADMINQ_DESC
  iavf: rename i40e_hw to iavf_hw
  iavf: replace i40e_debug with iavf version
  iavf: tracing infrastructure rename
  iavf: rename most of i40e strings
  iavf: finish renaming files to iavf
  intel-ethernet: use correct module license

 Documentation/networking/00-INDEX  |4 +-
 Documentation/networking/{i40evf.txt => iavf.txt}  |   16 +-
 MAINTAINERS|2 +-
 drivers/net/ethernet/intel/Kconfig |   12 +-
 drivers/net/ethernet/intel/Makefile|2 +-
 drivers/net/ethernet/intel/e100.c  |2 +-
 drivers/net/ethernet/intel/e1000/e1000_main.c  |2 +-
 drivers/net/ethernet/intel/e1000e/netdev.c |2 +-
 drivers/net/ethernet/intel/fm10k/fm10k_main.c  |2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c|2 +-
 drivers/net/ethernet/intel/i40evf/i40e_devids.h|   34 -
 drivers/net/ethernet/intel/i40evf/i40e_hmc.h   |  215 --
 drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h   |  158 --
 drivers/net/ethernet/intel/i40evf/i40e_register.h  |  313 ---
 .../net/ethernet/intel/{i40evf => iavf}/Makefile   |   11 +-
 .../ethernet/intel/{i40evf => iavf}/i40e_adminq.c  |  309 ++-
 .../ethernet/intel/{i40evf => iavf}/i40e_adminq.h  |   35 +-
 .../intel/{i40evf => iavf}/i40e_adminq_cmd.h   | 2280 +---
 .../intel/{i40evf/i40evf.h => iavf/iavf.h} |  407 ++--
 .../{i40evf/i40e_alloc.h => iavf/iavf_alloc.h} |   47 +-
 .../{i40evf/i40evf_client.c => iavf/iavf_client.c} |  200 +-
 .../{i40evf/i40evf_client.h => iavf/iavf_client.h} |   30 +-
 .../{i40evf/i40e_common.c => iavf/iavf_common.c}   | 1105 --
 drivers/net/ethernet/intel/iavf/iavf_devids.h  |   12 +
 .../i40evf_ethtool.c => iavf/iavf_ethtool.c}   |  510 +++--
 .../{i40evf/i40evf_main.c => iavf/iavf_main.c} | 1688 ---
 .../{i40evf/i40e_osdep.h => iavf/iavf_osdep.h} |   28 +-
 .../i40e_prototype.h => iavf/iavf_prototype.h} |  147 +-
 drivers/net/ethernet/intel/iavf/iavf_register.h|   68 +
 .../{i40evf/i40e_status.h => iavf/iavf_status.h}   |8 +-
 .../{i40evf/i40e_trace.h => iavf/iavf_trace.h} |   86 +-
 .../intel/{i40evf/i40e_txrx.c => iavf/iavf_txrx.c} |  804 +++
 .../intel/{i40evf/i40e_txrx.h => iavf/iavf_txrx.h} |  359 ++-
 .../intel/{i40evf/i40e_type.h => iavf/iavf_type.h} | 1604 --
 .../i40evf_virtchnl.c => iavf/iavf_virtchnl.c} |  501 +++--
 drivers/net/ethernet/intel/ice/ice_main.c  |2 +-
 drivers/net/ethernet/intel/igb/igb_main.c  |2 +-
 drivers/net/ethernet/intel/igbvf/netdev.c  |2 +-
 drivers/net/ethernet/intel/ixgb/ixgb_main.c|2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  |2 +-
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c  |2 +-
 41 files changed, 3436 insertions(+), 7581 deletions(-)
 rename Documentation/networking/{i40evf.txt => iavf.txt} (72%)
 delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_devids.h
 delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_hmc.h
 delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h
 delete mode 100644 drivers/net/ethernet/intel/i40evf/i40e_register.h
 rename drivers/net/ethernet/intel/{i40evf => iavf}/Makefile (38%)
 rename drivers/net/ethernet/intel/{i40evf =>