[dpdk-dev,v4,01/16] fm10k: add new vPMD file

Message ID 1446110173-13330-2-git-send-email-jing.d.chen@intel.com (mailing list archive)
State Changes Requested, archived
Headers

Commit Message

Chen, Jing D Oct. 29, 2015, 9:15 a.m. UTC
  From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>

Add new file fm10k_rxtx_vec.c and add it into compiling.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
---
 drivers/net/fm10k/Makefile         |    1 +
 drivers/net/fm10k/fm10k_rxtx_vec.c |   45 ++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/fm10k/fm10k_rxtx_vec.c
  

Comments

Chen, Jing D Oct. 30, 2015, 8:02 a.m. UTC | #1
From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>

v5:
 - Fix some warnings reported by checkpatch.pl
 - Squash 3 patches into 1 to avoid compile error on unsued functions.
 - Sync with master branch

v4:
 - Clear HW/SW ring content after allocating mbuf failed.

v3:
 - Add a blank line after variable definition.
 - Do floor alignment for passing in argument nb_pkts to avoid memory overwritten.
 - Only scan max of 32 desc in scatter Rx function to avoid memory overwritten.

v2:
 - Fix a typo issue.
 - Fix an improper prefetch in vector RX function, in which prefetches
   un-initialized mbuf.
 - Remove limitation on number of desc pointer in vector RX function.
 - Re-organize some comments.
 - Add a new patch to fix a crash issue in vector RX func.
 - Add a new patch to update release notes.

v1:
This patch set includes Vector Rx/Tx functions to receive/transmit packets
for fm10k devices. It also contains logic to do sanity check for proper
RX/TX function selections.

Chen Jing D(Mark) (14):
  fm10k: add new vPMD file
  fm10k: add vPMD pre-condition check for each RX queue
  fm10k: Add a new func to initialize all parameters
  fm10k: add Vector RX function
  fm10k: add func to do Vector RX condition check
  fm10k: add Vector RX scatter function
  fm10k: add function to decide best RX function
  fm10k: add func to release mbuf in case Vector RX applied
  fm10k: add Vector TX function
  fm10k: use func pointer to reset TX queue and mbuf release
  fm10k: introduce 2 funcs to reset TX queue and mbuf release
  fm10k: Add function to decide best TX func
  fm10k: fix a crash issue in vector RX func
  doc: release notes update for fm10k Vector PMD

 doc/guides/rel_notes/release_2_2.rst |    6 +
 drivers/net/fm10k/Makefile           |    1 +
 drivers/net/fm10k/fm10k.h            |   45 ++-
 drivers/net/fm10k/fm10k_ethdev.c     |  172 ++++++-
 drivers/net/fm10k/fm10k_rxtx_vec.c   |  847 ++++++++++++++++++++++++++++++++++
 5 files changed, 1043 insertions(+), 28 deletions(-)
 create mode 100644 drivers/net/fm10k/fm10k_rxtx_vec.c
  
Cunming Liang Oct. 30, 2015, 8:26 a.m. UTC | #2
> -----Original Message-----
> From: Chen, Jing D
> Sent: Friday, October 30, 2015 4:03 PM
> To: dev@dpdk.org
> Cc: Liang, Cunming; Tao, Zhe; He, Shaopeng; Ananyev, Konstantin; Richardson,
> Bruce; Chen, Jing D
> Subject: [PATCH v5 00/14] Vector Rx/Tx PMD implementation for fm10k
> 
> From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>
> 
> v5:
>  - Fix some warnings reported by checkpatch.pl
>  - Squash 3 patches into 1 to avoid compile error on unsued functions.
>  - Sync with master branch
> 
> v4:
>  - Clear HW/SW ring content after allocating mbuf failed.
> 
> v3:
>  - Add a blank line after variable definition.
>  - Do floor alignment for passing in argument nb_pkts to avoid memory
> overwritten.
>  - Only scan max of 32 desc in scatter Rx function to avoid memory overwritten.
> 
> v2:
>  - Fix a typo issue.
>  - Fix an improper prefetch in vector RX function, in which prefetches
>    un-initialized mbuf.
>  - Remove limitation on number of desc pointer in vector RX function.
>  - Re-organize some comments.
>  - Add a new patch to fix a crash issue in vector RX func.
>  - Add a new patch to update release notes.
> 
> v1:
> This patch set includes Vector Rx/Tx functions to receive/transmit packets
> for fm10k devices. It also contains logic to do sanity check for proper
> RX/TX function selections.
> 
> Chen Jing D(Mark) (14):
>   fm10k: add new vPMD file
>   fm10k: add vPMD pre-condition check for each RX queue
>   fm10k: Add a new func to initialize all parameters
>   fm10k: add Vector RX function
>   fm10k: add func to do Vector RX condition check
>   fm10k: add Vector RX scatter function
>   fm10k: add function to decide best RX function
>   fm10k: add func to release mbuf in case Vector RX applied
>   fm10k: add Vector TX function
>   fm10k: use func pointer to reset TX queue and mbuf release
>   fm10k: introduce 2 funcs to reset TX queue and mbuf release
>   fm10k: Add function to decide best TX func
>   fm10k: fix a crash issue in vector RX func
>   doc: release notes update for fm10k Vector PMD
> 
>  doc/guides/rel_notes/release_2_2.rst |    6 +
>  drivers/net/fm10k/Makefile           |    1 +
>  drivers/net/fm10k/fm10k.h            |   45 ++-
>  drivers/net/fm10k/fm10k_ethdev.c     |  172 ++++++-
>  drivers/net/fm10k/fm10k_rxtx_vec.c   |  847
> ++++++++++++++++++++++++++++++++++
>  5 files changed, 1043 insertions(+), 28 deletions(-)
>  create mode 100644 drivers/net/fm10k/fm10k_rxtx_vec.c
> 
> --
> 1.7.7.6
Acked-by: Cunming Liang <cunming.liang@intel.com>
  
Thomas Monjalon Nov. 2, 2015, 8:38 a.m. UTC | #3
> > Chen Jing D(Mark) (14):
> >   fm10k: add new vPMD file
> >   fm10k: add vPMD pre-condition check for each RX queue
> >   fm10k: Add a new func to initialize all parameters
> >   fm10k: add Vector RX function
> >   fm10k: add func to do Vector RX condition check
> >   fm10k: add Vector RX scatter function
> >   fm10k: add function to decide best RX function
> >   fm10k: add func to release mbuf in case Vector RX applied
> >   fm10k: add Vector TX function
> >   fm10k: use func pointer to reset TX queue and mbuf release
> >   fm10k: introduce 2 funcs to reset TX queue and mbuf release
> >   fm10k: Add function to decide best TX func
> >   fm10k: fix a crash issue in vector RX func
> >   doc: release notes update for fm10k Vector PMD
> 
> Acked-by: Cunming Liang <cunming.liang@intel.com>

Applied, thanks
  

Patch

diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile
index a4a8f56..06ebf83 100644
--- a/drivers/net/fm10k/Makefile
+++ b/drivers/net/fm10k/Makefile
@@ -93,6 +93,7 @@  SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_common.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_mbx.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_vf.c
 SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_api.c
+SRCS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k_rxtx_vec.c
 
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += lib/librte_eal lib/librte_ether
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
new file mode 100644
index 0000000..69174d9
--- /dev/null
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -0,0 +1,45 @@ 
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2013-2015 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.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <inttypes.h>
+
+#include <rte_ethdev.h>
+#include <rte_common.h>
+#include "fm10k.h"
+#include "base/fm10k_type.h"
+
+#include <tmmintrin.h>
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wcast-qual"
+#endif