net: add rte prefix to ether defines
[dpdk.git] / drivers / net / netvsc / hn_nvs.c
index a458bb7..6b51868 100644 (file)
@@ -323,12 +323,12 @@ hn_nvs_conf_ndis(struct hn_data *hv, unsigned int mtu)
 
        memset(&conf, 0, sizeof(conf));
        conf.type = NVS_TYPE_NDIS_CONF;
-       conf.mtu = mtu + ETHER_HDR_LEN;
+       conf.mtu = mtu + RTE_ETHER_HDR_LEN;
        conf.caps = NVS_NDIS_CONF_VLAN;
 
-       /* TODO enable SRIOV */
-       //if (hv->nvs_ver >= NVS_VERSION_5)
-       //      conf.caps |= NVS_NDIS_CONF_SRIOV;
+       /* enable SRIOV */
+       if (hv->nvs_ver >= NVS_VERSION_5)
+               conf.caps |= NVS_NDIS_CONF_SRIOV;
 
        /* NOTE: No response. */
        error = hn_nvs_req_send(hv, &conf, sizeof(conf));
@@ -532,10 +532,19 @@ void
 hn_nvs_set_datapath(struct hn_data *hv, uint32_t path)
 {
        struct hn_nvs_datapath dp;
+       int error;
+
+       PMD_DRV_LOG(DEBUG, "set datapath %s",
+                   path ? "VF" : "Synthetic");
 
        memset(&dp, 0, sizeof(dp));
        dp.type = NVS_TYPE_SET_DATAPATH;
        dp.active_path = path;
 
-       hn_nvs_req_send(hv, &dp, sizeof(dp));
+       error = hn_nvs_req_send(hv, &dp, sizeof(dp));
+       if (error) {
+               PMD_DRV_LOG(ERR,
+                           "send set datapath failed: %d",
+                           error);
+       }
 }