Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd driver

From: "Chen Jing D(Mark)" <jing.d.chen@...>

The patch set add poll mode driver for the host interface of Intel
Red Rock Canyon silicon, which integrates NIC and switch functionalities.
The patch set include below features:

1. Basic RX/TX functions for PF/VF.
2. Interrupt handling mechanism for PF/VF.
3. per queue start/stop functions for PF/VF.
4. Mailbox handling between PF/VF and PF/Switch Manager.
5. Receive Side Scaling (RSS) for PF/VF.
6. Scatter receive function for PF/VF.
7. reta update/query for PF/VF.
8. VLAN filter set for PF.
9. Link status query for PF/VF.

Jeff Shaw (18):
  fm10k: add base driver
  Change config/ files to add macros for fm10k
  fm10k: Add empty fm10k files
  fm10k: add fm10k device id
  fm10k: Add code to register fm10k pmd PF driver
  fm10k: add reta update/requery functions
  fm10k: add rx_queue_setup/release function
  fm10k: add tx_queue_setup/release function
  fm10k: add RX/TX single queue start/stop function
  fm10k: add dev start/stop functions
  fm10k: add receive and tranmit function
  fm10k: add PF RSS support
  fm10k: Add scatter receive function
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 02/18] Change config/ files to add macros for fm10k

From: Jeff Shaw <jeffrey.b.shaw@...>

Change config/common_bsdapp and config/common_linuxapp, add macros
to control fm10k pmd driver compile for linux and bsd.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 config/common_bsdapp   |    9 +++++++++
 config/common_linuxapp |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 9177db1..b2fa259 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
 <at>  <at>  -182,6 +182,15  <at>  <at>  CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4
 CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1

 #
+# Compile burst-oriented FM10K PMD
+#
+CONFIG_RTE_LIBRTE_FM10K_PMD=y
+CONFIG_RTE_LIBRTE_FM10K_DEBUG=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
+CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y
+
+#
 # Compile burst-oriented Cisco ENIC PMD driver
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 04/18] fm10k: add fm10k device id

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k device ID list into rte_pci_dev_ids.h.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index c922de9..f54800e 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
 <at>  <at>  -132,6 +132,14  <at>  <at> 
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif

+#ifndef RTE_PCI_DEV_ID_DECL_FM10K
+#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
 <at>  <at>  -474,6 +482,12  <at>  <at>  RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B)
(Continue reading)

Neil Horman | 31 Jan 15:19 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

On Fri, Jan 30, 2015 at 01:07:20PM +0800, Chen Jing D(Mark) wrote:
> From: Jeff Shaw <jeffrey.b.shaw@...>
> 
> Add fm10k device ID list into rte_pci_dev_ids.h.
> 
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  lib/librte_eal/common/include/rte_pci_dev_ids.h |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> index c922de9..f54800e 100644
> --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
>  <at>  <at>  -132,6 +132,14  <at>  <at> 
>  #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
>  #endif
>  
> +#ifndef RTE_PCI_DEV_ID_DECL_FM10K
> +#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
> +#endif
> +
> +#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
> +#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
> +#endif
> +
I know this isn't the job of this patch series, but I don't really understand
why we bother with this pattern for filling out pci id tables.  A PMD supports
specific hardware, we might as well use the generic RTE_PCI_DEVICE macro in the
(Continue reading)

David Marchand | 31 Jan 17:07 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

On Sat, Jan 31, 2015 at 3:19 PM, Neil Horman <nhorman@...> wrote:

> On Fri, Jan 30, 2015 at 01:07:20PM +0800, Chen Jing D(Mark) wrote:
> > From: Jeff Shaw <jeffrey.b.shaw@...>
> >
> > Add fm10k device ID list into rte_pci_dev_ids.h.
> >
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > ---
> >  lib/librte_eal/common/include/rte_pci_dev_ids.h |   22
> ++++++++++++++++++++++
> >  1 files changed, 22 insertions(+), 0 deletions(-)
> >
> > diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > index c922de9..f54800e 100644
> > --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> >  <at>  <at>  -132,6 +132,14  <at>  <at> 
> >  #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
> >  #endif
> >
> > +#ifndef RTE_PCI_DEV_ID_DECL_FM10K
> > +#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
> > +#endif
> > +
> > +#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
> > +#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
> > +#endif
(Continue reading)

Neil Horman | 31 Jan 17:32 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

On Sat, Jan 31, 2015 at 05:07:28PM +0100, David Marchand wrote:
> On Sat, Jan 31, 2015 at 3:19 PM, Neil Horman <nhorman@...> wrote:
> 
> > On Fri, Jan 30, 2015 at 01:07:20PM +0800, Chen Jing D(Mark) wrote:
> > > From: Jeff Shaw <jeffrey.b.shaw@...>
> > >
> > > Add fm10k device ID list into rte_pci_dev_ids.h.
> > >
> > > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > > ---
> > >  lib/librte_eal/common/include/rte_pci_dev_ids.h |   22
> > ++++++++++++++++++++++
> > >  1 files changed, 22 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > > index c922de9..f54800e 100644
> > > --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > > +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > >  <at>  <at>  -132,6 +132,14  <at>  <at> 
> > >  #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
> > >  #endif
> > >
> > > +#ifndef RTE_PCI_DEV_ID_DECL_FM10K
> > > +#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
> > > +#endif
> > > +
> > > +#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
> > > +#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
(Continue reading)

David Marchand | 31 Jan 17:55 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

On Sat, Jan 31, 2015 at 5:32 PM, Neil Horman <nhorman@...> wrote:

> On Sat, Jan 31, 2015 at 05:07:28PM +0100, David Marchand wrote:
> > In the end, we miss something to have dpdk work automatically like it
> used
> > to be, before the pci devices ids were stripped out of igb_uio.
> >
> > I can see two solutions :
> > - all pmds export the pci device ids they support (this sounds like
> > modalias :-)) or they register into the eal that exports this information
> > for use by application, but to me the application should not bother with
> > this ...
> > - the pmd handles this automatically (like binding/unbinding on a kernel
> > driver), with a _runtime_ option to enable this behavior (default being
> "no
> > automatic bind")
> >
> > Comments ? Ideas ?
> >
> I like the modalias idea, as it transports a table for uio/vfio to
> identify with
> the binary that needs it, preventing a possible discrepancy in what the
> core
> dpdk library identifies as supported devices and what the pmd DSO's
> actually do
> support.
>

Yes, but if a pmd can do this itself alone, there is no discrepancy either.

(Continue reading)

Neil Horman | 31 Jan 19:35 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

On Sat, Jan 31, 2015 at 05:55:07PM +0100, David Marchand wrote:
> On Sat, Jan 31, 2015 at 5:32 PM, Neil Horman <nhorman@...> wrote:
> 
> > On Sat, Jan 31, 2015 at 05:07:28PM +0100, David Marchand wrote:
> > > In the end, we miss something to have dpdk work automatically like it
> > used
> > > to be, before the pci devices ids were stripped out of igb_uio.
> > >
> > > I can see two solutions :
> > > - all pmds export the pci device ids they support (this sounds like
> > > modalias :-)) or they register into the eal that exports this information
> > > for use by application, but to me the application should not bother with
> > > this ...
> > > - the pmd handles this automatically (like binding/unbinding on a kernel
> > > driver), with a _runtime_ option to enable this behavior (default being
> > "no
> > > automatic bind")
> > >
> > > Comments ? Ideas ?
> > >
> > I like the modalias idea, as it transports a table for uio/vfio to
> > identify with
> > the binary that needs it, preventing a possible discrepancy in what the
> > core
> > dpdk library identifies as supported devices and what the pmd DSO's
> > actually do
> > support.
> >
> 
> Yes, but if a pmd can do this itself alone, there is no discrepancy either.
(Continue reading)

David Marchand | 7 May 13:06 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

Hello Neil,

Reviving this old thread.

On Sat, Jan 31, 2015 at 7:35 PM, Neil Horman <nhorman@...> wrote:

> On Sat, Jan 31, 2015 at 05:55:07PM +0100, David Marchand wrote:
> > On Sat, Jan 31, 2015 at 5:32 PM, Neil Horman <nhorman@...>
> wrote:
> >
> > > On Sat, Jan 31, 2015 at 05:07:28PM +0100, David Marchand wrote:
> > > > In the end, we miss something to have dpdk work automatically like it
> > > used
> > > > to be, before the pci devices ids were stripped out of igb_uio.
> > > >
> > > > I can see two solutions :
> > > > - all pmds export the pci device ids they support (this sounds like
> > > > modalias :-)) or they register into the eal that exports this
> information
> > > > for use by application, but to me the application should not bother
> with
> > > > this ...
> > > > - the pmd handles this automatically (like binding/unbinding on a
> kernel
> > > > driver), with a _runtime_ option to enable this behavior (default
> being
> > > "no
> > > > automatic bind")
> > > >
> > > > Comments ? Ideas ?
(Continue reading)

Neil Horman | 7 May 15:36 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

On Thu, May 07, 2015 at 01:06:02PM +0200, David Marchand wrote:
> Hello Neil,
> 
> Reviving this old thread.
> 
> On Sat, Jan 31, 2015 at 7:35 PM, Neil Horman <nhorman@...> wrote:
> 
> > On Sat, Jan 31, 2015 at 05:55:07PM +0100, David Marchand wrote:
> > > On Sat, Jan 31, 2015 at 5:32 PM, Neil Horman <nhorman@...>
> > wrote:
> > >
> > > > On Sat, Jan 31, 2015 at 05:07:28PM +0100, David Marchand wrote:
> > > > > In the end, we miss something to have dpdk work automatically like it
> > > > used
> > > > > to be, before the pci devices ids were stripped out of igb_uio.
> > > > >
> > > > > I can see two solutions :
> > > > > - all pmds export the pci device ids they support (this sounds like
> > > > > modalias :-)) or they register into the eal that exports this
> > information
> > > > > for use by application, but to me the application should not bother
> > with
> > > > > this ...
> > > > > - the pmd handles this automatically (like binding/unbinding on a
> > kernel
> > > > > driver), with a _runtime_ option to enable this behavior (default
> > being
> > > > "no
> > > > > automatic bind")
> > > > >
(Continue reading)

David Marchand | 7 May 15:39 2015

Re: [PATCH 04/18] fm10k: add fm10k device id

On Thu, May 7, 2015 at 3:36 PM, Neil Horman <nhorman@...> wrote:

> > I tried to reuse modinfo, but the problem is that kmod implementation is
> > checking the filename extension against .ko and .ko.gz.
> >
> Well, you can alter modinfo so that it looks at .so files if you like, but
> thats
> not the only tool you can use.  Truthfully you can just use objdump if you
> like.
>
> > I find it a bit too bad to have to rewrite this kind of tool just for
> dpdk
> > ... but on the other hand we would need something for bsd as well or we
> > give a shell script that rely on readelf to retrieve theis section.
> >
> See above, try objdump -j=.modinfo -S /path/to/kernel/module.  objdump
> doesn't
> care about file extensions, as long as its ELF.  With that you can:
>
> 1) Dump out any section contents you like
> 2) strip away the application top end, and just use libbfd to get at the
> elf
> contents if you like.
>

Yes, I reached the same conclusion.
Ok, I will see what I can do.

Thanks.

(Continue reading)

Chen, Jing D | 2 Feb 08:54 2015
Picon

Re: [PATCH 04/18] fm10k: add fm10k device id

Hi Neil,

> -----Original Message-----
> From: Neil Horman [mailto:nhorman@...]
> Sent: Saturday, January 31, 2015 10:20 PM
> To: Chen, Jing D
> Cc: dev@...
> Subject: Re: [dpdk-dev] [PATCH 04/18] fm10k: add fm10k device id
> 
> On Fri, Jan 30, 2015 at 01:07:20PM +0800, Chen Jing D(Mark) wrote:
> > From: Jeff Shaw <jeffrey.b.shaw@...>
> >
> > Add fm10k device ID list into rte_pci_dev_ids.h.
> >
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > ---
> >  lib/librte_eal/common/include/rte_pci_dev_ids.h |   22
> ++++++++++++++++++++++
> >  1 files changed, 22 insertions(+), 0 deletions(-)
> >
> > diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > index c922de9..f54800e 100644
> > --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> > +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> >  <at>  <at>  -132,6 +132,14  <at>  <at> 
> >  #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
> >  #endif
> >
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 01/18] fm10k: add base driver

From: Jeff Shaw <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>

Base driver is developped and maintained by Intel ND team, includes
basic functional service to Intel Red Rock Canyon silicon.
Any suggestion on bug fix and improvement within this directory is
welcome, but need this team to change and update.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>
---
 lib/librte_pmd_fm10k/SHARED/fm10k_api.c    |  327 +++++
 lib/librte_pmd_fm10k/SHARED/fm10k_api.h    |   60 +
 lib/librte_pmd_fm10k/SHARED/fm10k_common.c |  573 ++++++++
 lib/librte_pmd_fm10k/SHARED/fm10k_common.h |   52 +
 lib/librte_pmd_fm10k/SHARED/fm10k_mbx.c    | 2186 ++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/SHARED/fm10k_mbx.h    |  329 +++++
 lib/librte_pmd_fm10k/SHARED/fm10k_osdep.h  |  116 ++
 lib/librte_pmd_fm10k/SHARED/fm10k_pf.c     | 1877 ++++++++++++++++++++++++
 lib/librte_pmd_fm10k/SHARED/fm10k_pf.h     |  152 ++
 lib/librte_pmd_fm10k/SHARED/fm10k_tlv.c    |  914 ++++++++++++
 lib/librte_pmd_fm10k/SHARED/fm10k_tlv.h    |  199 +++
 lib/librte_pmd_fm10k/SHARED/fm10k_type.h   |  925 ++++++++++++
 lib/librte_pmd_fm10k/SHARED/fm10k_vf.c     |  586 ++++++++
 lib/librte_pmd_fm10k/SHARED/fm10k_vf.h     |   91 ++
 14 files changed, 8387 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/SHARED/fm10k_api.c
 create mode 100644 lib/librte_pmd_fm10k/SHARED/fm10k_api.h
 create mode 100644 lib/librte_pmd_fm10k/SHARED/fm10k_common.c
 create mode 100644 lib/librte_pmd_fm10k/SHARED/fm10k_common.h
 create mode 100644 lib/librte_pmd_fm10k/SHARED/fm10k_mbx.c
 create mode 100644 lib/librte_pmd_fm10k/SHARED/fm10k_mbx.h
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 00/15] lib/librte_pmd_fm10k : fm10k pmd driver

From: "Chen Jing D(Mark)" <jing.d.chen@...>

The patch set add poll mode driver for the host interface of Intel
Red Rock Canyon silicon, which integrates NIC and switch functionalities.
The patch set include below features:

1. Basic RX/TX functions for PF/VF.
2. Interrupt handling mechanism for PF/VF.
3. per queue start/stop functions for PF/VF.
4. Mailbox handling between PF/VF and PF/Switch Manager.
5. Receive Side Scaling (RSS) for PF/VF.
6. Scatter receive function for PF/VF.
7. reta update/query for PF/VF.
8. VLAN filter set for PF.
9. Link status query for PF/VF.

Changes in v2:
- Merge 3 patches into 1 to configure fm10k compile environment.
- Rework on log code to follow style in ixgbe.
- Rework log message, remove redundant '\n'
- Update Copyright year from "2014" to "2015"
- Change base driver directory name from SHARED to base
- Add more description in log for patch "add PF and VF interrupt"
- Merge 2 patches into 1 to register fm10k driver
- Define macro to replace numeric for lower 32-bit mask.

Jeff Shaw (15):
  fm10k: add base driver
  fm10k: add fm10k device id
  fm10k: register fm10k pmd PF driver
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 02/15] fm10k: add fm10k device id

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k device ID list into rte_pci_dev_ids.h.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index c922de9..f54800e 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
 <at>  <at>  -132,6 +132,14  <at>  <at> 
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif

+#ifndef RTE_PCI_DEV_ID_DECL_FM10K
+#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
 <at>  <at>  -474,6 +482,12  <at>  <at>  RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B)
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 03/15] fm10k: register fm10k pmd PF driver

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add init function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.
4. Add fm10k.h to define macros and basic data structure.
5. Add fm10k_logs.h to control log message output.
6. Add Makefile.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |   95 ++++++++++
 lib/librte_pmd_fm10k/fm10k.h        |  224 +++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  343 +++++++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_logs.h   |   78 ++++++++
 4 files changed, 740 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/Makefile
 create mode 100644 lib/librte_pmd_fm10k/fm10k.h
 create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
 create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
new file mode 100644
index 0000000..1da84e9
--- /dev/null
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -0,0 +1,95  <at>  <at> 
+#   BSD LICENSE
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 04/15] Change config files to add fm10k into compile

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Change config/common_bsdapp and config/common_linuxapp, add
   macros to control fm10k pmd driver compile for linux and bsd.
2. Change lib/Makefile to add fm10k driver into compile list.
3. Change mk/rte.app.mk to add fm10k lib into link.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 config/common_bsdapp   |   11 +++++++++++
 config/common_linuxapp |   11 +++++++++++
 lib/Makefile           |    1 +
 mk/rte.app.mk          |    4 ++++
 4 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 9177db1..77e8a64 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
 <at>  <at>  -182,6 +182,17  <at>  <at>  CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4
 CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1

 #
