File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,8 @@ rte_eth_conf DpdkDevice::createPortConfig()
163163void DpdkDevice::initMemPools (uint16_t memPoolSize)
164164{
165165 constexpr int MEMPOOL_CACHE_SIZE = 256 ;
166+ constexpr int VLAN_HDR_LEN = 4 ;
167+ const int max_packet_size = m_mtuSize + RTE_ETHER_HDR_LEN + VLAN_HDR_LEN;
166168
167169 m_memPools.reserve (m_rxQueueCount);
168170
@@ -174,7 +176,7 @@ void DpdkDevice::initMemPools(uint16_t memPoolSize)
174176 memPoolSize,
175177 MEMPOOL_CACHE_SIZE,
176178 0 ,
177- std::max (m_mtuSize, ( uint16_t ) RTE_MBUF_DEFAULT_DATAROOM) + RTE_PKTMBUF_HEADROOM,
179+ std::max (max_packet_size, RTE_MBUF_DEFAULT_DATAROOM) + RTE_PKTMBUF_HEADROOM,
178180 rte_eth_dev_socket_id (m_portID));
179181 if (!memPool) {
180182 throw PluginError (
You can’t perform that action at this time.
0 commit comments