app/testpmd: create mbuf based on max supported segments
authorSunil Kumar Kori <skori@marvell.com>
Mon, 27 May 2019 08:35:29 +0000 (14:05 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Jun 2019 14:54:30 +0000 (23:54 +0900)
commit33f9630fc23dd550c0b2bca85f6c2b1aecc4a4ff
treed6c4834ece890995e4454f2e9cf38f62e5e02042
parenta79e3088cab58f01ddfbf937c193a37154ac5296
app/testpmd: create mbuf based on max supported segments

Configuring buffer size based following parameters:
- max-pkt-len
- max supported segments per MTU

Buffer size are configured as given below:
- If platform supports infinite segments per packet then default
  buffer size is used.
- If platform supports nb_mtu_seg_max segments then buffer size
  is configured as (max-pkt-len / nb_mtu_seg_max) + headroom

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/testpmd.c