ethdev: fix max Rx packet length
[dpdk.git] / examples / flow_classify / flow_classify.c
index 65c1d85..8a43f6a 100644 (file)
@@ -59,14 +59,6 @@ static struct{
 } parm_config;
 const char cb_port_delim[] = ":";
 
-/* Ethernet ports configured with default settings using struct. 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. */
-
 /* Creation of flow classifier object. 8< */
 struct flow_classifier {
        struct rte_flow_classifier *cls;
@@ -200,7 +192,7 @@ static struct rte_flow_attr attr;
 static inline int
 port_init(uint8_t port, struct rte_mempool *mbuf_pool)
 {
-       struct rte_eth_conf port_conf = port_conf_default;
+       struct rte_eth_conf port_conf;
        struct rte_ether_addr addr;
        const uint16_t rx_rings = 1, tx_rings = 1;
        int retval;
@@ -211,6 +203,8 @@ port_init(uint8_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",