diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2018-04-14 17:19:41 +0200 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2018-04-15 15:41:16 +0200 |
commit | e9da2a14ec116912033a88f08261bc193a9c445d (patch) | |
tree | 20760f8b999789778c37c9d738ca73ed785bb275 /VNFs/DPPD-PROX/prox_args.c | |
parent | 3981ce6fed44db09af235100526ab8bc1666e38e (diff) |
Add support for reception of jumbo frames
Jumbo frames are now supported through the addition of a "mtu"
parameter of the port in the config file.
Setting the mtu to a value higher than 1500 bytes will enable
the reception of jumbo frames.
In addition, the rte_eth_dev_set_mtu is now set for all pmds.
Finally, setting mbuf_size does not set MEMPOOL_F_NO_SPREAD
anymore. This option was only used for pure debugging.
Big packets can be received using two ways
- Using multiple "small" mbufs, i.e. around 2K. This is the default.
- Using one big mbuf holding the whole packet. This can be enabled
by setting a parameter mbuf_size in the receiving core configuration
Change-Id: Idd60ad31f41c89f9522dff4d894af2696b7a2ea1
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r-- | VNFs/DPPD-PROX/prox_args.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index 08f27e9e..53223cad 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -546,6 +546,20 @@ static int get_port_cfg(unsigned sindex, char *str, void *data) } cfg->port_conf.rxmode.hw_strip_crc = val; } + else if (STR_EQ(str, "mtu size")) { + uint32_t val; + if (parse_int(&val, pkey)) { + return -1; + } + 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; + cfg->port_conf.rxmode.jumbo_frame = 1; + } + } + } + else if (STR_EQ(str, "rss")) { uint32_t val; if (parse_bool(&val, pkey)) { |