+# Compile burst-oriented FM10K PMD
+#
+CONFIG_RTE_LIBRTE_FM10K_PMD=y
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 01/15] fm10k: add base driver

From: Jeff Shaw <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>

Base driver is developped and maintained by Intel ND team, includes
basic functional service to Intel Red Rock Canyon silicon.
Any suggestion on bug fix and improvement within this directory is
welcome, but need this team to change and update.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>
---
 lib/librte_pmd_fm10k/base/fm10k_api.c    |  327 +++++
 lib/librte_pmd_fm10k/base/fm10k_api.h    |   60 +
 lib/librte_pmd_fm10k/base/fm10k_common.c |  573 ++++++++
 lib/librte_pmd_fm10k/base/fm10k_common.h |   52 +
 lib/librte_pmd_fm10k/base/fm10k_mbx.c    | 2186 ++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_mbx.h    |  329 +++++
 lib/librte_pmd_fm10k/base/fm10k_osdep.h  |  118 ++
 lib/librte_pmd_fm10k/base/fm10k_pf.c     | 1877 +++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_pf.h     |  152 +++
 lib/librte_pmd_fm10k/base/fm10k_tlv.c    |  914 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_tlv.h    |  199 +++
 lib/librte_pmd_fm10k/base/fm10k_type.h   |  925 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.c     |  586 ++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.h     |   91 ++
 14 files changed, 8389 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.h
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 00/15] lib/librte_pmd_fm10k : fm10k pmd driver

From: "Chen Jing D(Mark)" <jing.d.chen@...>

The patch set add poll mode driver for the host interface of Intel
Red Rock Canyon silicon, which integrates NIC and switch functionalities.
The patch set include below features:

1. Basic RX/TX functions for PF/VF.
2. Interrupt handling mechanism for PF/VF.
3. per queue start/stop functions for PF/VF.
4. Mailbox handling between PF/VF and PF/Switch Manager.
5. Receive Side Scaling (RSS) for PF/VF.
6. Scatter receive function for PF/VF.
7. reta update/query for PF/VF.
8. VLAN filter set for PF.
9. Link status query for PF/VF.

Changes in v3:
- Update base driver.
- Define several macros to pass base driver compile.

Changes in v2:
- Merge 3 patches into 1 to configure fm10k compile environment.
- Rework on log code to follow style in ixgbe.
- Rework log message, remove redundant '\n'
- Update Copyright year from "2014" to "2015"
- Change base driver directory name from SHARED to base
- Add more description in log for patch "add PF and VF interrupt"
- Merge 2 patches into 1 to register fm10k driver
- Define macro to replace numeric for lower 32-bit mask.

(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 01/15] fm10k: add base driver

From: Jeff Shaw <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>

Base driver is developped and maintained by Intel ND team, includes
basic functional service to Intel Red Rock Canyon silicon.
Any suggestion on bug fix and improvement within this directory is
welcome, but need this team to change and update.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>
---
 lib/librte_pmd_fm10k/base/fm10k_api.c    |  341 +++++
 lib/librte_pmd_fm10k/base/fm10k_api.h    |   61 +
 lib/librte_pmd_fm10k/base/fm10k_common.c |  572 ++++++++
 lib/librte_pmd_fm10k/base/fm10k_common.h |   52 +
 lib/librte_pmd_fm10k/base/fm10k_mbx.c    | 2185 ++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_mbx.h    |  329 +++++
 lib/librte_pmd_fm10k/base/fm10k_osdep.h  |  148 ++
 lib/librte_pmd_fm10k/base/fm10k_pf.c     | 1992 +++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_pf.h     |  155 +++
 lib/librte_pmd_fm10k/base/fm10k_tlv.c    |  914 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_tlv.h    |  199 +++
 lib/librte_pmd_fm10k/base/fm10k_type.h   |  937 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.c     |  641 +++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.h     |   91 ++
 14 files changed, 8617 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.h
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 00/15] lib/librte_pmd_fm10k : fm10k pmd driver

From: "Chen Jing D(Mark)" <jing.d.chen@...>

The patch set add poll mode driver for the host interface of Intel
fm10k series of silicons, which integrate NIC and switch 
functionalities. The patch set include below features:

1. Basic RX/TX functions for PF/VF.
2. Interrupt handling mechanism for PF/VF.
3. per queue start/stop functions for PF/VF.
4. Mailbox handling between PF/VF and PF/Switch Manager.
5. Receive Side Scaling (RSS) for PF/VF.
6. Scatter receive function for PF/VF.
7. reta update/query for PF/VF.
8. VLAN filter set for PF.
9. Link status query for PF/VF.

Change in v4:
- Change commit log to remove improper words.

Changes in v3:
- Update base driver.
- Define several macros to pass base driver compile.

Changes in v2:
- Merge 3 patches into 1 to configure fm10k compile environment.
- Rework on log code to follow style in ixgbe.
- Rework log message, remove redundant '\n'
- Update Copyright year from "2014" to "2015"
- Change base driver directory name from SHARED to base
- Add more description in log for patch "add PF and VF interrupt"
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 02/15] eal: add fm10k device id

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k device ID list into rte_pci_dev_ids.h.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index c922de9..f54800e 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
 <at>  <at>  -132,6 +132,14  <at>  <at> 
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif

+#ifndef RTE_PCI_DEV_ID_DECL_FM10K
+#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
 <at>  <at>  -474,6 +482,12  <at>  <at>  RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B)
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 03/15] fm10k: register fm10k pmd PF driver

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add init function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.
4. Add fm10k.h to define macros and basic data structure.
5. Add fm10k_logs.h to control log message output.
6. Add Makefile.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |   95 ++++++++++
 lib/librte_pmd_fm10k/fm10k.h        |  224 +++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  343 +++++++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_logs.h   |   78 ++++++++
 4 files changed, 740 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/Makefile
 create mode 100644 lib/librte_pmd_fm10k/fm10k.h
 create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
 create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
new file mode 100644
index 0000000..1da84e9
--- /dev/null
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -0,0 +1,95  <at>  <at> 
+#   BSD LICENSE
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 04/15] Change config files to add fm10k into compile

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Change config/common_bsdapp and config/common_linuxapp, add
   macros to control fm10k pmd driver compile for linux and bsd.
2. Change lib/Makefile to add fm10k driver into compile list.
3. Change mk/rte.app.mk to add fm10k lib into link.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 config/common_bsdapp   |   11 +++++++++++
 config/common_linuxapp |   11 +++++++++++
 lib/Makefile           |    1 +
 mk/rte.app.mk          |    4 ++++
 4 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 9177db1..77e8a64 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
 <at>  <at>  -182,6 +182,17  <at>  <at>  CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4
 CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1

 #
+# Compile burst-oriented FM10K PMD
+#
+CONFIG_RTE_LIBRTE_FM10K_PMD=y
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 05/15] fm10k: add reta update/requery functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_reta_update and fm10k_reta_query functions.
2. Add fm10k_link_update and fm10k_dev_infos_get functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  162 +++++++++++++++++++++++++++++++++++
 1 files changed, 162 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 0b75299..b3d4d79 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,6 +44,10  <at>  <at> 
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

+/* Number of chars per uint32 type */
+#define CHARS_PER_UINT32 (sizeof(uint32_t))
+#define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
+
 static void
 fm10k_mbx_initlock(struct fm10k_hw *hw)
 {
 <at>  <at>  -74,6 +78,22  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 01/15] fm10k: add base driver

From: Jeff Shaw <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>

Base driver is developped and maintained by Intel ND team, includes
basic functional service to Intel fm10k series of silicons.
Any suggestion on bug fix and improvement within this directory is
welcome, but need this team to change and update.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>
---
 lib/librte_pmd_fm10k/base/fm10k_api.c    |  341 +++++
 lib/librte_pmd_fm10k/base/fm10k_api.h    |   61 +
 lib/librte_pmd_fm10k/base/fm10k_common.c |  572 ++++++++
 lib/librte_pmd_fm10k/base/fm10k_common.h |   52 +
 lib/librte_pmd_fm10k/base/fm10k_mbx.c    | 2185 ++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_mbx.h    |  329 +++++
 lib/librte_pmd_fm10k/base/fm10k_osdep.h  |  148 ++
 lib/librte_pmd_fm10k/base/fm10k_pf.c     | 1992 +++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_pf.h     |  155 +++
 lib/librte_pmd_fm10k/base/fm10k_tlv.c    |  914 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_tlv.h    |  199 +++
 lib/librte_pmd_fm10k/base/fm10k_type.h   |  937 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.c     |  641 +++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.h     |   91 ++
 14 files changed, 8617 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.h
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 00/17] lib/librte_pmd_fm10k : fm10k pmd driver

From: "Chen Jing D(Mark)" <jing.d.chen@...>

The patch set add poll mode driver for the host interface of Intel
Ethernet Switch FM10000 Series of silicons, which integrate NIC and
switch functionalities. The patch set include below features:

1. Basic RX/TX functions for PF/VF.
2. Interrupt handling mechanism for PF/VF.
3. per queue start/stop functions for PF/VF.
4. Mailbox handling between PF/VF and PF/Switch Manager.
5. Receive Side Scaling (RSS) for PF/VF.
6. Scatter receive function for PF/VF.
7. reta update/query for PF/VF.
8. VLAN filter set for PF.
9. Link status query for PF/VF.

Change in v5:
- Add sanity check for mbuf allocation.
- Add a new patch to claim fm10k driver review
- Change commit log.
- Add unlikely in func rx_desc_to_ol_flags to gain performance
- Add a new patch to add ABI version

Change in v4:
- Change commit log to remove improper words.

Changes in v3:
- Update base driver.
- Define several macros to pass base driver compile.

(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 02/17] eal: add fm10k device id

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k device ID list into rte_pci_dev_ids.h.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index c922de9..f54800e 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
 <at>  <at>  -132,6 +132,14  <at>  <at> 
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif

+#ifndef RTE_PCI_DEV_ID_DECL_FM10K
+#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
 <at>  <at>  -474,6 +482,12  <at>  <at>  RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B)
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 03/17] fm10k: register fm10k pmd PF driver

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add init function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.
4. Add fm10k.h to define macros and basic data structure.
5. Add fm10k_logs.h to control log message output.
6. Add Makefile.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |   95 ++++++++++
 lib/librte_pmd_fm10k/fm10k.h        |  224 +++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  343 +++++++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_logs.h   |   78 ++++++++
 4 files changed, 740 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/Makefile
 create mode 100644 lib/librte_pmd_fm10k/fm10k.h
 create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
 create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
new file mode 100644
index 0000000..1da84e9
--- /dev/null
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -0,0 +1,95  <at>  <at> 
+#   BSD LICENSE
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 01/17] fm10k: add base driver

From: Jeff Shaw <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>

Base driver is developed and maintained by Intel ND team, includes
basic functional service to Intel Ethernet Switch FM10000 Series
of silicons.
Any suggestion on bug fix and improvement within this directory is
welcome, but need this team to change and update.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>
---
 lib/librte_pmd_fm10k/base/fm10k_api.c    |  341 +++++
 lib/librte_pmd_fm10k/base/fm10k_api.h    |   61 +
 lib/librte_pmd_fm10k/base/fm10k_common.c |  572 ++++++++
 lib/librte_pmd_fm10k/base/fm10k_common.h |   52 +
 lib/librte_pmd_fm10k/base/fm10k_mbx.c    | 2185 ++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_mbx.h    |  329 +++++
 lib/librte_pmd_fm10k/base/fm10k_osdep.h  |  148 ++
 lib/librte_pmd_fm10k/base/fm10k_pf.c     | 1992 +++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_pf.h     |  155 +++
 lib/librte_pmd_fm10k/base/fm10k_tlv.c    |  914 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_tlv.h    |  199 +++
 lib/librte_pmd_fm10k/base/fm10k_type.h   |  937 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.c     |  641 +++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.h     |   91 ++
 14 files changed, 8617 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.c
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 00/16] lib/librte_pmd_fm10k : fm10k pmd driver

From: "Chen Jing D(Mark)" <jing.d.chen@...>

The patch set add poll mode driver for the host interface of Intel
Ethernet Switch FM10000 Series of silicons, which integrate NIC and
switch functionalities. The patch set include below features:

1. Basic RX/TX functions for PF/VF.
2. Interrupt handling mechanism for PF/VF.
3. per queue start/stop functions for PF/VF.
4. Mailbox handling between PF/VF and PF/Switch Manager.
5. Receive Side Scaling (RSS) for PF/VF.
6. Scatter receive function for PF/VF.
7. reta update/query for PF/VF.
8. VLAN filter set for PF.
9. Link status query for PF/VF.

Change in v6:
- Merge ABI patch with fm10k driver regsiter patch.
- Fix typo.
- Rework comments.
- Minor adjustment on commit log.
- Increase error variable after mbuf allocation failed.

Change in v5:
- Add sanity check for mbuf allocation.
- Add a new patch to claim fm10k driver review
- Change commit log.
- Add unlikely in func rx_desc_to_ol_flags to gain performance
- Add a new patch to add ABI version

(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 02/16] eal: add fm10k device id

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k device ID list into rte_pci_dev_ids.h.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index c922de9..f54800e 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
 <at>  <at>  -132,6 +132,14  <at>  <at> 
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif

+#ifndef RTE_PCI_DEV_ID_DECL_FM10K
+#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
 <at>  <at>  -474,6 +482,12  <at>  <at>  RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B)
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 01/16] fm10k: add base driver

From: Jeff Shaw <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>

Base driver is developed and maintained by Intel ND team, includes
basic functional service to Intel Ethernet Switch FM10000 Series
of silicons.
Any suggestion on bug fix and improvement within this directory is
welcome, but need this team to change and update.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen-ral2JQCrhuEAvxtiuMwx3w <at> public.gmane.org>
---
 lib/librte_pmd_fm10k/base/fm10k_api.c    |  341 +++++
 lib/librte_pmd_fm10k/base/fm10k_api.h    |   61 +
 lib/librte_pmd_fm10k/base/fm10k_common.c |  572 ++++++++
 lib/librte_pmd_fm10k/base/fm10k_common.h |   52 +
 lib/librte_pmd_fm10k/base/fm10k_mbx.c    | 2185 ++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_mbx.h    |  329 +++++
 lib/librte_pmd_fm10k/base/fm10k_osdep.h  |  148 ++
 lib/librte_pmd_fm10k/base/fm10k_pf.c     | 1992 +++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_pf.h     |  155 +++
 lib/librte_pmd_fm10k/base/fm10k_tlv.c    |  914 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_tlv.h    |  199 +++
 lib/librte_pmd_fm10k/base/fm10k_type.h   |  937 +++++++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.c     |  641 +++++++++
 lib/librte_pmd_fm10k/base/fm10k_vf.h     |   91 ++
 14 files changed, 8617 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.c
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.h
 create mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.c
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 03/16] fm10k: register fm10k pmd PF driver

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add init function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.
4. Add fm10k.h to define macros and basic data structure.
5. Add fm10k_logs.h to control log message output.
6. Add Makefile.
7. Add ABI version of librte_pmd_fm10k

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
Signed-off-by: Michael Qiu <michael.qiu@...>
---
 lib/librte_pmd_fm10k/Makefile                  |   99 +++++++
 lib/librte_pmd_fm10k/fm10k.h                   |  224 +++++++++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c            |  343 ++++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_logs.h              |   78 ++++++
 lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map |    4 +
 5 files changed, 748 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/Makefile
 create mode 100644 lib/librte_pmd_fm10k/fm10k.h
 create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
 create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h
 create mode 100644 lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
new file mode 100644
index 0000000..b24cc67
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 04/16] config: change config files to add fm10k into compile

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Change config/common_bsdapp and config/common_linuxapp, add
   macros to control fm10k pmd driver compile for linux and bsd.
2. Change lib/Makefile to add fm10k driver into compile list.
3. Change mk/rte.app.mk to add fm10k lib into link.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 config/common_bsdapp   |   11 +++++++++++
 config/common_linuxapp |   11 +++++++++++
 lib/Makefile           |    1 +
 mk/rte.app.mk          |    4 ++++
 4 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 57bacb8..8cfa4e6 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
 <at>  <at>  -182,6 +182,17  <at>  <at>  CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4
 CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1

 #
+# Compile burst-oriented FM10K PMD
+#
+CONFIG_RTE_LIBRTE_FM10K_PMD=y
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 06/16] fm10k: add Rx queue setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_rx_queue_setup and fm10k_rx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  254 +++++++++++++++++++++++++++++++++++
 1 files changed, 254 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index b3d4d79..8799c1a 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -41,6 +41,7  <at>  <at> 
 #include "fm10k.h"
 #include "base/fm10k_api.h"

+#define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

 <at>  <at>  -67,6 +68,46  <at>  <at>  fm10k_mbx_unlock(struct fm10k_hw *hw)
 	rte_spinlock_unlock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back));
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device.
+ */
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 05/16] fm10k: add reta update/requery functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_reta_update and fm10k_reta_query functions.
2. Add fm10k_link_update and fm10k_dev_infos_get functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  162 +++++++++++++++++++++++++++++++++++
 1 files changed, 162 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 0b75299..b3d4d79 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,6 +44,10  <at>  <at> 
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

