DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change
@ 2014-06-26  6:53 Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 1/5] ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n Cunming Liang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Cunming Liang @ 2014-06-26  6:53 UTC (permalink / raw)
  To: dev

This patch is used to fix several issue found in R1.7 RC1.
1. There's compiling error when change some defalut config in common_linuxapp.
   They are
       RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n
       RTE_LIBRTE_IEEE1588=y
2. Renaming RTE_IXGBE_RX_OLFLAGS_DISABLE to RTE_IXGBE_RX_OLFLAGS_ENABLE
   This avoid making user confused by defalut setting 'not DISABLE'.
3. Set testpmd defalut burst size to 32
   As vPMD RX only accept no less than 32, this avoid testpmd automation pass.
4. Change testpmd mbuf cache and rx/tx threshold defalut value.
   It makes easier to get better performance with vPMD.


*** BLURB HERE ***

Cunming Liang (5):
  ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and
    RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n
  ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y
  ixgbe: not 'DISABLE' may make confuse, change
    RTE_IXGBE_RX_OLFLAGS_DISABLE=n to RTE_IXGBE_RX_OLFLAGS_ENABLE=y
  ixgbe: set default burst size 32 in testpmd
  testpmd: change some of testpmd default parameter to well tuned value

 app/test-pmd/testpmd.c                | 6 +++---
 app/test-pmd/testpmd.h                | 4 +++-
 config/common_linuxapp                | 2 +-
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c     | 3 ++-
 lib/librte_pmd_ixgbe/ixgbe_rxtx.h     | 2 ++
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 5 +++--
 6 files changed, 14 insertions(+), 8 deletions(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 1/5] ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n
  2014-06-26  6:53 [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Cunming Liang
@ 2014-06-26  6:53 ` Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 2/5] ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y Cunming Liang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Cunming Liang @ 2014-06-26  6:53 UTC (permalink / raw)
  To: dev

The vpmd RX routine won't be used if RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC is not defined or its condition check fail.
The case RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n and RTE_IXGBE_INC_VECTOR=y may exist
when choose to use standard RX and optimized TX(ixgbe_xmit_pkts_vec/ixgbe_xmit_pkts_simple).

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h
index 26de64b..64c0695 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h
@@ -40,6 +40,8 @@
 #ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC
 #define RTE_PMD_IXGBE_RX_MAX_BURST 32
 #define RTE_IXGBE_DESCS_PER_LOOP           4
+#elif defined(RTE_IXGBE_INC_VECTOR)
+#define RTE_IXGBE_DESCS_PER_LOOP           4
 #else
 #define RTE_IXGBE_DESCS_PER_LOOP           1
 #endif
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 2/5] ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y
  2014-06-26  6:53 [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 1/5] ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n Cunming Liang
@ 2014-06-26  6:53 ` Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 3/5] ixgbe: not 'DISABLE' may make confuse, change RTE_IXGBE_RX_OLFLAGS_DISABLE=n to RTE_IXGBE_RX_OLFLAGS_ENABLE=y Cunming Liang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Cunming Liang @ 2014-06-26  6:53 UTC (permalink / raw)
  To: dev


Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index b8721dd..74d1b36 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -700,6 +700,7 @@ int ixgbe_rx_vec_condition_check(struct rte_eth_dev *dev)
 
 	return 0;
 #else
+	RTE_SET_USED(dev);
 	return -1;
 #endif
 }
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 3/5] ixgbe: not 'DISABLE' may make confuse, change RTE_IXGBE_RX_OLFLAGS_DISABLE=n to RTE_IXGBE_RX_OLFLAGS_ENABLE=y
  2014-06-26  6:53 [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 1/5] ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 2/5] ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y Cunming Liang
