ethdev: allow returning error on VLAN offload ops
[dpdk.git] / drivers / net / vmxnet3 / vmxnet3_ethdev.c
index 6f5cadf..6328464 100644 (file)
@@ -100,7 +100,7 @@ static const uint32_t *
 vmxnet3_dev_supported_ptypes_get(struct rte_eth_dev *dev);
 static int vmxnet3_dev_vlan_filter_set(struct rte_eth_dev *dev,
                                       uint16_t vid, int on);
-static void vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask);
+static int vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void vmxnet3_mac_addr_set(struct rte_eth_dev *dev,
                                 struct ether_addr *mac_addr);
 static void vmxnet3_interrupt_handler(void *param);
@@ -729,8 +729,10 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
                devRead->rssConfDesc.confPA  = hw->rss_confPA;
        }
 
-       vmxnet3_dev_vlan_offload_set(dev,
-                                    ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
+       ret = vmxnet3_dev_vlan_offload_set(dev,
+                       ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK);
+       if (ret)
+               return ret;
 
        vmxnet3_write_mac(hw, dev->data->mac_addrs->addr_bytes);
 
@@ -1278,7 +1280,7 @@ vmxnet3_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vid, int on)
        return 0;
 }
 
-static void
+static int
 vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
        struct vmxnet3_hw *hw = dev->data->dev_private;
@@ -1304,6 +1306,8 @@ vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)
                VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
                                       VMXNET3_CMD_UPDATE_VLAN_FILTERS);
        }
+
+       return 0;
 }
 
 static void