+/* Number of chars per uint32 type */
+#define CHARS_PER_UINT32 (sizeof(uint32_t))
+#define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
+
 static void
 fm10k_mbx_initlock(struct fm10k_hw *hw)
 {
 <at>  <at>  -74,6 +78,22  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 07/16] fm10k: add Tx queue setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_tx_queue_setup and fm10k_tx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  205 +++++++++++++++++++++++++++++++++++
 1 files changed, 205 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 8799c1a..47bfe59 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -108,6 +108,48  <at>  <at>  rx_queue_free(struct fm10k_rx_queue *q)
 	}
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device
+ */
+static inline void
+tx_queue_clean(struct fm10k_tx_queue *q)
+{
+	struct fm10k_tx_desc zero = {0, 0, 0, 0, 0, 0};
+	uint32_t i;
+	PMD_INIT_FUNC_TRACE();
+
+	/* zero descriptor rings */
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 09/16] fm10k: add dev start/stop functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add function to initialize RX queues.
2. Add function to initialize TX queues.
3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
   functions.
4. Add function to close mailbox service.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  224 +++++++++++++++++++++++++++++++++++
 1 files changed, 224 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 0fb7b95..b79badc 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,11 +44,14  <at>  <at> 
 #define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20
+#define UINT64_LOWER_32BITS_MASK 0x00000000ffffffffULL

 /* Number of chars per uint32 type */
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)

+static void fm10k_close_mbx_service(struct fm10k_hw *hw);
+
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 13/16] fm10k: add function to set vlan

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_vlan_filter_set to set vlan.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 923f23c..12394e5 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -787,6 +787,20  <at>  <at>  fm10k_dev_infos_get(struct rte_eth_dev *dev,

 }

+static int
+fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	PMD_INIT_FUNC_TRACE();
+
+	/*  <at> todo - add support for the VF */
+	if (hw->mac.type != fm10k_mac_pf)
+		return -ENOTSUP;
+
+	return fm10k_update_vlan(hw, vlan_id, 0, on);
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 11/16] fm10k: add PF RSS support

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Configure RSS in fm10k_dev_rx_init function.
2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
   and inquery RSS configuration.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  156 +++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 7451a44..0f4d339 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -270,6 +270,78  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

+static void
+fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	uint32_t mrqc, *key, i, reta, j;
+	uint64_t hf;
+
+#define RSS_KEY_SIZE 40
+	static uint8_t rss_intel_key[RSS_KEY_SIZE] = {
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 14/16] fm10k: add SRIOV-VF support

From: Jeff Shaw <jeffrey.b.shaw@...>

fm10k pmd driver will support both PF and VF device with single
copy of code. The reason is NIC maps registers with same
function in PF and VF to same PCI I/O address. Then, PF/VF drivers
use same address to access registers belonging to it, HW will
translate the request to correct units.

For some functionalities that are unique to PF, driver will check
current driver type and behave correctly.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 12394e5..8261fe8 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1562,6 +1562,7  <at>  <at>  eth_fm10k_dev_init(__rte_unused struct eth_driver *eth_drv,
  */
 static struct rte_pci_id pci_id_fm10k_map[] = {
 #define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
 #include "rte_pci_dev_ids.h"
 	{ .vendor_id = 0, /* sentinel */ },
 };
--

-- 
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 10/16] fm10k: add receive and tranmit function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_pkts and fm10k_xmit_pkts functions.
2. Link app function pointer to actual fm10k recv/xmit
   functions.
3. Change Makefile to compile new file fm10k_rxtx.c

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |    1 +
 lib/librte_pmd_fm10k/fm10k.h        |    7 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    2 +
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  317 +++++++++++++++++++++++++++++++++++
 4 files changed, 327 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
index b24cc67..986f4ef 100644
--- a/lib/librte_pmd_fm10k/Makefile
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -83,6 +83,7  <at>  <at>  VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base
 # all source are stored in SRCS-y
 #
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_rxtx.c

 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_pf.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_tlv.c
diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 08/16] fm10k: add Rx/Tx single queue start/stop function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add 4 functions fm10k_dev_rx_queue_start,
   fm10k_dev_rx_queue_stop, fm10k_dev_tx_queue_start,
   and fm10k_dev_tx_queue_stop.
2. verify Rx packet buffer alignment is valid.
   Hardware requires specific alignment for Rx packet buffers. At
   least one of the following two conditions must be satisfied.
       1) Address is 512B aligned
       2) Address is 8B aligned and buffer does not cross 4K boundary.

   Alignment is checked by the driver when the Rx queue is reset. It
   is assumed that if an entire descriptor ring can be filled with
   buffers containing valid alignment, then all buffers in that mempool
   have valid address alignment. It is the responsibility of the user
   to ensure all buffers have valid alignment, as it is the user who
   creates the mempool.

   It is assumed the buffer needs only to store a maximum size Ethernet
   frame.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |   58 +++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  222 +++++++++++++++++++++++++++++++++++
 2 files changed, 280 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index 1468040..b23a3a6 100644
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 16/16] maintainers: claim for fm10k review

From: "Chen Jing D(Mark)" <jing.d.chen@...>

Claim for fm10k polling mode driver review.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 MAINTAINERS |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index a771fa3..e7a425b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
 <at>  <at>  -213,6 +213,10  <at>  <at>  Intel i40e
 M: Helin Zhang <helin.zhang@...>
 F: lib/librte_pmd_i40e/

+Intel fm10k
+M: Jing Chen <jing.d.chen@...>
+F: lib/librte_pmd_fm10k/
+
 RedHat virtio
 M: Changchun Ouyang <changchun.ouyang@...>
 F: lib/librte_pmd_virtio/
--

-- 
1.7.7.6

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 15/16] fm10k: add PF and VF interrupt handling function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add functions to enable PF/VF interrupt.
2. Add function to process error message passed from interrupt.
2. Add 2 interrupt handling functions, one for PF and one for VF.
2. Enable interrupt after completing initialization of NIC.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  268 +++++++++++++++++++++++++++++++++++
 1 files changed, 268 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 8261fe8..38f6925 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1344,6 +1344,256  <at>  <at>  fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }

+static void
+fm10k_dev_enable_intr_pf(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t int_map = FM10K_INT_MAP_IMMEDIATE;
+
+	/* Bind all local non-queue interrupt to vector 0 */
+	int_map |= 0;
+
(Continue reading)

Chen Jing D(Mark | 17 Feb 15:18 2015
Picon

[PATCH v6 12/16] fm10k: add scatter receive function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_scattered_pkts function to receive jumbo frame
   and multi-segment packets.
2. Configure correct receive function in rx_init and dev_init.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |    3 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 ++++
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  145 +++++++++++++++++++++++++++++++++++
 3 files changed, 163 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index b2ff10e..0e31796 100644
--- a/lib/librte_pmd_fm10k/fm10k.h
+++ b/lib/librte_pmd_fm10k/fm10k.h
 <at>  <at>  -284,6 +284,9  <at>  <at>  fm10k_addr_alignment_valid(struct rte_mbuf *mb)
 uint16_t fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t nb_pkts);

+uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
+		struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+
 uint16_t fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t nb_pkts);
 #endif
diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 0f4d339..923f23c 100644
(Continue reading)

Thomas Monjalon | 18 Feb 01:13 2015

Re: [PATCH v6 00/16] lib/librte_pmd_fm10k : fm10k pmd driver

2015-02-17 22:18, Chen Jing D:
> From: "Chen Jing D(Mark)" <jing.d.chen@...>
> 
> The patch set add poll mode driver for the host interface of Intel
> Ethernet Switch FM10000 Series of silicons, which integrate NIC and
> switch functionalities. The patch set include below features:
> 
> 1. Basic RX/TX functions for PF/VF.
> 2. Interrupt handling mechanism for PF/VF.
> 3. per queue start/stop functions for PF/VF.
> 4. Mailbox handling between PF/VF and PF/Switch Manager.
> 5. Receive Side Scaling (RSS) for PF/VF.
> 6. Scatter receive function for PF/VF.
> 7. reta update/query for PF/VF.
> 8. VLAN filter set for PF.
> 9. Link status query for PF/VF.
> 
> Change in v6:
> - Merge ABI patch with fm10k driver regsiter patch.
> - Fix typo.
> - Rework comments.
> - Minor adjustment on commit log.
> - Increase error variable after mbuf allocation failed.
> 
> Change in v5:
> - Add sanity check for mbuf allocation.
> - Add a new patch to claim fm10k driver review
> - Change commit log.
> - Add unlikely in func rx_desc_to_ol_flags to gain performance
> - Add a new patch to add ABI version
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 04/17] Change config files to add fm10k into compile

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Change config/common_bsdapp and config/common_linuxapp, add
   macros to control fm10k pmd driver compile for linux and bsd.
2. Change lib/Makefile to add fm10k driver into compile list.
3. Change mk/rte.app.mk to add fm10k lib into link.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 config/common_bsdapp   |   11 +++++++++++
 config/common_linuxapp |   11 +++++++++++
 lib/Makefile           |    1 +
 mk/rte.app.mk          |    4 ++++
 4 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 57bacb8..8cfa4e6 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
 <at>  <at>  -182,6 +182,17  <at>  <at>  CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4
 CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1

 #
+# Compile burst-oriented FM10K PMD
+#
+CONFIG_RTE_LIBRTE_FM10K_PMD=y
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 05/17] fm10k: add reta update/requery functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_reta_update and fm10k_reta_query functions.
2. Add fm10k_link_update and fm10k_dev_infos_get functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  162 +++++++++++++++++++++++++++++++++++
 1 files changed, 162 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 0b75299..b3d4d79 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,6 +44,10  <at>  <at> 
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

+/* Number of chars per uint32 type */
+#define CHARS_PER_UINT32 (sizeof(uint32_t))
+#define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
+
 static void
 fm10k_mbx_initlock(struct fm10k_hw *hw)
 {
 <at>  <at>  -74,6 +78,22  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 08/17] fm10k: add RX/TX single queue start/stop function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add 4 functions fm10k_dev_rx_queue_start,
   fm10k_dev_rx_queue_stop, fm10k_dev_tx_queue_start,
   and fm10k_dev_tx_queue_stop.
2. verify Rx packet buffer alignment is valid.
   Hardware requires specific alignment for Rx packet buffers. At
   least one of the following two conditions must be satisfied.
       1) Address is 512B aligned
       2) Address is 8B aligned and buffer does not cross 4K boundary.

   Alignment is checked by the driver when the Rx queue is reset. It
   is assumed that if an entire descriptor ring can be filled with
   buffers containing valid alignment, then all buffers in that mempool
   have valid address alignment. It is the responsibility of the user
   to ensure all buffers have valid alignment, as it is the user who
   creates the mempool.

   It is assumed the buffer needs only to store a maximum size Ethernet
   frame.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |   59 +++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  222 +++++++++++++++++++++++++++++++++++
 2 files changed, 281 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index 1468040..be990e5 100644
(Continue reading)

David Marchand | 13 Feb 12:31 2015

Re: [PATCH v5 08/17] fm10k: add RX/TX single queue start/stop function

Hello,

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen@...>
wrote:

[snip]

+/*
> + * Verify Rx packet buffer alignment is valid.
> + *
> + * Hardware requires specific alignment for Rx packet buffers. At
> + * least one of the following two conditions must be satisfied.
> + *  1. Address is 512B aligned
> + *  2. Address is 8B aligned and buffer does not cross 4K boundary.
> + *
> + * Return 1 if buffer alignment satisfies at least one condition,
> + * otherwise return 0.
> + *
> + * Note: Alignment is checked by the driver when the Rx queue is reset. It
> + *       is assumed that if an entire descriptor ring can be filled with
> + *       buffers containing valid alignment, then all buffers in that
> mempool
> + *       have valid address alignment. It is the responsibility of the
> user
> + *       to ensure all buffers have valid alignment, as it is the user who
> + *       creates the mempool.
> + * Note: It is assumed the buffer needs only to store a maximum size
> Ethernet
> + *       frame.
> + */
(Continue reading)

Jeff Shaw | 13 Feb 17:45 2015
Picon

Re: [PATCH v5 08/17] fm10k: add RX/TX single queue start/stop function

Hi David, thanks for the review.

On Fri, Feb 13, 2015 at 12:31:16PM +0100, David Marchand wrote:
> Hello,
> 
> On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen@...>
> wrote:
> 
> [snip]
> 
> +/*
> > + * Verify Rx packet buffer alignment is valid.
> > + *
> > + * Hardware requires specific alignment for Rx packet buffers. At
> > + * least one of the following two conditions must be satisfied.
> > + *  1. Address is 512B aligned
> > + *  2. Address is 8B aligned and buffer does not cross 4K boundary.
> > + *
> > + * Return 1 if buffer alignment satisfies at least one condition,
> > + * otherwise return 0.
> > + *
> > + * Note: Alignment is checked by the driver when the Rx queue is reset. It
> > + *       is assumed that if an entire descriptor ring can be filled with
> > + *       buffers containing valid alignment, then all buffers in that
> > mempool
> > + *       have valid address alignment. It is the responsibility of the
> > user
> > + *       to ensure all buffers have valid alignment, as it is the user who
> > + *       creates the mempool.
> > + * Note: It is assumed the buffer needs only to store a maximum size
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 06/17] fm10k: add rx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_rx_queue_setup and fm10k_rx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  255 +++++++++++++++++++++++++++++++++++
 1 files changed, 255 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index b3d4d79..7280501 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -41,6 +41,7  <at>  <at> 
 #include "fm10k.h"
 #include "base/fm10k_api.h"

+#define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

 <at>  <at>  -67,6 +68,46  <at>  <at>  fm10k_mbx_unlock(struct fm10k_hw *hw)
 	rte_spinlock_unlock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back));
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device.
+ */
(Continue reading)

David Marchand | 13 Feb 12:08 2015

Re: [PATCH v5 06/17] fm10k: add rx_queue_setup/release function

Hello,

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen@...>
wrote:

[snip]

+static int
> +fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
> +       uint16_t nb_desc, unsigned int socket_id,
> +       const struct rte_eth_rxconf *conf, struct rte_mempool *mp)
> +{
> +       struct fm10k_hw *hw =
> FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +       struct fm10k_rx_queue *q;
> +       const struct rte_memzone *mz;
> +
> +       PMD_INIT_FUNC_TRACE();
> +
> +       /* make sure the mempool element size can account for alignment.
> Use
> +        * RTE_LOG directly to make sure this error is seen. */
>

Comment is not valid anymore since you call PMD_INIT_LOG.

> +       if (!mempool_element_size_valid(mp)) {
> +               PMD_INIT_LOG(ERR, "Error : Mempool element size is too
> small");
> +               return (-EINVAL);
(Continue reading)

Chen, Jing D | 17 Feb 14:01 2015
Picon

Re: [PATCH v5 06/17] fm10k: add rx_queue_setup/release function

Hi,

From: David Marchand [mailto:david.marchand <at> 6wind.com] 
Sent: Friday, February 13, 2015 7:08 PM
To: Chen, Jing D
Cc: dev <at> dpdk.org; Zhang, Helin; Qiu, Michael; Neil Horman; Thomas Monjalon; Shaw, Jeffrey B
Subject: Re: [PATCH v5 06/17] fm10k: add rx_queue_setup/release function

Hello, 

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen <at> intel.com> wrote:

[snip] 

+static int
+fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
+       uint16_t nb_desc, unsigned int socket_id,
+       const struct rte_eth_rxconf *conf, struct rte_mempool *mp)
+{
+       struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+       struct fm10k_rx_queue *q;
+       const struct rte_memzone *mz;
+
+       PMD_INIT_FUNC_TRACE();
+
+       /* make sure the mempool element size can account for alignment. Use
+        * RTE_LOG directly to make sure this error is seen. */

Comment is not valid anymore since you call PMD_INIT_LOG.

(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 07/17] fm10k: add tx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_tx_queue_setup and fm10k_tx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  205 +++++++++++++++++++++++++++++++++++
 1 files changed, 205 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 7280501..989ecfd 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -108,6 +108,48  <at>  <at>  rx_queue_free(struct fm10k_rx_queue *q)
 	}
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device
+ */
+static inline void
+tx_queue_clean(struct fm10k_tx_queue *q)
+{
+	struct fm10k_tx_desc zero = {0, 0, 0, 0, 0, 0};
+	uint32_t i;
+	PMD_INIT_FUNC_TRACE();
+
+	/* zero descriptor rings */
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 09/17] fm10k: add dev start/stop functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add function to initialize RX queues.
2. Add function to initialize TX queues.
3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
   functions.
4. Add function to close mailbox service.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  224 +++++++++++++++++++++++++++++++++++
 1 files changed, 224 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 06609be..6a4b16a 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,11 +44,14  <at>  <at> 
 #define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20
+#define UINT64_LOWER_32BITS_MASK 0x00000000ffffffffULL

 /* Number of chars per uint32 type */
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)

+static void fm10k_close_mbx_service(struct fm10k_hw *hw);
+
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 10/17] fm10k: add receive and tranmit function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_pkts and fm10k_xmit_pkts functions.
2. Link app function pointer to actual fm10k recv/xmit
   functions.
