DPDK patches and discussions
 help / color / mirror / Atom feed
From: chenchanghu <chenchanghu@huawei.com>
To: "dev@dpdk.org" <dev@dpdk.org>,
	"adrien.mazarguil@6wind.com" <adrien.mazarguil@6wind.com>,
	"nelio.laranjeiro@6wind.com" <nelio.laranjeiro@6wind.com>
Cc: Zhoujingbin <zhoujingbin@huawei.com>,
	"Zhoulei (G)" <stone.zhou@huawei.com>,
	Deng Kairong <dengkairong@huawei.com>,
	Chenrujie <chenrujie@huawei.com>, cuiyayun <cuiyayun@huawei.com>,
	"Chengwei (Titus)" <titus.chengwei@huawei.com>,
	"Lixuan (Alex)" <Awesome.li@huawei.com>
Subject: [dpdk-dev] [disscussion] mlx4 driver MLX4_PMD_TX_MP_CACHE default vaule
Date: Fri, 28 Jul 2017 07:58:48 +0000	[thread overview]
Message-ID: <859E1CB9FBF08C4B839DCF451B09C5032D62BFA3@dggeml505-mbx.china.huawei.com> (raw)

Hi,
         When I used the mlx4 pmd, I meet a problem about MLX4_PMD_TX_MP_CACHE vaule, which is used for Memory pool to Memory region translation. The detail test is descripted below.
1.Test environmemt infomation:
  a. Linux distribution: CentOS
  b. dpdk version: dpdk-16.04
  c. Ethernet device : mlx4 VF
  d. pmd info: mlx4 poll-mode-driver

2.Test diagram:
+----------------------+    +---------------------+         +-----------------------+
| client1       |    |  client2     |  .....    |  clientN      |
+----------------+----+    +-------+------------+         +----------+------------+
                  |         |                 |
                  |         |                 |
               +----v---------------v------------------------------v------+
               |              share memory queue   |
               +----------------------------+------------------------------+
                                |
                                |
             +-------------------------------v--------------------------------+
             |                    server            |
             +-------------------------------+--------------------------------+
                                |
                                |
             +-------------------------------v--------------------------------+
             |             dpdk rte_eth_tx_burst      |
             +-------------------------------+--------------------------------+
                                |
             +-------------------------------v---------------------------------+
             |                mlx4 pmd driver         |
             +-----------------------------------------------------------------+
  a. Every client has one memory pool, all clients send message to server queue in the shared memory.
  b. Server is only one thread, and mlx4 pmd use one tx queue.

3.Test step:
  a. We start 30 clients, which means total mempool number reaching 30, every client will send 20 packets/second, every packet length is 10k.However,the server will do large packet segmentation before the packet send to rte_eth_tx_burst.
  b. When we use the mlx4 pmd default MLX4_PMD_TX_MP_CACHE value which is 8, we found that the function 'rte_eth_tx_burst' cost about 40ms, which is mostly cost by the function 'ibv_reg_mr'.
  c. Then we modify the MLX4_PMD_TX_MP_CACHE vaule to 32, which is configured the vaule 'CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE' in the config/common_base file, we found the function 'rte_eth_tx_burst' running time is less than 5ms.

   Would the community modify the default CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE value to 32 to adapt the scenario like above description, avoiding the slow operation when use too many mempool number
which is more than the CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE value in one tx queue.
   Please send your reply to chenchanghu@huawei.com<mailto:chenchanghu@huawei.com>, any suggestion is to be greatefully appreciated.
4. Patch:
diff --git a/config/common_base b/config/common_base
index a0580d1..af6ba47 100644
--- a/config/common_base
+++ b/config/common_base
@@ -207,7 +207,7 @@ CONFIG_RTE_LIBRTE_MLX4_PMD=y
CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N=4
CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE=0
-CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8
+CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=32
CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1

             reply	other threads:[~2017-07-28  7:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28  7:58 chenchanghu [this message]
2017-07-28  8:40 ` Adrien Mazarguil
2017-07-28 10:52 chenchanghu
2017-07-28 12:00 ` Adrien Mazarguil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=859E1CB9FBF08C4B839DCF451B09C5032D62BFA3@dggeml505-mbx.china.huawei.com \
    --to=chenchanghu@huawei.com \
    --cc=Awesome.li@huawei.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=chenrujie@huawei.com \
    --cc=cuiyayun@huawei.com \
    --cc=dengkairong@huawei.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=stone.zhou@huawei.com \
    --cc=titus.chengwei@huawei.com \
    --cc=zhoujingbin@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).