@ 2014-06-26  6:53 ` Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 4/5] ixgbe: set default burst size 32 in testpmd Cunming Liang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Cunming Liang @ 2014-06-26  6:53 UTC (permalink / raw)
  To: dev

RTE_IXGBE_RX_OLFLAGS_ENABLE gives a hint whick keeping packet type in RX ol_flags or not.
By default it is set to update ol_flags in RX mbuf header.
If unset it, will gain addtional performance, but will lose packet type information.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
---
 config/common_linuxapp                | 2 +-
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/common_linuxapp b/config/common_linuxapp
index 5b896c3..b19c4d9 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -192,7 +192,7 @@ CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n
 CONFIG_RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC=y
 CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=n
 CONFIG_RTE_IXGBE_INC_VECTOR=y
-CONFIG_RTE_IXGBE_RX_OLFLAGS_DISABLE=n
+CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y
 
 #
 # Compile burst-oriented I40E PMD driver
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
index 74d1b36..09e19a3 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c
@@ -145,7 +145,7 @@ ixgbe_rxq_rearm(struct igb_rx_queue *rxq)
  * gives improved performance, at the cost of losing the offload info
  * in the received packet
  */
-#ifndef RTE_IXGBE_RX_OLFLAGS_DISABLE
+#ifdef RTE_IXGBE_RX_OLFLAGS_ENABLE
 
 #define OLFLAGS_MASK     ((uint16_t)(PKT_RX_VLAN_PKT | PKT_RX_IPV4_HDR |\
 				     PKT_RX_IPV4_HDR_EXT | PKT_RX_IPV6_HDR |\
@@ -679,7 +679,7 @@ int ixgbe_rx_vec_condition_check(struct rte_eth_dev *dev)
 	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
 	struct rte_fdir_conf *fconf = &dev->data->dev_conf.fdir_conf;
 
-#ifdef RTE_IXGBE_RX_OLFLAGS_DISABLE
+#ifndef RTE_IXGBE_RX_OLFLAGS_ENABLE
 	/* whithout rx ol_flags, no VP flag report */
 	if (rxmode->hw_vlan_strip != 0 ||
 	    rxmode->hw_vlan_extend != 0)
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 4/5] ixgbe: set default burst size 32 in testpmd
  2014-06-26  6:53 [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Cunming Liang
                   ` (2 preceding siblings ...)
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 3/5] ixgbe: not 'DISABLE' may make confuse, change RTE_IXGBE_RX_OLFLAGS_DISABLE=n to RTE_IXGBE_RX_OLFLAGS_ENABLE=y Cunming Liang
@ 2014-06-26  6:53 ` Cunming Liang
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 5/5] testpmd: change some of testpmd default parameter to well tuned value Cunming Liang
  2014-06-26 12:33 ` [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Thomas Monjalon
  5 siblings, 0 replies; 7+ messages in thread
From: Cunming Liang @ 2014-06-26  6:53 UTC (permalink / raw)
  To: dev

The vpmd RX don't accept burst size less than 32.
As vPMD is set =y by default, while default testpmd burst size is 16.
Which will cause RX nothing if not assign burst size correctly.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
---
 app/test-pmd/testpmd.h            | 2 +-
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 5839f93..7e3beb6 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -63,7 +63,7 @@ int main(int argc, char **argv);
 #define RTE_MAX_SEGS_PER_PKT 255 /**< pkt.nb_segs is a 8-bit unsigned char. */
 
 #define MAX_PKT_BURST 512
-#define DEF_PKT_BURST 16
+#define DEF_PKT_BURST 32
 
 #define CACHE_LINE_SIZE_ROUNDUP(size) \
 	(CACHE_LINE_SIZE * ((size + CACHE_LINE_SIZE - 1) / CACHE_LINE_SIZE))
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 7f05b26..a5c8228 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -2168,7 +2168,8 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
 		dev->rx_pkt_burst = ixgbe_recv_pkts_bulk_alloc;
 #ifdef RTE_IXGBE_INC_VECTOR
 		if (!ixgbe_rx_vec_condition_check(dev)) {
-			PMD_INIT_LOG(INFO, "Vector rx enabled.\n");
+			PMD_INIT_LOG(INFO, "Vector rx enabled, please make "
+				     "sure RX burst size no less than 32.\n");
 			ixgbe_rxq_vec_setup(rxq, socket_id);
 			dev->rx_pkt_burst = ixgbe_recv_pkts_vec;
 		}
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH 5/5] testpmd: change some of testpmd default parameter to well tuned value
  2014-06-26  6:53 [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Cunming Liang
                   ` (3 preceding siblings ...)
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 4/5] ixgbe: set default burst size 32 in testpmd Cunming Liang
@ 2014-06-26  6:53 ` Cunming Liang
  2014-06-26 12:33 ` [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Thomas Monjalon
  5 siblings, 0 replies; 7+ messages in thread
From: Cunming Liang @ 2014-06-26  6:53 UTC (permalink / raw)
  To: dev

We usually use testpmd fwd to demostrate IO forwarding throughput.
For best throughput, it has to assign the special parameter to testpmd.
To makes it easier to run, now set it as defalut value.
Such parameters are MBUF Mempool Cache and RX/TX threshold registers.
    MBCACHE: 250
    RX threshold registers: pthresh=8 hthresh=8 wthresh=0
    TX threshold registers: pthresh=32 hthresh=0 wthresh=0

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Liu <yong.liu@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
---
 app/test-pmd/testpmd.c | 6 +++---
 app/test-pmd/testpmd.h | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 546d429..16fe596 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -174,7 +174,7 @@ uint16_t tx_pkt_seg_lengths[RTE_MAX_SEGS_PER_PKT] = {
 uint8_t  tx_pkt_nb_segs = 1; /**< Number of segments in TXONLY packets */
 
 uint16_t nb_pkt_per_burst = DEF_PKT_BURST; /**< Number of packets per burst. */
-uint16_t mb_mempool_cache = DEF_PKT_BURST; /**< Size of mbuf mempool cache. */
+uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */
 
 /* current configuration is in DCB or not,0 means it is not in DCB mode */
 uint8_t dcb_config = 0;
@@ -204,9 +204,9 @@ uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; /**< Number of TX descriptors. */
  */
 #define RX_PTHRESH 8 /**< Default value of RX prefetch threshold register. */
 #define RX_HTHRESH 8 /**< Default value of RX host threshold register. */
-#define RX_WTHRESH 4 /**< Default value of RX write-back threshold register. */
+#define RX_WTHRESH 0 /**< Default value of RX write-back threshold register. */
 
-#define TX_PTHRESH 36 /**< Default value of TX prefetch threshold register. */
+#define TX_PTHRESH 32 /**< Default value of TX prefetch threshold register. */
 #define TX_HTHRESH 0 /**< Default value of TX host threshold register. */
 #define TX_WTHRESH 0 /**< Default value of TX write-back threshold register. */
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 7e3beb6..6a9eab8 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -65,6 +65,8 @@ int main(int argc, char **argv);
 #define MAX_PKT_BURST 512
 #define DEF_PKT_BURST 32
 
+#define DEF_MBUF_CACHE 250
+
 #define CACHE_LINE_SIZE_ROUNDUP(size) \
 	(CACHE_LINE_SIZE * ((size + CACHE_LINE_SIZE - 1) / CACHE_LINE_SIZE))
 
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change
  2014-06-26  6:53 [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Cunming Liang
                   ` (4 preceding siblings ...)
  2014-06-26  6:53 ` [dpdk-dev] [PATCH 5/5] testpmd: change some of testpmd default parameter to well tuned value Cunming Liang
@ 2014-06-26 12:33 ` Thomas Monjalon
  5 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2014-06-26 12:33 UTC (permalink / raw)
  To: Cunming Liang; +Cc: dev

2014-06-26 14:53, Cunming Liang:
> This patch is used to fix several issue found in R1.7 RC1.
> 1. There's compiling error when change some defalut config in
> common_linuxapp. They are
>        RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n
>        RTE_LIBRTE_IEEE1588=y
> 2. Renaming RTE_IXGBE_RX_OLFLAGS_DISABLE to RTE_IXGBE_RX_OLFLAGS_ENABLE
>    This avoid making user confused by defalut setting 'not DISABLE'.
> 3. Set testpmd defalut burst size to 32
>    As vPMD RX only accept no less than 32, this avoid testpmd automation
> pass.
> 4. Change testpmd mbuf cache and rx/tx threshold defalut value.
>    It makes easier to get better performance with vPMD.
> 
> Cunming Liang (5):
>   ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and
>     RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n
>   ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y
>   ixgbe: not 'DISABLE' may make confuse, change
>     RTE_IXGBE_RX_OLFLAGS_DISABLE=n to RTE_IXGBE_RX_OLFLAGS_ENABLE=y
>   ixgbe: set default burst size 32 in testpmd
>   testpmd: change some of testpmd default parameter to well tuned value

Applied for version 1.7.0.

Just a note about commit titles for next times:
As explained on the website (http://dpdk.org/dev#send),
"The title will be clearly visible in the git repository and in the email 
archives. So it is important to make it short and clear for quick reading and 
searches."

You may have a look at how I've reworded these titles:
	http://dpdk.org/browse/dpdk/log
It's not the most important thing in the patches, so it's just a reminder for 
contributors reading this email.

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-26 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26  6:53 [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Cunming Liang
2014-06-26  6:53 ` [dpdk-dev] [PATCH 1/5] ixgbe: avoid compiler error when RTE_IXGBE_INC_VECTOR=y and RTE_LIBRTE_IXGBE_RX_ALLOC_BULK_ALLOC=n Cunming Liang
2014-06-26  6:53 ` [dpdk-dev] [PATCH 2/5] ixgbe: fix vpmd compiling error when RTE_LIBRTE_IEEE1588=y Cunming Liang
2014-06-26  6:53 ` [dpdk-dev] [PATCH 3/5] ixgbe: not 'DISABLE' may make confuse, change RTE_IXGBE_RX_OLFLAGS_DISABLE=n to RTE_IXGBE_RX_OLFLAGS_ENABLE=y Cunming Liang
2014-06-26  6:53 ` [dpdk-dev] [PATCH 4/5] ixgbe: set default burst size 32 in testpmd Cunming Liang
2014-06-26  6:53 ` [dpdk-dev] [PATCH 5/5] testpmd: change some of testpmd default parameter to well tuned value Cunming Liang
2014-06-26 12:33 ` [dpdk-dev] [PATCH 0/5] ixgbe: vPMD compiling issue and testpmd default value change Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).