3. Change Makefile to compile new file fm10k_rxtx.c

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |    1 +
 lib/librte_pmd_fm10k/fm10k.h        |    7 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    2 +
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  316 +++++++++++++++++++++++++++++++++++
 4 files changed, 326 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
index 1da84e9..8ab788c 100644
--- a/lib/librte_pmd_fm10k/Makefile
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -79,6 +79,7  <at>  <at>  VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base
 # all source are stored in SRCS-y
 #
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_rxtx.c

 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_pf.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_tlv.c
diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
(Continue reading)

David Marchand | 13 Feb 12:42 2015

Re: [PATCH v5 10/17] fm10k: add receive and tranmit function

Hello,

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen@...>
wrote:

[snip]

+
> +       /* set checksum flags on first descriptor of packet. SCTP checksum
> +        * offload is not supported, but we do not explicitely check for
> this
> +        * case in favor of greatly simplified processing. */
>

Checkpatch is complaining :

WARNING: 'explicitely' may be misspelled - perhaps 'explicitly'?
#328: FILE: lib/librte_pmd_fm10k/fm10k_rxtx.c:261:
+        * offload is not supported, but we do not explicitely check for
this

--

-- 
David Marchand

Chen, Jing D | 17 Feb 14:07 2015
Picon

Re: [PATCH v5 10/17] fm10k: add receive and tranmit function

Hi,


From: David Marchand [mailto:david.marchand <at> 6wind.com] 
Sent: Friday, February 13, 2015 7:43 PM
To: Chen, Jing D
Cc: dev <at> dpdk.org; Zhang, Helin; Qiu, Michael; Neil Horman; Thomas Monjalon; Shaw, Jeffrey B
Subject: Re: [PATCH v5 10/17] fm10k: add receive and tranmit function

Hello, 

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen <at> intel.com> wrote:

[snip] 

+
+       /* set checksum flags on first descriptor of packet. SCTP checksum
+        * offload is not supported, but we do not explicitely check for this
+        * case in favor of greatly simplified processing. */

Checkpatch is complaining :

WARNING: 'explicitely' may be misspelled - perhaps 'explicitly'?

[Mark] Thanks, I'll change it.

#328: FILE: lib/librte_pmd_fm10k/fm10k_rxtx.c:261:
+        * offload is not supported, but we do not explicitely check for this


(Continue reading)

David Marchand | 13 Feb 12:53 2015

Re: [PATCH v5 10/17] fm10k: add receive and tranmit function

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen@...>
wrote:

[snip]

+       if ((q->next_dd > q->next_trigger) || (alloc == 1)) {
> +               ret = rte_mempool_get_bulk(q->mp,
> +                                       (void
> **)&q->sw_ring[q->next_alloc],
> +                                       q->alloc_thresh);
> +
> +               if (unlikely(ret != 0)) {
> +                       PMD_RX_LOG(ERR, "Failed to alloc mbuf");
>

 rx_mbuf_alloc_failed++ ?

--

-- 
David Marchand

Chen, Jing D | 17 Feb 14:10 2015
Picon

Re: [PATCH v5 10/17] fm10k: add receive and tranmit function

Hi,


From: David Marchand [mailto:david.marchand <at> 6wind.com]
Sent: Friday, February 13, 2015 7:54 PM
To: Chen, Jing D
Cc: dev <at> dpdk.org; Zhang, Helin; Qiu, Michael; Neil Horman; Thomas Monjalon; Shaw, Jeffrey B
Subject: Re: [PATCH v5 10/17] fm10k: add receive and tranmit function


On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark)
<jing.d.chen <at> intel.com<mailto:jing.d.chen <at> intel.com>> wrote:

[snip]

+       if ((q->next_dd > q->next_trigger) || (alloc == 1)) {
+               ret = rte_mempool_get_bulk(q->mp,
+                                       (void **)&q->sw_ring[q->next_alloc],
+                                       q->alloc_thresh);
+
+               if (unlikely(ret != 0)) {
+                       PMD_RX_LOG(ERR, "Failed to alloc mbuf");

 rx_mbuf_alloc_failed++ ?

[Mark] Thanks, I’ll change that.
--
David Marchand
Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 11/17] fm10k: add PF RSS support

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Configure RSS in fm10k_dev_rx_init function.
2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
   and inquery RSS configuration.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  156 +++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index e04d200..5858504 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -270,6 +270,78  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

+static void
+fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	uint32_t mrqc, *key, i, reta, j;
+	uint64_t hf;
+
+#define RSS_KEY_SIZE 40
+	static uint8_t rss_intel_key[RSS_KEY_SIZE] = {
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 12/17] fm10k: Add scatter receive function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_scattered_pkts function to receive jumbo frame
   and multi-segment packets.
2. Configure correct receive function in rx_init and dev_init.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |    3 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 ++++
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  143 +++++++++++++++++++++++++++++++++++
 3 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index a9b19cd..8741936 100644
--- a/lib/librte_pmd_fm10k/fm10k.h
+++ b/lib/librte_pmd_fm10k/fm10k.h
 <at>  <at>  -285,6 +285,9  <at>  <at>  fm10k_addr_alignment_valid(struct rte_mbuf *mb)
 uint16_t fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t nb_pkts);

+uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
+		struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+
 uint16_t fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t nb_pkts);
 #endif
diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 5858504..ead1585 100644
(Continue reading)

David Marchand | 13 Feb 12:55 2015

Re: [PATCH v5 12/17] fm10k: Add scatter receive function

Hello,

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen@...>
wrote:

[snip]

+               if (unlikely(ret != 0)) {
> +                       PMD_RX_LOG(ERR, "Failed to alloc mbuf");
>

Idem mono segment.
rx_mbuf_alloc_failed++ ?

--

-- 
David Marchand

Chen, Jing D | 17 Feb 14:11 2015
Picon

Re: [PATCH v5 12/17] fm10k: Add scatter receive function

Hi,


From: David Marchand [mailto:david.marchand <at> 6wind.com]
Sent: Friday, February 13, 2015 7:55 PM
To: Chen, Jing D
Cc: dev <at> dpdk.org; Zhang, Helin; Qiu, Michael; Neil Horman; Thomas Monjalon; Shaw, Jeffrey B
Subject: Re: [PATCH v5 12/17] fm10k: Add scatter receive function

Hello,

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark)
<jing.d.chen <at> intel.com<mailto:jing.d.chen <at> intel.com>> wrote:

[snip]

+               if (unlikely(ret != 0)) {
+                       PMD_RX_LOG(ERR, "Failed to alloc mbuf");

Idem mono segment.
rx_mbuf_alloc_failed++ ?

[Mark] Thanks, I’ll change that.


--
David Marchand
Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 13/17] fm10k: add function to set vlan

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_vlan_filter_set to set vlan.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index ead1585..e28a94c 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -787,6 +787,20  <at>  <at>  fm10k_dev_infos_get(struct rte_eth_dev *dev,

 }

+static int
+fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	PMD_INIT_FUNC_TRACE();
+
+	/*  <at> todo - add support for the VF */
+	if (hw->mac.type != fm10k_mac_pf)
+		return -ENOTSUP;
+
+	return fm10k_update_vlan(hw, vlan_id, 0, on);
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 14/17] fm10k: Add SRIOV-VF support

From: Jeff Shaw <jeffrey.b.shaw@...>

fm10k pmd driver will support both PF and VF device with single
copy of code. The reason is NIC maps registers with same
function in PF and VF to same PCI I/O address. Then, PF/VF drivers
use same address to access registers belonging to it, HW will
translate the request to correct units.

For some functionalities that are unique to PF, driver will check
current driver type and behave correctly.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index e28a94c..c3b4914 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1563,6 +1563,7  <at>  <at>  eth_fm10k_dev_init(__rte_unused struct eth_driver *eth_drv,
  */
 static struct rte_pci_id pci_id_fm10k_map[] = {
 #define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
 #include "rte_pci_dev_ids.h"
 	{ .vendor_id = 0, /* sentinel */ },
 };
--

-- 
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 16/17] maintainers: claim for fm10k review

From: "Chen Jing D(Mark)" <jing.d.chen@...>

Claim for fm10k polling mode driver review.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 MAINTAINERS |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index a771fa3..e7a425b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
 <at>  <at>  -213,6 +213,10  <at>  <at>  Intel i40e
 M: Helin Zhang <helin.zhang@...>
 F: lib/librte_pmd_i40e/

+Intel fm10k
+M: Jing Chen <jing.d.chen@...>
+F: lib/librte_pmd_fm10k/
+
 RedHat virtio
 M: Changchun Ouyang <changchun.ouyang@...>
 F: lib/librte_pmd_virtio/
--

-- 
1.7.7.6

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 17/17] fm10k: Add ABI version of librte_pmd_fm10k

From: Michael Qiu <michael.qiu@...>

ABI version must be specified, set to version 1 for DPDK 2.0

Signed-off-by: Michael Qiu <michael.qiu@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile                  |    4 ++++
 lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
index 8ab788c..986f4ef 100644
--- a/lib/librte_pmd_fm10k/Makefile
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -39,6 +39,10  <at>  <at>  LIB = librte_pmd_fm10k.a
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)

+EXPORT_MAP := rte_pmd_fm10k_version.map
+
+LIBABIVER := 1
+
 ifeq ($(CC), icc)
 #
 # CFLAGS for icc
diff --git a/lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map b/lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map
new file mode 100644
index 0000000..ef35398
(Continue reading)

Chen Jing D(Mark | 13 Feb 09:19 2015
Picon

[PATCH v5 15/17] fm10k: add PF and VF interrupt handling function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add functions to enable PF/VF interrupt.
2. Add function to process error message passed from interrupt.
2. Add 2 interrupt handling functions, one for PF and one for VF.
2. Enable interrupt after completing initialization of NIC.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  268 +++++++++++++++++++++++++++++++++++
 1 files changed, 268 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index c3b4914..0a095c8 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1345,6 +1345,256  <at>  <at>  fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }

+static void
+fm10k_dev_enable_intr_pf(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t int_map = FM10K_INT_MAP_IMMEDIATE;
+
+	/* Bind all local non-queue interrupt to vector 0 */
+	int_map |= 0;
+
(Continue reading)

David Marchand | 13 Feb 12:42 2015

Re: [PATCH v5 15/17] fm10k: add PF and VF interrupt handling function

Hello,

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark) <jing.d.chen@...>
wrote:

[snip]

+
> +       /* Only INT 0 availiable, other 15 are reserved. */
>

available.

--

-- 
David Marchand

Chen, Jing D | 17 Feb 14:12 2015
Picon

Re: [PATCH v5 15/17] fm10k: add PF and VF interrupt handling function

Hi,

From: David Marchand [mailto:david.marchand <at> 6wind.com]
Sent: Friday, February 13, 2015 7:42 PM
To: Chen, Jing D
Cc: dev <at> dpdk.org; Zhang, Helin; Qiu, Michael; Neil Horman; Thomas Monjalon; Shaw, Jeffrey B
Subject: Re: [PATCH v5 15/17] fm10k: add PF and VF interrupt handling function

Hello,

On Fri, Feb 13, 2015 at 9:19 AM, Chen Jing D(Mark)
<jing.d.chen <at> intel.com<mailto:jing.d.chen <at> intel.com>> wrote:

[snip]

+
+       /* Only INT 0 availiable, other 15 are reserved. */

available.

[Mark] Thanks, I’ll change it.


--
David Marchand
Zhang, Helin | 13 Feb 09:37 2015
Picon

Re: [PATCH v5 00/17] lib/librte_pmd_fm10k : fm10k pmd driver


> -----Original Message-----
> From: Chen, Jing D
> Sent: Friday, February 13, 2015 4:20 PM
> To: dev@...
> Cc: Zhang, Helin; Qiu, Michael; nhorman@...;
> thomas.monjalon@...;
david.marchand@...; Chen, Jing D
> Subject: [PATCH v5 00/17] lib/librte_pmd_fm10k : fm10k pmd driver
> 
> From: "Chen Jing D(Mark)" <jing.d.chen@...>
> 
> The patch set add poll mode driver for the host interface of Intel Ethernet
> Switch FM10000 Series of silicons, which integrate NIC and switch
> functionalities. The patch set include below features:
> 
> 1. Basic RX/TX functions for PF/VF.
> 2. Interrupt handling mechanism for PF/VF.
> 3. per queue start/stop functions for PF/VF.
> 4. Mailbox handling between PF/VF and PF/Switch Manager.
> 5. Receive Side Scaling (RSS) for PF/VF.
> 6. Scatter receive function for PF/VF.
> 7. reta update/query for PF/VF.
> 8. VLAN filter set for PF.
> 9. Link status query for PF/VF.
> 
> Change in v5:
> - Add sanity check for mbuf allocation.
> - Add a new patch to claim fm10k driver review
> - Change commit log.
(Continue reading)

Qiu, Michael | 15 Feb 06:07 2015
Picon

Re: [PATCH v5 00/17] lib/librte_pmd_fm10k : fm10k pmd driver

On 2/13/2015 4:20 PM, Chen, Jing D wrote:
> From: "Chen Jing D(Mark)" <jing.d.chen@...>
>
> The patch set add poll mode driver for the host interface of Intel
> Ethernet Switch FM10000 Series of silicons, which integrate NIC and
> switch functionalities. The patch set include below features:
>
> 1. Basic RX/TX functions for PF/VF.
> 2. Interrupt handling mechanism for PF/VF.
> 3. per queue start/stop functions for PF/VF.
> 4. Mailbox handling between PF/VF and PF/Switch Manager.
> 5. Receive Side Scaling (RSS) for PF/VF.
> 6. Scatter receive function for PF/VF.
> 7. reta update/query for PF/VF.
> 8. VLAN filter set for PF.
> 9. Link status query for PF/VF.
>
> Change in v5:
> - Add sanity check for mbuf allocation.
> - Add a new patch to claim fm10k driver review
> - Change commit log.
> - Add unlikely in func rx_desc_to_ol_flags to gain performance
> - Add a new patch to add ABI version
>
> Change in v4:
> - Change commit log to remove improper words.
>
> Changes in v3:
> - Update base driver.
> - Define several macros to pass base driver compile.
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 06/15] fm10k: add rx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_rx_queue_setup and fm10k_rx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  255 +++++++++++++++++++++++++++++++++++
 1 files changed, 255 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index b3d4d79..63e8a65 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -41,6 +41,7  <at>  <at> 
 #include "fm10k.h"
 #include "base/fm10k_api.h"

+#define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

 <at>  <at>  -67,6 +68,46  <at>  <at>  fm10k_mbx_unlock(struct fm10k_hw *hw)
 	rte_spinlock_unlock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back));
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device.
+ */
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 07/15] fm10k: add tx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_tx_queue_setup and fm10k_tx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  205 +++++++++++++++++++++++++++++++++++
 1 files changed, 205 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 63e8a65..caaccf6 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -108,6 +108,48  <at>  <at>  rx_queue_free(struct fm10k_rx_queue *q)
 	}
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device
+ */
+static inline void
+tx_queue_clean(struct fm10k_tx_queue *q)
+{
+	struct fm10k_tx_desc zero = {0, 0, 0, 0, 0, 0};
+	uint32_t i;
+	PMD_INIT_FUNC_TRACE();
+
+	/* zero descriptor rings */
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 08/15] fm10k: add RX/TX single queue start/stop function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add 4 functions fm10k_dev_rx_queue_start,
   fm10k_dev_rx_queue_stop, fm10k_dev_tx_queue_start,
   and fm10k_dev_tx_queue_stop.
2. verify Rx packet buffer alignment is valid.
   Hardware requires specific alignment for Rx packet buffers. At
   least one of the following two conditions must be satisfied.
       1) Address is 512B aligned
       2) Address is 8B aligned and buffer does not cross 4K boundary.

   Alignment is checked by the driver when the Rx queue is reset. It
   is assumed that if an entire descriptor ring can be filled with
   buffers containing valid alignment, then all buffers in that mempool
   have valid address alignment. It is the responsibility of the user
   to ensure all buffers have valid alignment, as it is the user who
   creates the mempool.

   It is assumed the buffer needs only to store a maximum size Ethernet
   frame.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |   59 +++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  222 +++++++++++++++++++++++++++++++++++
 2 files changed, 281 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index 1468040..be990e5 100644
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 09/15] fm10k: add dev start/stop functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add function to initialize RX queues.
2. Add function to initialize TX queues.
3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
   functions.
4. Add function to close mailbox service.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  224 +++++++++++++++++++++++++++++++++++
 1 files changed, 224 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 4a893e1..011b0bc 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,11 +44,14  <at>  <at> 
 #define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20
+#define UINT64_LOWER_32BITS_MASK 0x00000000ffffffffULL

 /* Number of chars per uint32 type */
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)

+static void fm10k_close_mbx_service(struct fm10k_hw *hw);
+
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 10/15] fm10k: add receive and tranmit function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_pkts and fm10k_xmit_pkts functions.
2. Link app function pointer to actual fm10k recv/xmit
   functions.
