DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] it seems something wrong in pktgen .
@ 2018-12-29  7:14 Vic Wang(BJ-RD)
  2018-12-29 15:54 ` Wiles, Keith
  0 siblings, 1 reply; 2+ messages in thread
From: Vic Wang(BJ-RD) @ 2018-12-29  7:14 UTC (permalink / raw)
  To: users

Hi,

I use dpdk and pktgen-dpdk to test the performance of the platform performance .
The system configuration as follows:
Senders: Intel i5-6600k with two sumsang ddr4 drams (dual channel), one intel XL710 40G NIC.
Command: ./pktgen -C 0xf -n 2 -- -P -m "2.0,3.1"
The packet size set to 64 bytes.

Receiver: Intel i5-660k with two sumsang ddr4 drams(dual channel), one intel XL710 40G NIC.
Command: ./testpmd -C 0xf -n2 -- -i --portmask=0x3 --coremask=0xc
However, when starting to forward the packets, the pktgen will stop after sending severl thousands packets .

I trace the question, and I found it seems something wrong in pktgen program.
In the pktgen_send_pkts, if the pg_pktmbuf_alloc_bulk fails because nobufs, it can't goto the pktgen_send_burst forever. So it can't free mbuf in the pktgen_send_burst , and it will be failed every loop when pg_pktmbuf_alloc_bulk.
>static __inline__ void
>pktgen_send_pkts(port_info_t *info, uint16_t qid, struct rte_mempool *mp)
>{
>     uint32_t flags;
>     int rc = 0;
>
>     flags = rte_atomic32_read(&info->port_flags);
>
>     if (flags & SEND_FOREVER) {
>            rc = pg_pktmbuf_alloc_bulk(mp,
>                                    info->q[qid].tx_mbufs.m_table,
>                                    info->tx_burst);
>            if (rc == 0) {
>                   info->q[qid].tx_mbufs.len = info->tx_burst;
>                   info->q[qid].tx_cnt += info->tx_burst;
>
>                   pktgen_send_burst(info, qid);
>            }
>     } else {
>            int64_t txCnt;

This is my thought, please comment me.

Best Regards!
VicWang



?????
?????????????????????????????????????????????????????
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

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

* Re: [dpdk-users] it seems something wrong in pktgen .
  2018-12-29  7:14 [dpdk-users] it seems something wrong in pktgen Vic Wang(BJ-RD)
@ 2018-12-29 15:54 ` Wiles, Keith
  0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2018-12-29 15:54 UTC (permalink / raw)
  To: Vic Wang(BJ-RD); +Cc: users



> On Dec 29, 2018, at 1:14 AM, Vic Wang(BJ-RD) <VicWang@zhaoxin.com> wrote:
> 
> Hi,
> 

You did not tell me which DPDK and pktgen version you are using.

> I use dpdk and pktgen-dpdk to test the performance of the platform performance .
> The system configuration as follows:
> Senders: Intel i5-6600k with two sumsang ddr4 drams (dual channel), one intel XL710 40G NIC.
> Command: ./pktgen -C 0xf -n 2 -- -P -m "2.0,3.1"
> The packet size set to 64 bytes.

This is not the problem, but see the answer below. You are using four cores and three is the number you need, so change the line from -C 0xf to -l 1-3 using the -l option is easier for most to see and not make mistakes with the core counts and numbers. Alway use -l for all DPDK programs.

> 
> Receiver: Intel i5-660k with two sumsang ddr4 drams(dual channel), one intel XL710 40G NIC.
> Command: ./testpmd -C 0xf -n2 -- -i --portmask=0x3 --coremask=0xc
> However, when starting to forward the packets, the pktgen will stop after sending severl thousands packets .

I do not use testpmd much so 0xf maybe over kill as well here, may only need -l 2-3, but I could be wrong here. I use pktgen on both sides normally instead of l3fwd or testpmd.

> 
> I trace the question, and I found it seems something wrong in pktgen program.
> In the pktgen_send_pkts, if the pg_pktmbuf_alloc_bulk fails because nobufs, it can't goto the pktgen_send_burst forever. So it can't free mbuf in the pktgen_send_burst , and it will be failed every loop when pg_pktmbuf_alloc_bulk.
>> static __inline__ void
>> pktgen_send_pkts(port_info_t *info, uint16_t qid, struct rte_mempool *mp)
>> {
>>    uint32_t flags;
>>    int rc = 0;
>> 
>>    flags = rte_atomic32_read(&info->port_flags);
>> 
>>    if (flags & SEND_FOREVER) {
>>           rc = pg_pktmbuf_alloc_bulk(mp,
>>                                   info->q[qid].tx_mbufs.m_table,
>>                                   info->tx_burst);
>>           if (rc == 0) {
>>                  info->q[qid].tx_mbufs.len = info->tx_burst;
>>                  info->q[qid].tx_cnt += info->tx_burst;
>> 
>>                  pktgen_send_burst(info, qid);
>>           }
>>    } else {
>>           int64_t txCnt;
> 
> This is my thought, please comment me.

Someone already reported this problem and I have it fixed in the ‘dev’ branch of pktgen, but they have not replied if that fixed the problem.

Please grab the ‘dev’ branch out of the git repo and try to see is that fixes the problem.

> 
> Best Regards!
> VicWang
> 
> 
> 
> ?????
> ?????????????????????????????????????????????????????
> CONFIDENTIAL NOTE:
> This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.

Regards,
Keith


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

end of thread, other threads:[~2018-12-29 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-29  7:14 [dpdk-users] it seems something wrong in pktgen Vic Wang(BJ-RD)
2018-12-29 15:54 ` Wiles, Keith

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).