[dpdk-dev,v2,01/16] fm10k: add new vPMD file
Commit Message
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
On Thu, 22 Oct 2015 17:44:49 +0800
"Chen Jing D(Mark)" <jing.d.chen@intel.com> wrote:
> +#ifndef __INTEL_COMPILER
> +#pragma GCC diagnostic ignored "-Wcast-qual"
> +#endif
Since this is new code, can't you make it work correctly
with Gcc. Rather than turning off a useful diagnostic.
Hi, Stephen,
Best Regards,
Mark
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Thursday, October 22, 2015 11:59 PM
> To: Chen, Jing D
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 01/16] fm10k: add new vPMD file
>
> On Thu, 22 Oct 2015 17:44:49 +0800
> "Chen Jing D(Mark)" <jing.d.chen@intel.com> wrote:
>
> > +#ifndef __INTEL_COMPILER
> > +#pragma GCC diagnostic ignored "-Wcast-qual"
> > +#endif
>
> Since this is new code, can't you make it work correctly
> with Gcc. Rather than turning off a useful diagnostic.
This macro is necessary for later SSE functions or I'll have to add some
Un-necessary cast to avoid compile failure.
I can add it in later patch. But it will have to show up anyway, right?
On Fri, Oct 23, 2015 at 08:39:56AM +0000, Chen, Jing D wrote:
> Hi, Stephen,
>
> Best Regards,
> Mark
>
>
> > -----Original Message-----
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Thursday, October 22, 2015 11:59 PM
> > To: Chen, Jing D
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2 01/16] fm10k: add new vPMD file
> >
> > On Thu, 22 Oct 2015 17:44:49 +0800
> > "Chen Jing D(Mark)" <jing.d.chen@intel.com> wrote:
> >
> > > +#ifndef __INTEL_COMPILER
> > > +#pragma GCC diagnostic ignored "-Wcast-qual"
> > > +#endif
> >
> > Since this is new code, can't you make it work correctly
> > with Gcc. Rather than turning off a useful diagnostic.
>
> This macro is necessary for later SSE functions or I'll have to add some
> Un-necessary cast to avoid compile failure.
>
> I can add it in later patch. But it will have to show up anyway, right?
Actually, casting won't make the warnings go away either. You'll always get a
warning about removing the volatile from the structure members when you pass
them to the intrinsic functions. Only option is to temporarily disable the warning
[or else write your own versions of the intrinsics that do support volatiles :-)]
/Bruce
Hi, Bruce,
Best Regards,
Mark
> -----Original Message-----
> From: Richardson, Bruce
> Sent: Friday, October 23, 2015 6:01 PM
> To: Chen, Jing D
> Cc: Stephen Hemminger; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 01/16] fm10k: add new vPMD file
>
> On Fri, Oct 23, 2015 at 08:39:56AM +0000, Chen, Jing D wrote:
> > Hi, Stephen,
> >
> > Best Regards,
> > Mark
> >
> >
> > > -----Original Message-----
> > > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > > Sent: Thursday, October 22, 2015 11:59 PM
> > > To: Chen, Jing D
> > > Cc: dev@dpdk.org
> > > Subject: Re: [dpdk-dev] [PATCH v2 01/16] fm10k: add new vPMD file
> > >
> > > On Thu, 22 Oct 2015 17:44:49 +0800
> > > "Chen Jing D(Mark)" <jing.d.chen@intel.com> wrote:
> > >
> > > > +#ifndef __INTEL_COMPILER
> > > > +#pragma GCC diagnostic ignored "-Wcast-qual"
> > > > +#endif
> > >
> > > Since this is new code, can't you make it work correctly
> > > with Gcc. Rather than turning off a useful diagnostic.
> >
> > This macro is necessary for later SSE functions or I'll have to add some
> > Un-necessary cast to avoid compile failure.
> >
> > I can add it in later patch. But it will have to show up anyway, right?
>
> Actually, casting won't make the warnings go away either. You'll always get a
> warning about removing the volatile from the structure members when you
> pass
> them to the intrinsic functions. Only option is to temporarily disable the
> warning
> [or else write your own versions of the intrinsics that do support volatiles :-)]
>
> /Bruce
Thanks for the clarifications. :)
From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>
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) (16):
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 func to re-allocate mbuf for RX ring
fm10k: add 2 functions to parse pkt_type and offload flag
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 | 5 +
drivers/net/fm10k/Makefile | 1 +
drivers/net/fm10k/fm10k.h | 45 ++-
drivers/net/fm10k/fm10k_ethdev.c | 169 ++++++-
drivers/net/fm10k/fm10k_rxtx_vec.c | 839 ++++++++++++++++++++++++++++++++++
5 files changed, 1031 insertions(+), 28 deletions(-)
create mode 100644 drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -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
new file mode 100644
@@ -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