3. Change Makefile to compile new file fm10k_rxtx.c

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |    1 +
 lib/librte_pmd_fm10k/fm10k.h        |    7 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    2 +
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  299 +++++++++++++++++++++++++++++++++++
 4 files changed, 309 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
index 1da84e9..8ab788c 100644
--- a/lib/librte_pmd_fm10k/Makefile
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -79,6 +79,7  <at>  <at>  VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base
 # all source are stored in SRCS-y
 #
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_rxtx.c

 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_pf.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_tlv.c
diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
(Continue reading)

Jeff Shaw | 11 Feb 18:28 2015
Picon

Re: [PATCH v4 10/15] fm10k: add receive and tranmit function

On Wed, Feb 11, 2015 at 09:31:33AM +0800, Chen Jing D(Mark) wrote:

> +uint16_t
> +fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
> +	uint16_t nb_pkts)
> +{
> +	struct rte_mbuf *mbuf;
> +	union fm10k_rx_desc desc;
> +	struct fm10k_rx_queue *q = rx_queue;
> +	uint16_t count = 0;
> +	int alloc = 0;
> +	uint16_t next_dd;
> +
> +	next_dd = q->next_dd;
> +
> +	nb_pkts = RTE_MIN(nb_pkts, q->alloc_thresh);
> +	for (count = 0; count < nb_pkts; ++count) {
> +		mbuf = q->sw_ring[next_dd];
> +		desc = q->hw_ring[next_dd];
> +		if (!(desc.d.staterr & FM10K_RXD_STATUS_DD))
> +			break;
> +#ifdef RTE_LIBRTE_FM10K_DEBUG_RX
> +		dump_rxd(&desc);
> +#endif
> +		rte_pktmbuf_pkt_len(mbuf) = desc.w.length;
> +		rte_pktmbuf_data_len(mbuf) = desc.w.length;
> +
> +		mbuf->ol_flags = 0;
> +#ifdef RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE
> +		rx_desc_to_ol_flags(mbuf, &desc);
(Continue reading)

Chen, Jing D | 12 Feb 05:04 2015
Picon

Re: [PATCH v4 10/15] fm10k: add receive and tranmit function


> -----Original Message-----
> From: Shaw, Jeffrey B
> Sent: Thursday, February 12, 2015 1:29 AM
> To: Chen, Jing D
> Cc: dev@...; Zhang, Helin; Qiu, Michael; nhorman@...;
> thomas.monjalon@...; david.marchand@...
> Subject: Re: [PATCH v4 10/15] fm10k: add receive and tranmit function
> 
> On Wed, Feb 11, 2015 at 09:31:33AM +0800, Chen Jing D(Mark) wrote:
> 
> > +uint16_t
> > +fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
> > +	uint16_t nb_pkts)
> > +{
> > +	struct rte_mbuf *mbuf;
> > +	union fm10k_rx_desc desc;
> > +	struct fm10k_rx_queue *q = rx_queue;
> > +	uint16_t count = 0;
> > +	int alloc = 0;
> > +	uint16_t next_dd;
> > +
> > +	next_dd = q->next_dd;
> > +
> > +	nb_pkts = RTE_MIN(nb_pkts, q->alloc_thresh);
> > +	for (count = 0; count < nb_pkts; ++count) {
> > +		mbuf = q->sw_ring[next_dd];
> > +		desc = q->hw_ring[next_dd];
> > +		if (!(desc.d.staterr & FM10K_RXD_STATUS_DD))
> > +			break;
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 11/15] fm10k: add PF RSS support

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Configure RSS in fm10k_dev_rx_init function.
2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
   and inquery RSS configuration.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  156 +++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index af68ad7..d434b02 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -270,6 +270,78  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

+static void
+fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	uint32_t mrqc, *key, i, reta, j;
+	uint64_t hf;
+
+#define RSS_KEY_SIZE 40
+	static uint8_t rss_intel_key[RSS_KEY_SIZE] = {
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 13/15] fm10k: add function to set vlan

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_vlan_filter_set to set vlan.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index a2fcd63..1cf6def 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -787,6 +787,20  <at>  <at>  fm10k_dev_infos_get(struct rte_eth_dev *dev,

 }

+static int
+fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	PMD_INIT_FUNC_TRACE();
+
+	/*  <at> todo - add support for the VF */
+	if (hw->mac.type != fm10k_mac_pf)
+		return -ENOTSUP;
+
+	return fm10k_update_vlan(hw, vlan_id, 0, on);
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 12/15] fm10k: Add scatter receive function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_scattered_pkts function to receive jumbo frame
   and multi-segment packets.
2. Configure correct receive function in rx_init and dev_init.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |    3 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 ++++
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  128 +++++++++++++++++++++++++++++++++++
 3 files changed, 146 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index a9b19cd..8741936 100644
--- a/lib/librte_pmd_fm10k/fm10k.h
+++ b/lib/librte_pmd_fm10k/fm10k.h
 <at>  <at>  -285,6 +285,9  <at>  <at>  fm10k_addr_alignment_valid(struct rte_mbuf *mb)
 uint16_t fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t nb_pkts);

+uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
+		struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+
 uint16_t fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t nb_pkts);
 #endif
diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index d434b02..a2fcd63 100644
(Continue reading)

Jeff Shaw | 11 Feb 18:32 2015
Picon

Re: [PATCH v4 12/15] fm10k: Add scatter receive function

On Wed, Feb 11, 2015 at 09:31:35AM +0800, Chen Jing D(Mark) wrote:
>  
> +uint16_t
> +fm10k_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
> +				uint16_t nb_pkts)
> +{
> +	struct rte_mbuf *mbuf;
> +	union fm10k_rx_desc desc;
> +	struct fm10k_rx_queue *q = rx_queue;
> +	uint16_t count = 0;
> +	uint16_t nb_rcv, nb_seg;
> +	int alloc = 0;
> +	uint16_t next_dd;
> +	struct rte_mbuf *first_seg = q->pkt_first_seg;
> +	struct rte_mbuf *last_seg = q->pkt_last_seg;
> +
> +	next_dd = q->next_dd;
> +	nb_rcv = 0;
> +
> +	nb_seg = RTE_MIN(nb_pkts, q->alloc_thresh);
> +	for (count = 0; count < nb_seg; count++) {
> +		mbuf = q->sw_ring[next_dd];
> +		desc = q->hw_ring[next_dd];
> +		if (!(desc.d.staterr & FM10K_RXD_STATUS_DD))
> +			break;
> +#ifdef RTE_LIBRTE_FM10K_DEBUG_RX
> +		dump_rxd(&desc);
> +#endif
> +
> +		if (++next_dd == q->nb_desc) {
(Continue reading)

Chen, Jing D | 12 Feb 05:04 2015
Picon

Re: [PATCH v4 12/15] fm10k: Add scatter receive function


> -----Original Message-----
> From: Shaw, Jeffrey B
> Sent: Thursday, February 12, 2015 1:33 AM
> To: Chen, Jing D
> Cc: dev@...; Zhang, Helin; Qiu, Michael; nhorman@...;
> thomas.monjalon@...; david.marchand@...
> Subject: Re: [PATCH v4 12/15] fm10k: Add scatter receive function
> 
> On Wed, Feb 11, 2015 at 09:31:35AM +0800, Chen Jing D(Mark) wrote:
> >
> > +uint16_t
> > +fm10k_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
> > +				uint16_t nb_pkts)
> > +{
> > +	struct rte_mbuf *mbuf;
> > +	union fm10k_rx_desc desc;
> > +	struct fm10k_rx_queue *q = rx_queue;
> > +	uint16_t count = 0;
> > +	uint16_t nb_rcv, nb_seg;
> > +	int alloc = 0;
> > +	uint16_t next_dd;
> > +	struct rte_mbuf *first_seg = q->pkt_first_seg;
> > +	struct rte_mbuf *last_seg = q->pkt_last_seg;
> > +
> > +	next_dd = q->next_dd;
> > +	nb_rcv = 0;
> > +
> > +	nb_seg = RTE_MIN(nb_pkts, q->alloc_thresh);
> > +	for (count = 0; count < nb_seg; count++) {
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 14/15] fm10k: Add SRIOV-VF support

From: Jeff Shaw <jeffrey.b.shaw@...>

fm10k pmd driver will support both PF and VF device with single
copy of code. The reason is NIC maps registers with same
function in PF and VF to same PCI I/O address. Then, PF/VF drivers
use same address to access registers belonging to it, HW will
translate the request to correct units.

For some functionalities that are unique to PF, driver will check
current driver type and behave correctly.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 1cf6def..8969d84 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1563,6 +1563,7  <at>  <at>  eth_fm10k_dev_init(__rte_unused struct eth_driver *eth_drv,
  */
 static struct rte_pci_id pci_id_fm10k_map[] = {
 #define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
 #include "rte_pci_dev_ids.h"
 	{ .vendor_id = 0, /* sentinel */ },
 };
--

-- 
(Continue reading)

Chen Jing D(Mark | 11 Feb 02:31 2015
Picon

[PATCH v4 15/15] fm10k: add PF and VF interrupt handling function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add functions to enable PF/VF interrupt.
2. Add function to process error message passed from interrupt.
2. Add 2 interrupt handling functions, one for PF and one for VF.
2. Enable interrupt after completing initialization of NIC.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  268 +++++++++++++++++++++++++++++++++++
 1 files changed, 268 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 8969d84..37b417c 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1345,6 +1345,256  <at>  <at>  fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }

+static void
+fm10k_dev_enable_intr_pf(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t int_map = FM10K_INT_MAP_IMMEDIATE;
+
+	/* Bind all local non-queue interrupt to vector 0 */
+	int_map |= 0;
+
(Continue reading)

Qiu, Michael | 11 Feb 02:50 2015
Picon

Re: [PATCH v4 00/15] lib/librte_pmd_fm10k : fm10k pmd driver

On 2/11/2015 9:31 AM, Chen, Jing D wrote:
> From: "Chen Jing D(Mark)" <jing.d.chen@...>
>
> The patch set add poll mode driver for the host interface of Intel
> fm10k series of silicons, which integrate NIC and switch 
> functionalities. The patch set include below features:
>
> 1. Basic RX/TX functions for PF/VF.
> 2. Interrupt handling mechanism for PF/VF.
> 3. per queue start/stop functions for PF/VF.
> 4. Mailbox handling between PF/VF and PF/Switch Manager.
> 5. Receive Side Scaling (RSS) for PF/VF.
> 6. Scatter receive function for PF/VF.
> 7. reta update/query for PF/VF.
> 8. VLAN filter set for PF.
> 9. Link status query for PF/VF.
>
> Change in v4:
> - Change commit log to remove improper words.
>
> Changes in v3:
> - Update base driver.
> - Define several macros to pass base driver compile.
>
> Changes in v2:
> - Merge 3 patches into 1 to configure fm10k compile environment.
> - Rework on log code to follow style in ixgbe.
> - Rework log message, remove redundant '\n'
> - Update Copyright year from "2014" to "2015"
> - Change base driver directory name from SHARED to base
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 04/15] Change config files to add fm10k into compile

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Change config/common_bsdapp and config/common_linuxapp, add
   macros to control fm10k pmd driver compile for linux and bsd.
2. Change lib/Makefile to add fm10k driver into compile list.
3. Change mk/rte.app.mk to add fm10k lib into link.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 config/common_bsdapp   |   11 +++++++++++
 config/common_linuxapp |   11 +++++++++++
 lib/Makefile           |    1 +
 mk/rte.app.mk          |    4 ++++
 4 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index 9177db1..77e8a64 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
 <at>  <at>  -182,6 +182,17  <at>  <at>  CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4
 CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1

 #
+# Compile burst-oriented FM10K PMD
+#
+CONFIG_RTE_LIBRTE_FM10K_PMD=y
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n
+CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 02/15] eal: add fm10k device id

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k device ID list into rte_pci_dev_ids.h.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index c922de9..f54800e 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
 <at>  <at>  -132,6 +132,14  <at>  <at> 
 #define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev)
 #endif

+#ifndef RTE_PCI_DEV_ID_DECL_FM10K
+#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_FM10KVF
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
 <at>  <at>  -474,6 +482,12  <at>  <at>  RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B)
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 05/15] fm10k: add reta update/requery functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_reta_update and fm10k_reta_query functions.
2. Add fm10k_link_update and fm10k_dev_infos_get functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  162 +++++++++++++++++++++++++++++++++++
 1 files changed, 162 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 0b75299..b3d4d79 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,6 +44,10  <at>  <at> 
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

+/* Number of chars per uint32 type */
+#define CHARS_PER_UINT32 (sizeof(uint32_t))
+#define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
+
 static void
 fm10k_mbx_initlock(struct fm10k_hw *hw)
 {
 <at>  <at>  -74,6 +78,22  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 06/15] fm10k: add rx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_rx_queue_setup and fm10k_rx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  255 +++++++++++++++++++++++++++++++++++
 1 files changed, 255 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index b3d4d79..63e8a65 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -41,6 +41,7  <at>  <at> 
 #include "fm10k.h"
 #include "base/fm10k_api.h"

+#define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

 <at>  <at>  -67,6 +68,46  <at>  <at>  fm10k_mbx_unlock(struct fm10k_hw *hw)
 	rte_spinlock_unlock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back));
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device.
+ */
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 07/15] fm10k: add tx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_tx_queue_setup and fm10k_tx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  205 +++++++++++++++++++++++++++++++++++
 1 files changed, 205 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 63e8a65..caaccf6 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -108,6 +108,48  <at>  <at>  rx_queue_free(struct fm10k_rx_queue *q)
 	}
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device
+ */
+static inline void
+tx_queue_clean(struct fm10k_tx_queue *q)
+{
+	struct fm10k_tx_desc zero = {0, 0, 0, 0, 0, 0};
+	uint32_t i;
+	PMD_INIT_FUNC_TRACE();
+
+	/* zero descriptor rings */
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 09/15] fm10k: add dev start/stop functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add function to initialize RX queues.
2. Add function to initialize TX queues.
3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
   functions.
4. Add function to close mailbox service.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  224 +++++++++++++++++++++++++++++++++++
 1 files changed, 224 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 4a893e1..011b0bc 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,11 +44,14  <at>  <at> 
 #define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20
+#define UINT64_LOWER_32BITS_MASK 0x00000000ffffffffULL

 /* Number of chars per uint32 type */
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)

+static void fm10k_close_mbx_service(struct fm10k_hw *hw);
+
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 10/15] fm10k: add receive and tranmit function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_pkts and fm10k_xmit_pkts functions.
2. Link app function pointer to actual fm10k recv/xmit
   functions.
3. Change Makefile to compile new file fm10k_rxtx.c

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |    1 +
 lib/librte_pmd_fm10k/fm10k.h        |    7 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    2 +
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  299 +++++++++++++++++++++++++++++++++++
 4 files changed, 309 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
index 1da84e9..8ab788c 100644
--- a/lib/librte_pmd_fm10k/Makefile
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -79,6 +79,7  <at>  <at>  VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base
 # all source are stored in SRCS-y
 #
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_rxtx.c

 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_pf.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_tlv.c
diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 12/15] fm10k: Add scatter receive function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_scattered_pkts function to receive jumbo frame
   and multi-segment packets.
2. Configure correct receive function in rx_init and dev_init.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |    3 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 ++++
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  128 +++++++++++++++++++++++++++++++++++
 3 files changed, 146 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index a9b19cd..8741936 100644
--- a/lib/librte_pmd_fm10k/fm10k.h
+++ b/lib/librte_pmd_fm10k/fm10k.h
 <at>  <at>  -285,6 +285,9  <at>  <at>  fm10k_addr_alignment_valid(struct rte_mbuf *mb)
 uint16_t fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t nb_pkts);

+uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
+		struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+
 uint16_t fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t nb_pkts);
 #endif
diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index d434b02..a2fcd63 100644
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 03/15] fm10k: register fm10k pmd PF driver

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add init function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.
4. Add fm10k.h to define macros and basic data structure.
5. Add fm10k_logs.h to control log message output.
6. Add Makefile.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |   95 ++++++++++
 lib/librte_pmd_fm10k/fm10k.h        |  224 +++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  343 +++++++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_logs.h   |   78 ++++++++
 4 files changed, 740 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/Makefile
 create mode 100644 lib/librte_pmd_fm10k/fm10k.h
 create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
 create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
new file mode 100644
index 0000000..1da84e9
--- /dev/null
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -0,0 +1,95  <at>  <at> 
+#   BSD LICENSE
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 08/15] fm10k: add RX/TX single queue start/stop function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add 4 functions fm10k_dev_rx_queue_start,
   fm10k_dev_rx_queue_stop, fm10k_dev_tx_queue_start,
   and fm10k_dev_tx_queue_stop.
