ethdev: fix max Rx packet length
[dpdk.git] / examples / skeleton / basicfwd.c
index ae9bbee..fd7207a 100644 (file)
 #define MBUF_CACHE_SIZE 250
 #define BURST_SIZE 32
 
-/* Configuration of ethernet ports. 8<  */
-static const struct rte_eth_conf port_conf_default = {
-       .rxmode = {
-               .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
-       },
-};
-/* >8 End of configuration of ethernet ports. */
-
 /* basicfwd.c: Basic DPDK skeleton forwarding example. */
 
 /*
@@ -36,7 +28,7 @@ static const struct rte_eth_conf port_conf_default = {
 static inline int
 port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 {
-       struct rte_eth_conf port_conf = port_conf_default;
+       struct rte_eth_conf port_conf;
        const uint16_t rx_rings = 1, tx_rings = 1;
        uint16_t nb_rxd = RX_RING_SIZE;
        uint16_t nb_txd = TX_RING_SIZE;
@@ -48,6 +40,8 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
        if (!rte_eth_dev_is_valid_port(port))
                return -1;
 
+       memset(&port_conf, 0, sizeof(struct rte_eth_conf));
+
        retval = rte_eth_dev_info_get(port, &dev_info);
        if (retval != 0) {
                printf("Error during getting device (port %u) info: %s\n",