diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2018-04-26 01:03:05 +0200 |
---|---|---|
committer | Deepak S <deepak.s@linux.intel.com> | 2018-05-25 14:49:18 +0530 |
commit | 6f90cc27941ae39d2e0ea87ad44c476287d8014a (patch) | |
tree | 843f7746279c443acde5bc4889ac8756dcf925a1 /VNFs/DPPD-PROX/prox_args.c | |
parent | 59bcd684dd98b57744c1ca56c4e2b7b0c8bc9ad2 (diff) |
Increase default mbuf size and code simplification/cleanup
mbuf size was setup to achieve the best performance i.e.
using the smallest mbuf and not segmenting packets.
However this resulted in complex code, much dependent of the way
the pmd are working e.g. a change(fix) in recent dpdk i40e
implementation caused a 1782 (=1518+8+256) bytes mbuf to be too
small to hold a 1518 bytes packets.
Hence this change simplifies the mbuf size selection at the price
of a potential decreases in performance - as more memory is now used.
Except if jumbo frames are used, the mbuf size will now be the same
for all modes. The packets will not be segmented except if jumbo
frames are enabled.
If jumbo frames are enabled, packets are by default segmented, except
if the mbuf size is configured big enough in the config file.
Change-Id: I222fcac7a65c0d221d5d422f419deb9c0f864172
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r-- | VNFs/DPPD-PROX/prox_args.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index aa7ff51c..fb88a65f 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -553,8 +553,11 @@ static int get_port_cfg(unsigned sindex, char *str, void *data) } if (val) { cfg->mtu = val; - if (cfg->mtu + ETHER_HDR_LEN + ETHER_CRC_LEN > ETHER_MAX_LEN) { - cfg->port_conf.rxmode.max_rx_pkt_len = cfg->mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + 2 * PROX_VLAN_TAG_SIZE; + // A frame of 1526 bytes (1500 bytes mtu, 14 bytes hdr, 4 bytes crc and 8 bytes vlan) + // should not be considered as a jumbo frame. However rte_ethdev.c considers that + // the max_rx_pkt_len for a non jumbo frame is 1518 + cfg->port_conf.rxmode.max_rx_pkt_len = cfg->mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + if (cfg->port_conf.rxmode.max_rx_pkt_len > ETHER_MAX_LEN) { cfg->port_conf.rxmode.jumbo_frame = 1; } } @@ -1219,7 +1222,6 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) } else if (STR_EQ(str, "mbuf size")) { - targ->mbuf_size_set_explicitely = 1; return parse_int(&targ->mbuf_size, pkey); } if (STR_EQ(str, "memcache size")) { |