2. verify Rx packet buffer alignment is valid.
   Hardware requires specific alignment for Rx packet buffers. At
   least one of the following two conditions must be satisfied.
       1) Address is 512B aligned
       2) Address is 8B aligned and buffer does not cross 4K boundary.

   Alignment is checked by the driver when the Rx queue is reset. It
   is assumed that if an entire descriptor ring can be filled with
   buffers containing valid alignment, then all buffers in that mempool
   have valid address alignment. It is the responsibility of the user
   to ensure all buffers have valid alignment, as it is the user who
   creates the mempool.

   It is assumed the buffer needs only to store a maximum size Ethernet
   frame.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |   59 +++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  222 +++++++++++++++++++++++++++++++++++
 2 files changed, 281 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index 1468040..be990e5 100644
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 14/15] fm10k: Add SRIOV-VF support

From: Jeff Shaw <jeffrey.b.shaw@...>

fm10k pmd driver will support both PF and VF device with single
copy of code. The reason is NIC maps registers with same
function in PF and VF to same PCI I/O address. Then, PF/VF drivers
use same address to access registers belonging to it, HW will
translate the request to correct units.

For some functionalities that are unique to PF, driver will check
current driver type and behave correctly.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 1cf6def..8969d84 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1563,6 +1563,7  <at>  <at>  eth_fm10k_dev_init(__rte_unused struct eth_driver *eth_drv,
  */
 static struct rte_pci_id pci_id_fm10k_map[] = {
 #define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
 #include "rte_pci_dev_ids.h"
 	{ .vendor_id = 0, /* sentinel */ },
 };
--

-- 
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 13/15] fm10k: add function to set vlan

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_vlan_filter_set to set vlan.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index a2fcd63..1cf6def 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -787,6 +787,20  <at>  <at>  fm10k_dev_infos_get(struct rte_eth_dev *dev,

 }

+static int
+fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	PMD_INIT_FUNC_TRACE();
+
+	/*  <at> todo - add support for the VF */
+	if (hw->mac.type != fm10k_mac_pf)
+		return -ENOTSUP;
+
+	return fm10k_update_vlan(hw, vlan_id, 0, on);
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 15/15] fm10k: add PF and VF interrupt handling function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add functions to enable PF/VF interrupt.
2. Add function to process error message passed from interrupt.
2. Add 2 interrupt handling functions, one for PF and one for VF.
2. Enable interrupt after completing initialization of NIC.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  268 +++++++++++++++++++++++++++++++++++
 1 files changed, 268 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 8969d84..37b417c 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1345,6 +1345,256  <at>  <at>  fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }

+static void
+fm10k_dev_enable_intr_pf(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t int_map = FM10K_INT_MAP_IMMEDIATE;
+
+	/* Bind all local non-queue interrupt to vector 0 */
+	int_map |= 0;
+
(Continue reading)

Chen Jing D(Mark | 10 Feb 08:02 2015
Picon

[PATCH v3 11/15] fm10k: add PF RSS support

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Configure RSS in fm10k_dev_rx_init function.
2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
   and inquery RSS configuration.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  156 +++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index af68ad7..d434b02 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -270,6 +270,78  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

+static void
+fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	uint32_t mrqc, *key, i, reta, j;
+	uint64_t hf;
+
+#define RSS_KEY_SIZE 40
+	static uint8_t rss_intel_key[RSS_KEY_SIZE] = {
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 05/15] fm10k: add reta update/requery functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_reta_update and fm10k_reta_query functions.
2. Add fm10k_link_update and fm10k_dev_infos_get functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  162 +++++++++++++++++++++++++++++++++++
 1 files changed, 162 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 0b75299..b3d4d79 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,6 +44,10  <at>  <at> 
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

+/* Number of chars per uint32 type */
+#define CHARS_PER_UINT32 (sizeof(uint32_t))
+#define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
+
 static void
 fm10k_mbx_initlock(struct fm10k_hw *hw)
 {
 <at>  <at>  -74,6 +78,22  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 06/15] fm10k: add rx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_rx_queue_setup and fm10k_rx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  255 +++++++++++++++++++++++++++++++++++
 1 files changed, 255 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index b3d4d79..63e8a65 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -41,6 +41,7  <at>  <at> 
 #include "fm10k.h"
 #include "base/fm10k_api.h"

+#define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

 <at>  <at>  -67,6 +68,46  <at>  <at>  fm10k_mbx_unlock(struct fm10k_hw *hw)
 	rte_spinlock_unlock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back));
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device.
+ */
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 07/15] fm10k: add tx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_tx_queue_setup and fm10k_tx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  205 +++++++++++++++++++++++++++++++++++
 1 files changed, 205 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 63e8a65..caaccf6 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -108,6 +108,48  <at>  <at>  rx_queue_free(struct fm10k_rx_queue *q)
 	}
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device
+ */
+static inline void
+tx_queue_clean(struct fm10k_tx_queue *q)
+{
+	struct fm10k_tx_desc zero = {0, 0, 0, 0, 0, 0};
+	uint32_t i;
+	PMD_INIT_FUNC_TRACE();
+
+	/* zero descriptor rings */
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 08/15] fm10k: add RX/TX single queue start/stop function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add 4 functions fm10k_dev_rx_queue_start,
   fm10k_dev_rx_queue_stop, fm10k_dev_tx_queue_start,
   and fm10k_dev_tx_queue_stop.
2. verify Rx packet buffer alignment is valid.
   Hardware requires specific alignment for Rx packet buffers. At
   least one of the following two conditions must be satisfied.
       1) Address is 512B aligned
       2) Address is 8B aligned and buffer does not cross 4K boundary.

   Alignment is checked by the driver when the Rx queue is reset. It
   is assumed that if an entire descriptor ring can be filled with
   buffers containing valid alignment, then all buffers in that mempool
   have valid address alignment. It is the responsibility of the user
   to ensure all buffers have valid alignment, as it is the user who
   creates the mempool.

   It is assumed the buffer needs only to store a maximum size Ethernet
   frame.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |   59 +++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  222 +++++++++++++++++++++++++++++++++++
 2 files changed, 281 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index 1468040..be990e5 100644
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 09/15] fm10k: add dev start/stop functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add function to initialize RX queues.
2. Add function to initialize TX queues.
3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
   functions.
4. Add function to close mailbox service.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  224 +++++++++++++++++++++++++++++++++++
 1 files changed, 224 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 4a893e1..011b0bc 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,11 +44,14  <at>  <at> 
 #define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20
+#define UINT64_LOWER_32BITS_MASK 0x00000000ffffffffULL

 /* Number of chars per uint32 type */
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)

+static void fm10k_close_mbx_service(struct fm10k_hw *hw);
+
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 10/15] fm10k: add receive and tranmit function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_pkts and fm10k_xmit_pkts functions.
2. Link app function pointer to actual fm10k recv/xmit
   functions.
3. Change Makefile to compile new file fm10k_rxtx.c

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile       |    1 +
 lib/librte_pmd_fm10k/fm10k.h        |    7 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    2 +
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  299 +++++++++++++++++++++++++++++++++++
 4 files changed, 309 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
index 1da84e9..8ab788c 100644
--- a/lib/librte_pmd_fm10k/Makefile
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -79,6 +79,7  <at>  <at>  VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base
 # all source are stored in SRCS-y
 #
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_ethdev.c
+SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_rxtx.c

 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_pf.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_tlv.c
diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 11/15] fm10k: add PF RSS support

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Configure RSS in fm10k_dev_rx_init function.
2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
   and inquery RSS configuration.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  156 +++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index af68ad7..d434b02 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -270,6 +270,78  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

+static void
+fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	uint32_t mrqc, *key, i, reta, j;
+	uint64_t hf;
+
+#define RSS_KEY_SIZE 40
+	static uint8_t rss_intel_key[RSS_KEY_SIZE] = {
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 12/15] fm10k: Add scatter receive function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_scattered_pkts function to receive jumbo frame
   and multi-segment packets.
2. Configure correct receive function in rx_init and dev_init.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |    3 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 ++++
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  128 +++++++++++++++++++++++++++++++++++
 3 files changed, 146 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index a9b19cd..8741936 100644
--- a/lib/librte_pmd_fm10k/fm10k.h
+++ b/lib/librte_pmd_fm10k/fm10k.h
 <at>  <at>  -285,6 +285,9  <at>  <at>  fm10k_addr_alignment_valid(struct rte_mbuf *mb)
 uint16_t fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t nb_pkts);

+uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
+		struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+
 uint16_t fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t nb_pkts);
 #endif
diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index d434b02..a2fcd63 100644
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 13/15] fm10k: add function to set vlan

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_vlan_filter_set to set vlan.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index a2fcd63..1cf6def 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -787,6 +787,20  <at>  <at>  fm10k_dev_infos_get(struct rte_eth_dev *dev,

 }

+static int
+fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	PMD_INIT_FUNC_TRACE();
+
+	/*  <at> todo - add support for the VF */
+	if (hw->mac.type != fm10k_mac_pf)
+		return -ENOTSUP;
+
+	return fm10k_update_vlan(hw, vlan_id, 0, on);
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:40 2015
Picon

[PATCH v2 14/15] fm10k: Add SRIOV-VF support

From: Jeff Shaw <jeffrey.b.shaw@...>

fm10k pmd driver will support both PF and VF device with single
copy of code. The reason is NIC maps registers with same
function in PF and VF to same PCI I/O address. Then, PF/VF drivers
use same address to access registers belonging to it, HW will
translate the request to correct units.

For some functionalities that are unique to PF, driver will check
current driver type and behave correctly.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 1cf6def..8969d84 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1563,6 +1563,7  <at>  <at>  eth_fm10k_dev_init(__rte_unused struct eth_driver *eth_drv,
  */
 static struct rte_pci_id pci_id_fm10k_map[] = {
 #define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
 #include "rte_pci_dev_ids.h"
 	{ .vendor_id = 0, /* sentinel */ },
 };
--

-- 
(Continue reading)

Chen Jing D(Mark | 4 Feb 11:41 2015
Picon

[PATCH v2 15/15] fm10k: add PF and VF interrupt handling function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add functions to enable PF/VF interrupt.
2. Add function to process error message passed from interrupt.
2. Add 2 interrupt handling functions, one for PF and one for VF.
2. Enable interrupt after completing initialization of NIC.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  268 +++++++++++++++++++++++++++++++++++
 1 files changed, 268 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 8969d84..37b417c 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1345,6 +1345,256  <at>  <at>  fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }

+static void
+fm10k_dev_enable_intr_pf(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t int_map = FM10K_INT_MAP_IMMEDIATE;
+
+	/* Bind all local non-queue interrupt to vector 0 */
+	int_map |= 0;
+
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 05/18] fm10k: Add code to register fm10k pmd PF driver

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add function to scan and initialize fm10k PF device.
2. Add implementation to register fm10k pmd PF driver.
3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
   fm10k_stats_get.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  339 +++++++++++++++++++++++++++++++++++
 1 files changed, 339 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index e69de29..400d841 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -0,0 +1,339  <at>  <at> 
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2013-2014 Intel Corporation. All rights reserved.
+ *   All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
(Continue reading)

Qiu, Michael | 2 Feb 10:10 2015
Picon

Re: [PATCH 05/18] fm10k: Add code to register fm10k pmd PF driver

On 1/30/2015 1:08 PM, Chen, Jing D wrote:
> From: Jeff Shaw <jeffrey.b.shaw@...>
>
> 1. Add function to scan and initialize fm10k PF device.
> 2. Add implementation to register fm10k pmd PF driver.
> 3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
>    fm10k_stats_get.
>
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  lib/librte_pmd_fm10k/fm10k_ethdev.c |  339 +++++++++++++++++++++++++++++++++++
>  1 files changed, 339 insertions(+), 0 deletions(-)
>
> diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> index e69de29..400d841 100644
> --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
>  <at>  <at>  -0,0 +1,339  <at>  <at> 
> +/*-
> + *   BSD LICENSE
> + *
> + *   Copyright(c) 2013-2014 Intel Corporation. All rights reserved.
> + *   All rights reserved.
> + *
> + *   Redistribution and use in source and binary forms, with or without
> + *   modification, are permitted provided that the following conditions
> + *   are met:
> + *
> + *     * Redistributions of source code must retain the above copyright
(Continue reading)

Chen, Jing D | 2 Feb 10:21 2015
Picon

Re: [PATCH 05/18] fm10k: Add code to register fm10k pmd PF driver

Hi Michael,

> -----Original Message-----
> From: Qiu, Michael
> Sent: Monday, February 02, 2015 5:10 PM
> To: Chen, Jing D; dev@...
> Cc: Zhang, Helin; Shaw, Jeffrey B
> Subject: Re: [PATCH 05/18] fm10k: Add code to register fm10k pmd PF driver
> 
> On 1/30/2015 1:08 PM, Chen, Jing D wrote:
> > From: Jeff Shaw <jeffrey.b.shaw@...>
> >
> > 1. Add function to scan and initialize fm10k PF device.
> > 2. Add implementation to register fm10k pmd PF driver.
> > 3. Add 3 functions fm10k_dev_configure, fm10k_stats_get and
> >    fm10k_stats_get.
> >
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > ---
> >  lib/librte_pmd_fm10k/fm10k_ethdev.c |  339
> +++++++++++++++++++++++++++++++++++
> >  1 files changed, 339 insertions(+), 0 deletions(-)
> >
> > diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> > index e69de29..400d841 100644
> > --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> > +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> >  <at>  <at>  -0,0 +1,339  <at>  <at> 
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 03/18] fm10k: Add empty fm10k files

From: Jeff Shaw <jeffrey.b.shaw@...>

Define macros and basic data structure.
Define rte_log wrapper functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/Makefile     |   96 ++++++++++++++++
 lib/librte_pmd_fm10k/fm10k.h      |  224 +++++++++++++++++++++++++++++++++++++
 lib/librte_pmd_fm10k/fm10k_logs.h |   66 +++++++++++
 3 files changed, 386 insertions(+), 0 deletions(-)
 create mode 100644 lib/librte_pmd_fm10k/Makefile
 create mode 100644 lib/librte_pmd_fm10k/fm10k.h
 create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
 create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h
 create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c

diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
new file mode 100644
index 0000000..3d76387
--- /dev/null
+++ b/lib/librte_pmd_fm10k/Makefile
 <at>  <at>  -0,0 +1,96  <at>  <at> 
+#   BSD LICENSE
+#
+#   Copyright(c) 2013-2014 Intel Corporation. All rights reserved.
+#   All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
(Continue reading)

Neil Horman | 31 Jan 15:02 2015

Re: [PATCH 03/18] fm10k: Add empty fm10k files

On Fri, Jan 30, 2015 at 01:07:19PM +0800, Chen Jing D(Mark) wrote:
> From: Jeff Shaw <jeffrey.b.shaw@...>
> 
> Define macros and basic data structure.
> Define rte_log wrapper functions.
> 
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  lib/librte_pmd_fm10k/Makefile     |   96 ++++++++++++++++
>  lib/librte_pmd_fm10k/fm10k.h      |  224 +++++++++++++++++++++++++++++++++++++
>  lib/librte_pmd_fm10k/fm10k_logs.h |   66 +++++++++++
>  3 files changed, 386 insertions(+), 0 deletions(-)
>  create mode 100644 lib/librte_pmd_fm10k/Makefile
>  create mode 100644 lib/librte_pmd_fm10k/fm10k.h
>  create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
>  create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h
>  create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c
> 
Why are you adding empty files?

Neil

Chen, Jing D | 2 Feb 06:34 2015
Picon

Re: [PATCH 03/18] fm10k: Add empty fm10k files

Hi Neil,

> -----Original Message-----
> From: Neil Horman [mailto:nhorman@...]
> Sent: Saturday, January 31, 2015 10:02 PM
> To: Chen, Jing D
> Cc: dev@...
> Subject: Re: [dpdk-dev] [PATCH 03/18] fm10k: Add empty fm10k files
> 
> On Fri, Jan 30, 2015 at 01:07:19PM +0800, Chen Jing D(Mark) wrote:
> > From: Jeff Shaw <jeffrey.b.shaw@...>
> >
> > Define macros and basic data structure.
> > Define rte_log wrapper functions.
> >
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > ---
> >  lib/librte_pmd_fm10k/Makefile     |   96 ++++++++++++++++
> >  lib/librte_pmd_fm10k/fm10k.h      |  224
> +++++++++++++++++++++++++++++++++++++
> >  lib/librte_pmd_fm10k/fm10k_logs.h |   66 +++++++++++
> >  3 files changed, 386 insertions(+), 0 deletions(-)
> >  create mode 100644 lib/librte_pmd_fm10k/Makefile
> >  create mode 100644 lib/librte_pmd_fm10k/fm10k.h
> >  create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
> >  create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h
> >  create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c
> >
> Why are you adding empty files?
(Continue reading)

Neil Horman | 2 Feb 14:38 2015

Re: [PATCH 03/18] fm10k: Add empty fm10k files

On Mon, Feb 02, 2015 at 05:34:43AM +0000, Chen, Jing D wrote:
> Hi Neil,
> 
> > -----Original Message-----
> > From: Neil Horman [mailto:nhorman@...]
> > Sent: Saturday, January 31, 2015 10:02 PM
> > To: Chen, Jing D
> > Cc: dev@...
> > Subject: Re: [dpdk-dev] [PATCH 03/18] fm10k: Add empty fm10k files
> > 
> > On Fri, Jan 30, 2015 at 01:07:19PM +0800, Chen Jing D(Mark) wrote:
> > > From: Jeff Shaw <jeffrey.b.shaw@...>
> > >
> > > Define macros and basic data structure.
> > > Define rte_log wrapper functions.
> > >
> > > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > > ---
> > >  lib/librte_pmd_fm10k/Makefile     |   96 ++++++++++++++++
> > >  lib/librte_pmd_fm10k/fm10k.h      |  224
> > +++++++++++++++++++++++++++++++++++++
> > >  lib/librte_pmd_fm10k/fm10k_logs.h |   66 +++++++++++
> > >  3 files changed, 386 insertions(+), 0 deletions(-)
> > >  create mode 100644 lib/librte_pmd_fm10k/Makefile
> > >  create mode 100644 lib/librte_pmd_fm10k/fm10k.h
> > >  create mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c
> > >  create mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h
> > >  create mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c
> > >
(Continue reading)

Chen, Jing D | 3 Feb 07:47 2015
Picon

Re: [PATCH 03/18] fm10k: Add empty fm10k files

Hi Neil,

> -----Original Message-----
> From: Neil Horman [mailto:nhorman@...]
> Sent: Monday, February 02, 2015 9:39 PM
> To: Chen, Jing D
> Cc: dev@...
> Subject: Re: [dpdk-dev] [PATCH 03/18] fm10k: Add empty fm10k files
> 
> On Mon, Feb 02, 2015 at 05:34:43AM +0000, Chen, Jing D wrote:
> > Hi Neil,
> >
> > > -----Original Message-----
> > > From: Neil Horman [mailto:nhorman@...]
> > > Sent: Saturday, January 31, 2015 10:02 PM
> > > To: Chen, Jing D
> > > Cc: dev@...
> > > Subject: Re: [dpdk-dev] [PATCH 03/18] fm10k: Add empty fm10k files
> > >
> > > On Fri, Jan 30, 2015 at 01:07:19PM +0800, Chen Jing D(Mark) wrote:
> > > > From: Jeff Shaw <jeffrey.b.shaw@...>
> > > >
> > > > Define macros and basic data structure.
> > > > Define rte_log wrapper functions.
> > > >
> > > > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > > > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > > > ---
> > > >  lib/librte_pmd_fm10k/Makefile     |   96 ++++++++++++++++
> > > >  lib/librte_pmd_fm10k/fm10k.h      |  224
(Continue reading)

David Marchand | 1 Feb 14:01 2015

Re: [PATCH 03/18] fm10k: Add empty fm10k files

On Fri, Jan 30, 2015 at 6:07 AM, Chen Jing D(Mark) <jing.d.chen@...>
wrote:

> From: Jeff Shaw <jeffrey.b.shaw@...>
>
> Define macros and basic data structure.
> Define rte_log wrapper functions.
>

This comment applies to the logs macro (and the rest of the patchset).
- don't use a build option for logs to be displayed, especially if these
are init messages or error messages that prevent the pmd from working
- you can remove this "Use RTE_LOG directly to make sure this error is
seen." in fm10k_rx_queue_setup if you use a "init" macro that is not under
a build option
- don't use \n in logs, only one is enough

Please, check the cleanup work that has been done in other Intel pmd (for
example, ixgbe).

I would really prefer we have consistent logs across dpdk.

--

-- 
David Marchand

>
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  lib/librte_pmd_fm10k/Makefile     |   96 ++++++++++++++++
(Continue reading)

Chen, Jing D | 2 Feb 10:25 2015
Picon

Re: [PATCH 03/18] fm10k: Add empty fm10k files

Hi David,

From: David Marchand [mailto:david.marchand <at> 6wind.com] 
Sent: Sunday, February 01, 2015 9:01 PM
To: Chen, Jing D
Cc: dev <at> dpdk.org
Subject: Re: [dpdk-dev] [PATCH 03/18] fm10k: Add empty fm10k files

On Fri, Jan 30, 2015 at 6:07 AM, Chen Jing D(Mark) <jing.d.chen <at> intel.com> wrote:
From: Jeff Shaw <jeffrey.b.shaw <at> intel.com>

Define macros and basic data structure.
Define rte_log wrapper functions.

This comment applies to the logs macro (and the rest of the patchset).
- don't use a build option for logs to be displayed, especially if these are init messages or error messages
that prevent the pmd from working
- you can remove this "Use RTE_LOG directly to make sure this error is seen." in fm10k_rx_queue_setup if you
use a "init" macro that is not under a build option
- don't use \n in logs, only one is enough

Please, check the cleanup work that has been done in other Intel pmd (for example, ixgbe).

I would really prefer we have consistent logs across dpdk.

[Mark] Thanks for your comments. I'll check it.
-- 
David Marchand
 

(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 06/18] fm10k: add reta update/requery functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_reta_update and fm10k_reta_query functions.
2. Add fm10k_link_update and fm10k_dev_infos_get functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  161 +++++++++++++++++++++++++++++++++++
 1 files changed, 161 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 400d841..991d6ee 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -44,6 +44,10  <at>  <at> 
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

+/* Number of chars per uint32 type */
+#define CHARS_PER_UINT32 (sizeof(uint32_t))
+#define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
+
 static void
 fm10k_mbx_initlock(struct fm10k_hw *hw)
 {
 <at>  <at>  -74,6 +78,22  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 08/18] fm10k: add tx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_tx_queue_setup and fm10k_tx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  203 +++++++++++++++++++++++++++++++++++
 1 files changed, 203 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 32388cd..2decf30 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -108,6 +108,48  <at>  <at>  rx_queue_free(struct fm10k_rx_queue *q)
 	}
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device
+ */
+static inline void
+tx_queue_clean(struct fm10k_tx_queue *q)
+{
+	struct fm10k_tx_desc zero = {0, 0, 0, 0, 0, 0};
+	uint32_t i;
+	PMD_FUNC_TRACE();
+
+	/* zero descriptor rings */
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 07/18] fm10k: add rx_queue_setup/release function

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_rx_queue_setup and fm10k_rx_queue_release functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  253 +++++++++++++++++++++++++++++++++++
 1 files changed, 253 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 991d6ee..32388cd 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -41,6 +41,7  <at>  <at> 
 #include "fm10k.h"
 #include "SHARED/fm10k_api.h"

