replace packed attributes
[dpdk.git] / examples / ethtool / lib / rte_ethtool.c
index 8393b0d..db8150e 100644 (file)
@@ -314,10 +314,15 @@ rte_ethtool_net_stop(uint16_t port_id)
 int
 rte_ethtool_net_get_mac_addr(uint16_t port_id, struct rte_ether_addr *addr)
 {
+       int ret;
+
        RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
        if (addr == NULL)
                return -EINVAL;
-       rte_eth_macaddr_get(port_id, addr);
+
+       ret = rte_eth_macaddr_get(port_id, addr);
+       if (ret != 0)
+               return ret;
 
        return 0;
 }
@@ -397,7 +402,9 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)
        }
 
        /* Enable Rx vlan filter, VF unspport status is discard */
-       rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK);
+       ret = rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK);
+       if (ret != 0)
+               return ret;
 
        return 0;
 }