net/octeontx2: handle device error interrupts
[dpdk.git] / examples / ip_pipeline / kni.c
index 7e5ff05..e9262e0 100644 (file)
@@ -86,7 +86,7 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
        if (!rte_eth_dev_is_valid_port(port_id))
                return -EINVAL;
 
-       if (new_mtu > ETHER_MAX_LEN)
+       if (new_mtu > RTE_ETHER_MAX_LEN)
                return -EINVAL;
 
        /* Set new MTU */
@@ -126,7 +126,7 @@ kni_create(const char *name, struct kni_params *params)
        rte_eth_dev_info_get(link->port_id, &dev_info);
 
        memset(&kni_conf, 0, sizeof(kni_conf));
-       snprintf(kni_conf.name, RTE_KNI_NAMESIZE, "%s", name);
+       strlcpy(kni_conf.name, name, RTE_KNI_NAMESIZE);
        kni_conf.force_bind = params->force_bind;
        kni_conf.core_id = params->thread_id;
        kni_conf.group_id = link->port_id;