+#define FM10K_RX_BUFF_ALIGN 512
 /* Default delay to acquire mailbox lock */
 #define FM10K_MBXLOCK_DELAY_US 20

 <at>  <at>  -67,6 +68,46  <at>  <at>  fm10k_mbx_unlock(struct fm10k_hw *hw)
 	rte_spinlock_unlock(FM10K_DEV_PRIVATE_TO_MBXLOCK(hw->back));
 }

+/*
+ * clean queue, descriptor rings, free software buffers used when stopping
+ * device.
+ */
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 09/18] fm10k: add RX/TX single queue start/stop function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add 4 functions fm10k_dev_rx_queue_start,
   fm10k_dev_rx_queue_stop, fm10k_dev_tx_queue_start,
   and fm10k_dev_tx_queue_stop.
2. verify Rx packet buffer alignment is valid.
   Hardware requires specific alignment for Rx packet buffers. At
   least one of the following two conditions must be satisfied.
   1. Address is 512B aligned
   2. Address is 8B aligned and buffer does not cross 4K boundary.

   Alignment is checked by the driver when the Rx queue is reset. It
   is assumed that if an entire descriptor ring can be filled with
   buffers containing valid alignment, then all buffers in that mempool
   have valid address alignment. It is the responsibility of the user
   to ensure all buffers have valid alignment, as it is the user who
   creates the mempool.

   It is assumed the buffer needs only to store a maximum size Ethernet
   frame.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |   59 ++++++++++
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  214 +++++++++++++++++++++++++++++++++++
 2 files changed, 273 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index 9b2d3da..6e9effa 100644
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 10/18] fm10k: add dev start/stop functions

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add function to initialize single RX queue.
2. Add function to initialize single TX queue.
3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
   functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  220 +++++++++++++++++++++++++++++++++++
 1 files changed, 220 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index b4b49cd..3cf5e25 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -49,6 +49,8  <at>  <at> 
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)

+static void fm10k_close_mbx_service(struct fm10k_hw *hw);
+
 static void
 fm10k_mbx_initlock(struct fm10k_hw *hw)
 {
 <at>  <at>  -268,6 +270,98  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 }

 static int
(Continue reading)

Qiu, Michael | 4 Feb 03:36 2015
Picon

Re: [PATCH 10/18] fm10k: add dev start/stop functions

On 1/30/2015 1:08 PM, Chen, Jing D wrote:
> From: Jeff Shaw <jeffrey.b.shaw@...>
>
> 1. Add function to initialize single RX queue.
> 2. Add function to initialize single TX queue.
> 3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
>    functions.
>
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  lib/librte_pmd_fm10k/fm10k_ethdev.c |  220 +++++++++++++++++++++++++++++++++++
>  1 files changed, 220 insertions(+), 0 deletions(-)
>
> diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> index b4b49cd..3cf5e25 100644
> --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
>  <at>  <at>  -49,6 +49,8  <at>  <at> 
>  #define CHARS_PER_UINT32 (sizeof(uint32_t))
>  #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
>  
> +static void fm10k_close_mbx_service(struct fm10k_hw *hw);
> +
>  static void
>  fm10k_mbx_initlock(struct fm10k_hw *hw)
>  {
>  <at>  <at>  -268,6 +270,98  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
>  }
>  
(Continue reading)

Chen, Jing D | 4 Feb 10:55 2015
Picon

Re: [PATCH 10/18] fm10k: add dev start/stop functions

Hi Michael,

> -----Original Message-----
> From: Qiu, Michael
> Sent: Wednesday, February 04, 2015 10:36 AM
> To: Chen, Jing D; dev@...
> Cc: Zhang, Helin; Shaw, Jeffrey B
> Subject: Re: [PATCH 10/18] fm10k: add dev start/stop functions
> 
> On 1/30/2015 1:08 PM, Chen, Jing D wrote:
> > From: Jeff Shaw <jeffrey.b.shaw@...>
> >
> > 1. Add function to initialize single RX queue.
> > 2. Add function to initialize single TX queue.
> > 3. Add fm10k_dev_start, fm10k_dev_stop and fm10k_dev_close
> >    functions.
> >
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > ---
> >  lib/librte_pmd_fm10k/fm10k_ethdev.c |  220
> +++++++++++++++++++++++++++++++++++
> >  1 files changed, 220 insertions(+), 0 deletions(-)
> >
> > diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> > index b4b49cd..3cf5e25 100644
> > --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> > +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> >  <at>  <at>  -49,6 +49,8  <at>  <at> 
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 11/18] fm10k: add receive and tranmit function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_pkts and fm10k_xmit_pkts functions.
2. Link app function pointer to actual fm10k recv/xmit
   functions.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |    7 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    2 +
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  299 +++++++++++++++++++++++++++++++++++
 3 files changed, 308 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index 6e9effa..bf8b132 100644
--- a/lib/librte_pmd_fm10k/fm10k.h
+++ b/lib/librte_pmd_fm10k/fm10k.h
 <at>  <at>  -280,4 +280,11  <at>  <at>  fm10k_addr_alignment_valid(struct rte_mbuf *mb)

 	return 0;
 }
+
+/* Rx and Tx prototypes */
+uint16_t fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+	uint16_t nb_pkts);
+
+uint16_t fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+	uint16_t nb_pkts);
 #endif
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 12/18] fm10k: add PF RSS support

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Configure RSS in fm10k_dev_rx_init function.
2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
   and inquery RSS configuration.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  156 +++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 9907906..4711047 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -269,6 +269,78  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
 	return 0;
 }

+static void
+fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	uint32_t mrqc, *key, i, reta, j;
+	uint64_t hf;
+
+#define RSS_KEY_SIZE 40
+	static uint8_t rss_intel_key[RSS_KEY_SIZE] = {
(Continue reading)

Neil Horman | 1 Feb 01:38 2015

Re: [PATCH 12/18] fm10k: add PF RSS support

On Fri, Jan 30, 2015 at 01:07:28PM +0800, Chen Jing D(Mark) wrote:
> From: Jeff Shaw <jeffrey.b.shaw@...>
> 
> 1. Configure RSS in fm10k_dev_rx_init function.
> 2. Add fm10k_rss_hash_update and fm10k_rss_hash_conf_get to get
>    and inquery RSS configuration.
> 
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  lib/librte_pmd_fm10k/fm10k_ethdev.c |  156 +++++++++++++++++++++++++++++++++++
>  1 files changed, 156 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> index 9907906..4711047 100644
> --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
>  <at>  <at>  -269,6 +269,78  <at>  <at>  fm10k_dev_configure(struct rte_eth_dev *dev)
>  	return 0;
>  }
>  
> +static void
> +fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
> +{
> +	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
> +	uint32_t mrqc, *key, i, reta, j;
> +	uint64_t hf;
> +
> +#define RSS_KEY_SIZE 40
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 13/18] fm10k: Add scatter receive function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add fm10k_recv_scattered_pkts function to receive jumbo frame
   and multi-segment packets.
2. Configure correct receive function in rx_init and dev_init.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k.h        |    3 +
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   15 ++++
 lib/librte_pmd_fm10k/fm10k_rxtx.c   |  128 +++++++++++++++++++++++++++++++++++
 3 files changed, 146 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k.h b/lib/librte_pmd_fm10k/fm10k.h
index bf8b132..8bdefad 100644
--- a/lib/librte_pmd_fm10k/fm10k.h
+++ b/lib/librte_pmd_fm10k/fm10k.h
 <at>  <at>  -285,6 +285,9  <at>  <at>  fm10k_addr_alignment_valid(struct rte_mbuf *mb)
 uint16_t fm10k_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	uint16_t nb_pkts);

+uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
+		struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
+
 uint16_t fm10k_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t nb_pkts);
 #endif
diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 4711047..b231c31 100644
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 14/18] fm10k: add function to set vlan

From: Jeff Shaw <jeffrey.b.shaw@...>

Add fm10k_vlan_filter_set to set vlan.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index b231c31..daa687e 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -772,6 +772,19  <at>  <at>  fm10k_dev_infos_get(struct rte_eth_dev *dev,

 }

+static int
+fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	PMD_FUNC_TRACE();
+
+	/*  <at> todo - add support for the VF */
+	if (hw->mac.type != fm10k_mac_pf)
+		return -ENOTSUP;
+
+	return fm10k_update_vlan(hw, vlan_id, 0, on);
+}
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 16/18] fm10k: add PF and VF interrupt handling function

From: Jeff Shaw <jeffrey.b.shaw@...>

1. Add 2 interrupt handling functions, one for PF and one for VF.
2. Enable interrupt after completing initialization of NIC.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |  268 +++++++++++++++++++++++++++++++++++
 1 files changed, 268 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index 40e3a2b..685fa8f 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1325,6 +1325,256  <at>  <at>  fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
 	return 0;
 }

+static void
+fm10k_dev_enable_intr_pf(struct rte_eth_dev *dev)
+{
+	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t int_map = FM10K_INT_MAP_IMMEDIATE;
+
+	/* Bind all local non-queue interrupt to vector 0 */
+	int_map |= 0;
+
+	FM10K_WRITE_REG(hw, FM10K_INT_MAP(fm10k_int_Mailbox), int_map);
+	FM10K_WRITE_REG(hw, FM10K_INT_MAP(fm10k_int_PCIeFault), int_map);
(Continue reading)

Neil Horman | 1 Feb 01:42 2015

Re: [PATCH 16/18] fm10k: add PF and VF interrupt handling function

On Fri, Jan 30, 2015 at 01:07:32PM +0800, Chen Jing D(Mark) wrote:
> From: Jeff Shaw <jeffrey.b.shaw@...>
> 
> 1. Add 2 interrupt handling functions, one for PF and one for VF.
> 2. Enable interrupt after completing initialization of NIC.
> 
This seems to do way more than enable interrupt handling.  Can you be a bit more
desriptive here?
Neil

> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  lib/librte_pmd_fm10k/fm10k_ethdev.c |  268 +++++++++++++++++++++++++++++++++++
>  1 files changed, 268 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
> index 40e3a2b..685fa8f 100644
> --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
> +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
>  <at>  <at>  -1325,6 +1325,256  <at>  <at>  fm10k_rss_hash_conf_get(struct rte_eth_dev *dev,
>  	return 0;
>  }
>  
> +static void
> +fm10k_dev_enable_intr_pf(struct rte_eth_dev *dev)
> +{
> +	struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +	uint32_t int_map = FM10K_INT_MAP_IMMEDIATE;
> +
(Continue reading)

Chen, Jing D | 2 Feb 08:59 2015
Picon

Re: [PATCH 16/18] fm10k: add PF and VF interrupt handling function

Hi Neil,

> -----Original Message-----
> From: Neil Horman [mailto:nhorman@...]
> Sent: Sunday, February 01, 2015 8:43 AM
> To: Chen, Jing D
> Cc: dev@...
> Subject: Re: [dpdk-dev] [PATCH 16/18] fm10k: add PF and VF interrupt
> handling function
> 
> On Fri, Jan 30, 2015 at 01:07:32PM +0800, Chen Jing D(Mark) wrote:
> > From: Jeff Shaw <jeffrey.b.shaw@...>
> >
> > 1. Add 2 interrupt handling functions, one for PF and one for VF.
> > 2. Enable interrupt after completing initialization of NIC.
> >
> This seems to do way more than enable interrupt handling.  Can you be a bit
> more
> desriptive here?

OK, I'll try to add more description in the log. 

> Neil
> 
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > ---
> >  lib/librte_pmd_fm10k/fm10k_ethdev.c |  268
> +++++++++++++++++++++++++++++++++++
> >  1 files changed, 268 insertions(+), 0 deletions(-)
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 17/18] Change lib/Makefile to add fm10k driver into compile list.

From: Jeff Shaw <jeffrey.b.shaw@...>

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/Makefile b/lib/Makefile
index 0ffc982..b1f3860 100644
--- a/lib/Makefile
+++ b/lib/Makefile
 <at>  <at>  -43,6 +43,7  <at>  <at>  DIRS-$(CONFIG_RTE_LIBRTE_ETHER) += librte_ether
 DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += librte_pmd_e1000
 DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_ixgbe
 DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e
+DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += librte_pmd_fm10k
 DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += librte_pmd_enic
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond
 DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring
--

-- 
1.7.7.6

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 18/18] Change mk/rte.app.mk to add fm10k lib into link

