[PATCH net-next V3 0/9] liquidio CN23XX VF support

2016-10-25 Thread Raghu Vatsavayi
Dave,

Following is the V3 patch series for adding VF support on
CN23XX devices. This version addressed:
1) Your concern for ordering of local variable declarations
   from longest to shortest line.
2) As recommended by you removed custom module parameter max_vfs.
3) Minor changes for fixing new checkpatch script related 
   errors on pre-existing driver.

I will post remaining VF patches soon after this patchseries is
applied. Please apply patches in the following order as some of
the patches depend on earlier patches.

Thanks.


Raghu Vatsavayi (9):
  liquidio CN23XX: HW config for VF support
  liquidio CN23XX: sysfs VF config support
  liquidio CN23XX: Mailbox support
  liquidio CN23XX: mailbox interrupt processing
  liquidio CN23XX: VF related operations
  liquidio CN23XX: device states
  liquidio CN23XX: code cleanup
  liquidio CN23XX: copyrights changes and alignment
  liquidio CN23XX: fix for new check patch errors

 drivers/net/ethernet/cavium/liquidio/Makefile  |   1 +
 .../ethernet/cavium/liquidio/cn23xx_pf_device.c| 357 ++---
 .../ethernet/cavium/liquidio/cn23xx_pf_device.h|  42 +-
 .../net/ethernet/cavium/liquidio/cn23xx_pf_regs.h  |  51 ++-
 .../net/ethernet/cavium/liquidio/cn66xx_device.c   |  49 +--
 .../net/ethernet/cavium/liquidio/cn66xx_device.h   |  41 +-
 drivers/net/ethernet/cavium/liquidio/cn66xx_regs.h |  49 +--
 .../net/ethernet/cavium/liquidio/cn68xx_device.c   |  38 +-
 .../net/ethernet/cavium/liquidio/cn68xx_device.h   |  37 +-
 drivers/net/ethernet/cavium/liquidio/cn68xx_regs.h |  37 +-
 drivers/net/ethernet/cavium/liquidio/lio_core.c|  68 +++-
 drivers/net/ethernet/cavium/liquidio/lio_ethtool.c |  65 ++-
 drivers/net/ethernet/cavium/liquidio/lio_main.c| 442 ++---
 .../net/ethernet/cavium/liquidio/liquidio_common.h | 100 +++--
 .../net/ethernet/cavium/liquidio/liquidio_image.h  |  36 +-
 .../net/ethernet/cavium/liquidio/octeon_config.h   |  46 ++-
 .../net/ethernet/cavium/liquidio/octeon_console.c  | 156 
 .../net/ethernet/cavium/liquidio/octeon_device.c   |  74 ++--
 .../net/ethernet/cavium/liquidio/octeon_device.h   | 133 ---
 drivers/net/ethernet/cavium/liquidio/octeon_droq.c |  91 +++--
 drivers/net/ethernet/cavium/liquidio/octeon_droq.h |  18 +-
 drivers/net/ethernet/cavium/liquidio/octeon_iq.h   |  25 +-
 .../net/ethernet/cavium/liquidio/octeon_mailbox.c  | 318 +++
 .../net/ethernet/cavium/liquidio/octeon_mailbox.h  | 112 ++
 drivers/net/ethernet/cavium/liquidio/octeon_main.h |  47 +--
 .../net/ethernet/cavium/liquidio/octeon_mem_ops.c  |   7 +-
 .../net/ethernet/cavium/liquidio/octeon_mem_ops.h  |   5 +-
 .../net/ethernet/cavium/liquidio/octeon_network.h  |  11 +-
 drivers/net/ethernet/cavium/liquidio/octeon_nic.c  |   5 +-
 drivers/net/ethernet/cavium/liquidio/octeon_nic.h  |   7 +-
 .../net/ethernet/cavium/liquidio/request_manager.c |  34 +-
 .../ethernet/cavium/liquidio/response_manager.c|  11 +-
 .../ethernet/cavium/liquidio/response_manager.h|   6 +-
 33 files changed, 1733 insertions(+), 786 deletions(-)
 create mode 100644 drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
 create mode 100644 drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h

-- 
1.8.3.1



Re: [PATCH net-next V3 0/9] liquidio CN23XX VF support

2016-10-29 Thread David Miller
From: Raghu Vatsavayi 
Date: Tue, 25 Oct 2016 17:57:01 -0700

> 2) As recommended by you removed custom module parameter max_vfs.

I feel the same way about num_queues_per_{p,v}f.

What's really strange is that there is a reference to num_queues_per_pf
in one of the kernel log messages already.


RE: [PATCH net-next V3 0/9] liquidio CN23XX VF support

2016-10-31 Thread Vatsavayi, Raghu

Hi Dave,

Regarding module parameters num_queues_per_{p,v}f, in non-default case if user 
wants to have multiple queues then because of the way Liquidio HW works we need 
num_queues_per_pf and num_queues_per_vf module parameters at HW/module init 
time. This is because in multi-queues per VF scenario, HW has to carve these 
queues before FW can start communicating with PF/VF host drivers. So we must 
include these two parameters incase more than queue is needed by VF.

I did not get reply from you when I requested you for confirmation couple of 
weeks back about the same two module parameters as shown in the mail 
attachment. 

