X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fkni%2Frte_kni.c;h=fc8f0e7b5a336f159eda7bf526f30a13fbb5662d;hb=6e858b4d9244cf53505589673755ab18ac2a4a83;hp=d3e236005ed59b6234bd723143dab37e2ab440d6;hpb=b67f598e23c892894e48fdec49b9d48bc0d743b7;p=dpdk.git diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c index d3e236005e..fc8f0e7b5a 100644 --- a/lib/kni/rte_kni.c +++ b/lib/kni/rte_kni.c @@ -514,6 +514,8 @@ kni_config_promiscusity(uint16_t port_id, uint8_t to_on) static int kni_config_allmulticast(uint16_t port_id, uint8_t to_on) { + int ret; + if (!rte_eth_dev_is_valid_port(port_id)) { RTE_LOG(ERR, KNI, "Invalid port id %d\n", port_id); return -EINVAL; @@ -523,11 +525,16 @@ kni_config_allmulticast(uint16_t port_id, uint8_t to_on) port_id, to_on); if (to_on) - rte_eth_allmulticast_enable(port_id); + ret = rte_eth_allmulticast_enable(port_id); else - rte_eth_allmulticast_disable(port_id); + ret = rte_eth_allmulticast_disable(port_id); + if (ret != 0) + RTE_LOG(ERR, KNI, + "Failed to %s allmulticast mode for port %u: %s\n", + to_on ? "enable" : "disable", port_id, + rte_strerror(-ret)); - return 0; + return ret; } int