From: Jeff Shaw <jeffrey.b.shaw@...>

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 mk/rte.app.mk |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 4294d9a..87d8763 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
 <at>  <at>  -211,6 +211,10  <at>  <at>  ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
 LDLIBS += -lrte_pmd_i40e
 endif

+ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
+LDLIBS += -lrte_pmd_fm10k
+endif
+
 ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
 LDLIBS += -lrte_pmd_ixgbe
 endif
--

-- 
1.7.7.6

Neil Horman | 1 Feb 01:50 2015

Re: [PATCH 18/18] Change mk/rte.app.mk to add fm10k lib into link

On Fri, Jan 30, 2015 at 01:07:34PM +0800, Chen Jing D(Mark) wrote:
> From: Jeff Shaw <jeffrey.b.shaw@...>
> 
> Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> ---
>  mk/rte.app.mk |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/mk/rte.app.mk b/mk/rte.app.mk
> index 4294d9a..87d8763 100644
> --- a/mk/rte.app.mk
> +++ b/mk/rte.app.mk
>  <at>  <at>  -211,6 +211,10  <at>  <at>  ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
>  LDLIBS += -lrte_pmd_i40e
>  endif
>  
> +ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
> +LDLIBS += -lrte_pmd_fm10k
> +endif
> +
>  ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
>  LDLIBS += -lrte_pmd_ixgbe
>  endif
> -- 
> 1.7.7.6
> 
> 
This patch should be merged with patch 17, and patch 2, and placed at the end of
your series to avoid a FTBFS issue
(Continue reading)

Chen, Jing D | 2 Feb 09:10 2015
Picon

Re: [PATCH 18/18] Change mk/rte.app.mk to add fm10k lib into link

Hi Neil,

> -----Original Message-----
> From: Neil Horman [mailto:nhorman@...]
> Sent: Sunday, February 01, 2015 8:51 AM
> To: Chen, Jing D
> Cc: dev@...
> Subject: Re: [dpdk-dev] [PATCH 18/18] Change mk/rte.app.mk to add fm10k
> lib into link
> 
> On Fri, Jan 30, 2015 at 01:07:34PM +0800, Chen Jing D(Mark) wrote:
> > From: Jeff Shaw <jeffrey.b.shaw@...>
> >
> > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > ---
> >  mk/rte.app.mk |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/mk/rte.app.mk b/mk/rte.app.mk
> > index 4294d9a..87d8763 100644
> > --- a/mk/rte.app.mk
> > +++ b/mk/rte.app.mk
> >  <at>  <at>  -211,6 +211,10  <at>  <at>  ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
> >  LDLIBS += -lrte_pmd_i40e
> >  endif
> >
> > +ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
> > +LDLIBS += -lrte_pmd_fm10k
> > +endif
(Continue reading)

Thomas Monjalon | 2 Feb 09:39 2015

Re: [PATCH 18/18] Change mk/rte.app.mk to add fm10k lib into link

2015-02-02 08:10, Chen, Jing D:
> From: Neil Horman [mailto:nhorman@...]
> > This patch should be merged with patch 17, and patch 2, and placed at the
> > end of
> > your series to avoid a FTBFS issue
> 
> My rationale is to make every single patch not to break the compile. So, I'd like to
> add the binary library into compile and link in last 2 patches, after all the actual code
> are patched.  For Patch 2, I think you are right, maybe a better way is to move it as 
> patch "16". 
> 
> But I'm not sure whether I should merge these 3 together. You know, somebody may
> not happy to see the changes in different directory to appear in single patch.

No, I think you are wrong. You can have modifications in different directories
in a patch. A patch must be atomic (one addition/change/feature at a time) and
buildable. In your case, it would be best to have a patch allowing compilation
of fm10k after the patch for "register". So it would mean we are able to test
the minimal driver and each feature added after.

Thanks
--

-- 
Thomas

Chen, Jing D | 2 Feb 09:59 2015
Picon

Re: [PATCH 18/18] Change mk/rte.app.mk to add fm10k lib into link

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@...]
> Sent: Monday, February 02, 2015 4:39 PM
> To: Chen, Jing D
> Cc: dev@...; Neil Horman
> Subject: Re: [dpdk-dev] [PATCH 18/18] Change mk/rte.app.mk to add fm10k
> lib into link
> 
> 2015-02-02 08:10, Chen, Jing D:
> > From: Neil Horman [mailto:nhorman@...]
> > > This patch should be merged with patch 17, and patch 2, and placed at the
> > > end of
> > > your series to avoid a FTBFS issue
> >
> > My rationale is to make every single patch not to break the compile. So, I'd
> like to
> > add the binary library into compile and link in last 2 patches, after all the
> actual code
> > are patched.  For Patch 2, I think you are right, maybe a better way is to
> move it as
> > patch "16".
> >
> > But I'm not sure whether I should merge these 3 together. You know,
> somebody may
> > not happy to see the changes in different directory to appear in single
> patch.
> 
> No, I think you are wrong. You can have modifications in different directories
(Continue reading)

Neil Horman | 2 Feb 14:46 2015

Re: [PATCH 18/18] Change mk/rte.app.mk to add fm10k lib into link

On Mon, Feb 02, 2015 at 08:10:17AM +0000, Chen, Jing D wrote:
> Hi Neil,
> 
> > -----Original Message-----
> > From: Neil Horman [mailto:nhorman@...]
> > Sent: Sunday, February 01, 2015 8:51 AM
> > To: Chen, Jing D
> > Cc: dev@...
> > Subject: Re: [dpdk-dev] [PATCH 18/18] Change mk/rte.app.mk to add fm10k
> > lib into link
> > 
> > On Fri, Jan 30, 2015 at 01:07:34PM +0800, Chen Jing D(Mark) wrote:
> > > From: Jeff Shaw <jeffrey.b.shaw@...>
> > >
> > > Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
> > > Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
> > > ---
> > >  mk/rte.app.mk |    4 ++++
> > >  1 files changed, 4 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/mk/rte.app.mk b/mk/rte.app.mk
> > > index 4294d9a..87d8763 100644
> > > --- a/mk/rte.app.mk
> > > +++ b/mk/rte.app.mk
> > >  <at>  <at>  -211,6 +211,10  <at>  <at>  ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
> > >  LDLIBS += -lrte_pmd_i40e
> > >  endif
> > >
> > > +ifeq ($(CONFIG_RTE_LIBRTE_FM10K_PMD),y)
> > > +LDLIBS += -lrte_pmd_fm10k
(Continue reading)

Chen Jing D(Mark | 30 Jan 06:07 2015
Picon

[PATCH 15/18] fm10k: Add SRIOV-VF support

From: Jeff Shaw <jeffrey.b.shaw@...>

fm10k pmd driver will support both PF and VF device with single
copy of code. The reason is NIC maps registers with same
function in PF and VF to same PCI I/O address. Then, PF/VF drivers
use same address to access registers belonging to it, HW will
translatethe request to correct units.

For some functionalities that is unique to PF, driver will check
current driver type and behave correctly.

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@...>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@...>
---
 lib/librte_pmd_fm10k/fm10k_ethdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c
index daa687e..40e3a2b 100644
--- a/lib/librte_pmd_fm10k/fm10k_ethdev.c
+++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c
 <at>  <at>  -1541,6 +1541,7  <at>  <at>  eth_fm10k_dev_init(__rte_unused struct eth_driver *eth_drv,
  */
 static struct rte_pci_id pci_id_fm10k_map[] = {
 #define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
+#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
 #include "rte_pci_dev_ids.h"
 	{ .vendor_id = 0, /* sentinel */ },
 };
--

-- 
(Continue reading)

Neil Horman | 30 Jan 22:26 2015

Re: [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd driver

On Fri, Jan 30, 2015 at 01:07:16PM +0800, Chen Jing D(Mark) wrote:
> From: "Chen Jing D(Mark)" <jing.d.chen@...>
> 
> The patch set add poll mode driver for the host interface of Intel
> Red Rock Canyon silicon, which integrates NIC and switch functionalities.
> The patch set include below features:
> 
> 1. Basic RX/TX functions for PF/VF.
> 2. Interrupt handling mechanism for PF/VF.
> 3. per queue start/stop functions for PF/VF.
> 4. Mailbox handling between PF/VF and PF/Switch Manager.
> 5. Receive Side Scaling (RSS) for PF/VF.
> 6. Scatter receive function for PF/VF.
> 7. reta update/query for PF/VF.
> 8. VLAN filter set for PF.
> 9. Link status query for PF/VF.
> 
> Jeff Shaw (18):
>   fm10k: add base driver
>   Change config/ files to add macros for fm10k
>   fm10k: Add empty fm10k files
>   fm10k: add fm10k device id
>   fm10k: Add code to register fm10k pmd PF driver
>   fm10k: add reta update/requery functions
>   fm10k: add rx_queue_setup/release function
>   fm10k: add tx_queue_setup/release function
>   fm10k: add RX/TX single queue start/stop function
>   fm10k: add dev start/stop functions
>   fm10k: add receive and tranmit function
>   fm10k: add PF RSS support
(Continue reading)

Jeff Shaw | 30 Jan 22:46 2015
Picon

Re: [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd driver

On Fri, Jan 30, 2015 at 04:26:33PM -0500, Neil Horman wrote:
> On Fri, Jan 30, 2015 at 01:07:16PM +0800, Chen Jing D(Mark) wrote:
> > From: "Chen Jing D(Mark)" <jing.d.chen@...>
> > 
> > The patch set add poll mode driver for the host interface of Intel
> > Red Rock Canyon silicon, which integrates NIC and switch functionalities.
> > The patch set include below features:
> > 
> > 1. Basic RX/TX functions for PF/VF.
> > 2. Interrupt handling mechanism for PF/VF.
> > 3. per queue start/stop functions for PF/VF.
> > 4. Mailbox handling between PF/VF and PF/Switch Manager.
> > 5. Receive Side Scaling (RSS) for PF/VF.
> > 6. Scatter receive function for PF/VF.
> > 7. reta update/query for PF/VF.
> > 8. VLAN filter set for PF.
> > 9. Link status query for PF/VF.
> > 
> > Jeff Shaw (18):
> >   fm10k: add base driver
> >   Change config/ files to add macros for fm10k
> >   fm10k: Add empty fm10k files
> >   fm10k: add fm10k device id
> >   fm10k: Add code to register fm10k pmd PF driver
> >   fm10k: add reta update/requery functions
> >   fm10k: add rx_queue_setup/release function
> >   fm10k: add tx_queue_setup/release function
> >   fm10k: add RX/TX single queue start/stop function
> >   fm10k: add dev start/stop functions
> >   fm10k: add receive and tranmit function
(Continue reading)

Thomas Monjalon | 30 Jan 23:19 2015

Re: [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd driver

2015-01-30 13:46, Jeff Shaw:
> On Fri, Jan 30, 2015 at 04:26:33PM -0500, Neil Horman wrote:
> > On Fri, Jan 30, 2015 at 01:07:16PM +0800, Chen Jing D(Mark) wrote:
> > > From: "Chen Jing D(Mark)" <jing.d.chen@...>
> > > Jeff Shaw (18):
> > >   fm10k: add base driver
[...]
> > >  lib/librte_pmd_fm10k/SHARED/fm10k_api.c         |  327 ++++
[...]
> > 
> > Why is there a SHARED directory in the driver?  Are there other drivers that use
> > the shared fm10k code?
> 
> No, the other poll-mode drivers do not use the shared fm10k code. The
> directory is similar to the 'ixgbe' and 'i40e' directories in their
> respective PMDs, only that it is named 'SHARED' for the fm10k driver.

So shared is a bad name in the context of DPDK.
Inside Intel, it can be understood that you share it between projects,
but in DPDK, it's only a base driver.

--

-- 
Thomas

Chen, Jing D | 2 Feb 03:59 2015
Picon

Re: [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd driver

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@...] On Behalf Of Thomas Monjalon
> Sent: Saturday, January 31, 2015 6:19 AM
> To: Shaw, Jeffrey B
> Cc: dev@...
> Subject: Re: [dpdk-dev] [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd
> driver
> 
> 2015-01-30 13:46, Jeff Shaw:
> > On Fri, Jan 30, 2015 at 04:26:33PM -0500, Neil Horman wrote:
> > > On Fri, Jan 30, 2015 at 01:07:16PM +0800, Chen Jing D(Mark) wrote:
> > > > From: "Chen Jing D(Mark)" <jing.d.chen@...>
> > > > Jeff Shaw (18):
> > > >   fm10k: add base driver
> [...]
> > > >  lib/librte_pmd_fm10k/SHARED/fm10k_api.c         |  327 ++++
> [...]
> > >
> > > Why is there a SHARED directory in the driver?  Are there other drivers
> that use
> > > the shared fm10k code?
> >
> > No, the other poll-mode drivers do not use the shared fm10k code. The
> > directory is similar to the 'ixgbe' and 'i40e' directories in their
> > respective PMDs, only that it is named 'SHARED' for the fm10k driver.
> 
> So shared is a bad name in the context of DPDK.
> Inside Intel, it can be understood that you share it between projects,
(Continue reading)

Thomas Monjalon | 2 Feb 09:19 2015

Re: [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd driver

2015-02-02 02:59, Chen, Jing D:
> Hi,
> 
> From: dev [mailto:dev-bounces@...] On Behalf Of Thomas Monjalon
> > 2015-01-30 13:46, Jeff Shaw:
> > > On Fri, Jan 30, 2015 at 04:26:33PM -0500, Neil Horman wrote:
> > > > On Fri, Jan 30, 2015 at 01:07:16PM +0800, Chen Jing D(Mark) wrote:
> > > > > From: "Chen Jing D(Mark)" <jing.d.chen@...>
> > > > > Jeff Shaw (18):
> > > > >   fm10k: add base driver
> > [...]
> > > > >  lib/librte_pmd_fm10k/SHARED/fm10k_api.c         |  327 ++++
> > [...]
> > > >
> > > > Why is there a SHARED directory in the driver?  Are there other drivers
> > that use
> > > > the shared fm10k code?
> > >
> > > No, the other poll-mode drivers do not use the shared fm10k code. The
> > > directory is similar to the 'ixgbe' and 'i40e' directories in their
> > > respective PMDs, only that it is named 'SHARED' for the fm10k driver.
> > 
> > So shared is a bad name in the context of DPDK.
> > Inside Intel, it can be understood that you share it between projects,
> > but in DPDK, it's only a base driver.
> > 
> 
> OK, I'll change "SHARED" to "fm10k".

I think that "base" would be more appropriate:
(Continue reading)

Chen, Jing D | 2 Feb 09:55 2015
Picon

Re: [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd driver

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@...]
> Sent: Monday, February 02, 2015 4:20 PM
> To: Chen, Jing D
> Cc: Shaw, Jeffrey B; dev@...
> Subject: Re: [dpdk-dev] [PATCH 00/18] lib/librte_pmd_fm10k : fm10k pmd
> driver
> 
> 2015-02-02 02:59, Chen, Jing D:
> > Hi,
> >
> > From: dev [mailto:dev-bounces@...] On Behalf Of Thomas Monjalon
> > > 2015-01-30 13:46, Jeff Shaw:
> > > > On Fri, Jan 30, 2015 at 04:26:33PM -0500, Neil Horman wrote:
> > > > > On Fri, Jan 30, 2015 at 01:07:16PM +0800, Chen Jing D(Mark) wrote:
> > > > > > From: "Chen Jing D(Mark)" <jing.d.chen@...>
> > > > > > Jeff Shaw (18):
> > > > > >   fm10k: add base driver
> > > [...]
> > > > > >  lib/librte_pmd_fm10k/SHARED/fm10k_api.c         |  327 ++++
> > > [...]
> > > > >
> > > > > Why is there a SHARED directory in the driver?  Are there other
> drivers
> > > that use
> > > > > the shared fm10k code?
> > > >
> > > > No, the other poll-mode drivers do not use the shared fm10k code. The
(Continue reading)


Gmane