So please confirm if you want us to remove these two parameters 
num_queues_per_{p,v}f. Then I can remove these module parameters and resubmit 
the patches. 

Thanks and Regards
Raghu.




> -Original Message-
> From: David Miller [mailto:da...@davemloft.net]
> Sent: Saturday, October 29, 2016 11:31 AM
> To: Vatsavayi, Raghu
> Cc: netdev@vger.kernel.org
> Subject: Re: [PATCH net-next V3 0/9] liquidio CN23XX VF support
> 
> From: Raghu Vatsavayi 
> Date: Tue, 25 Oct 2016 17:57:01 -0700
> 
> > 2) As recommended by you removed custom module parameter max_vfs.
> 
> I feel the same way about num_queues_per_{p,v}f.
> 
> What's really strange is that there is a reference to num_queues_per_pf in
> one of the kernel log messages already.
--- Begin Message ---


> -Original Message-
> From: David Miller [mailto:da...@davemloft.net]
> Sent: Thursday, October 20, 2016 1:57 PM
> To: Vatsavayi, Raghu
> Cc: netdev@vger.kernel.org; Chickles, Derek; Burla, Satananda; Manlunas,
> Felix
> Subject: Re: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for VF
> support
> 
> From: "Vatsavayi, Raghu" 
> Date: Thu, 20 Oct 2016 20:01:37 +
> 
> >
> >
> >> -Original Message-
> >> From: David Miller [mailto:da...@davemloft.net]
> >> Sent: Thursday, October 20, 2016 11:13 AM
> >> To: Vatsavayi, Raghu
> >> Cc: netdev@vger.kernel.org; Vatsavayi, Raghu; Chickles, Derek; Burla,
> >> Satananda; Manlunas, Felix
> >> Subject: Re: [PATCH net-next V2 1/9] liquidio CN23XX: HW config for
> >> VF support
> >>
> >> From: Raghu Vatsavayi 
> >> Date: Wed, 19 Oct 2016 22:40:38 -0700
> >>
> >> > +/* Default behaviour of Liquidio is to provide one queue per VF.
> >> > +But Liquidio
> >> > + * can also provide multiple queues to each VF. If user wants to
> >> > +change the
> >> > + * default behaviour HW should be provided configuration info at
> >> > +init time,
> >> > + * based on which it will create control queues for communicating
> >> > +with
> >> FW.
> >> > + */
> >> > +static u32 max_vfs[2] = { 0, 0 };
> >> > +module_param_array(max_vfs, int, NULL, 0444);
> >> > +MODULE_PARM_DESC(max_vfs, "Assign two comma-separated
> unsigned
> >> > +integers that specify max number of VFs for PF0 (left of the
> >> > +comma) and PF1 (right of the comma); for 23xx only. By default HW
> >> > +will configure as many VFs as queues after allocating PF queues.To
> >> > +increase queues for VF use this parameter. Use sysfs to create
> >> > +these VFs.");
> >> > +
> >> > +static unsigned int num_queues_per_pf[2] = { 0, 0 };
> >> > +module_param_array(num_queues_per_pf, uint, NULL, 0444);
> >> > +MODULE_PARM_DESC(num_queues_per_pf, "two comma-separated
> >> unsigned
> >> > +integers that specify number of queues per PF0 (left of the comma)
> >> > +and PF1 (right of the comma); for 23xx only");
> >> > +
> >> >  static int ptp_enable = 1;
> >>
> >> We cannot continue to allow drivers to add custom module parameters
> >> to control this.  It is the worst user experience possible.
> >>
> >> We need a tree-wide generic, consistent, manner in which to configure
> >> and control this kind of thing.
> >
> > Sure Dave, I will remove max_vfs module parameter and will use tree
> > wide generic sysfs interface to enable VFs.
> 
> That's not what I meant.
> 
> I mean there needs to be a generic mechanism that isn't a per-device knob
> (be it a module parameter or a sysctl, to me these are identical functionality
> and user experience wise).
> 
> Something like ethtool or netlink.

Dave, I will remove max_vfs module parameter and will just use the generic 
mechanism that all drivers do like:

" echo 10 > /sys/devices/pci:00/:00:03.0/:03:00.1/sriov_numvfs"

Regarding other module parameters, in non-default case if user wants to have 
multiple queues then because of the way Liquidio HW works we need 
num_queues_per_pf and num_queues_per_vf module parameters at HW/module init 
time. This is because in multi-queues per VF scenario, HW has to carve these 
queues before FW can start communicating with PF/VF host drivers, so we must 
include these two parameters. 

Please confirm that having these two module parameters is fine for non-default 
case. I will soon forward you the patches with these changes that you have 
recommended.

Thanks Much
Raghu.
--- End Message ---


Re: [PATCH net-next V3 0/9] liquidio CN23XX VF support

2016-10-31 Thread David Miller
From: "Vatsavayi, Raghu" 
Date: Mon, 31 Oct 2016 07:21:27 +

> So please confirm if you want us to remove these two parameters
> num_queues_per_{p,v}f. Then I can remove these module parameters and
> resubmit the patches.

Yes.

We cannot allow drivers to keep adding unique ways to configure these
things.

There has to be a generic, consistent, mechanism the user can use
to control these parameters.  Rather than a per-driver unique one.