uint8_t port_per_socket[RTE_MAX_NUMA_NODES];
struct rte_gro_param gro_param;
uint32_t gso_types;
+ uint16_t data_size;
+ bool warning = 0;
int k;
memset(port_per_socket,0,RTE_MAX_NUMA_NODES);
port->need_reconfig = 1;
port->need_reconfig_queues = 1;
port->tx_metadata = 0;
+
+ /* Check for maximum number of segments per MTU. Accordingly
+ * update the mbuf data size.
+ */
+ if (port->dev_info.rx_desc_lim.nb_mtu_seg_max != UINT16_MAX &&
+ port->dev_info.rx_desc_lim.nb_mtu_seg_max != 0) {
+ data_size = rx_mode.max_rx_pkt_len /
+ port->dev_info.rx_desc_lim.nb_mtu_seg_max;
+
+ if ((data_size + RTE_PKTMBUF_HEADROOM) >
+ mbuf_data_size) {
+ mbuf_data_size = data_size +
+ RTE_PKTMBUF_HEADROOM;
+ warning = 1;
+ }
+ }
}
+ if (warning)
+ TESTPMD_LOG(WARNING, "Configured mbuf size %hu\n",
+ mbuf_data_size);
+
/*
* Create pools of mbuf.
* If NUMA support is disabled, create a single pool of mbuf in
void
pmd_test_exit(void)
{
- struct rte_device *device;
portid_t pt_id;
int ret;
int i;
printf("\nShutting down port %d...\n", pt_id);
fflush(stdout);
close_port(pt_id);
-
- /*
- * This is a workaround to fix a virtio-user issue that
- * requires to call clean-up routine to remove existing
- * socket.
- * This workaround valid only for testpmd, needs a fix
- * valid for all applications.
- * TODO: Implement proper resource cleanup
- */
- device = rte_eth_devices[pt_id].device;
- if (device && !strcmp(device->driver->name, "net_virtio_user"))
- detach_port_device(pt_id);
}
}