git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ice: remove bulk alloc option
[dpdk.git]
/
drivers
/
net
/
netvsc
/
hn_nvs.c
diff --git
a/drivers/net/netvsc/hn_nvs.c
b/drivers/net/netvsc/hn_nvs.c
index
77d3b83
..
6b51868
100644
(file)
--- a/
drivers/net/netvsc/hn_nvs.c
+++ b/
drivers/net/netvsc/hn_nvs.c
@@
-279,14
+279,13
@@
hn_nvs_conn_chim(struct hn_data *hv)
NVS_TYPE_CHIM_CONNRESP);
if (error) {
PMD_DRV_LOG(ERR, "exec nvs chim conn failed");
NVS_TYPE_CHIM_CONNRESP);
if (error) {
PMD_DRV_LOG(ERR, "exec nvs chim conn failed");
-
goto cleanup
;
+
return error
;
}
if (resp.status != NVS_STATUS_OK) {
PMD_DRV_LOG(ERR, "nvs chim conn failed: %x",
resp.status);
}
if (resp.status != NVS_STATUS_OK) {
PMD_DRV_LOG(ERR, "nvs chim conn failed: %x",
resp.status);
- error = -EIO;
- goto cleanup;
+ return -EIO;
}
sectsz = resp.sectsz;
}
sectsz = resp.sectsz;
@@
-295,7
+294,8
@@
hn_nvs_conn_chim(struct hn_data *hv)
PMD_DRV_LOG(NOTICE,
"invalid chimney sending buffer section size: %u",
sectsz);
PMD_DRV_LOG(NOTICE,
"invalid chimney sending buffer section size: %u",
sectsz);
- return 0;
+ error = -EINVAL;
+ goto cleanup;
}
hv->chim_szmax = sectsz;
}
hv->chim_szmax = sectsz;
@@
-304,11
+304,6
@@
hn_nvs_conn_chim(struct hn_data *hv)
PMD_DRV_LOG(INFO, "send buffer %lu section size:%u, count:%u",
len, hv->chim_szmax, hv->chim_cnt);
PMD_DRV_LOG(INFO, "send buffer %lu section size:%u, count:%u",
len, hv->chim_szmax, hv->chim_cnt);
- if (len % hv->chim_szmax != 0) {
- PMD_DRV_LOG(NOTICE,
- "chimney sending sections are not properly aligned");
- }
-
/* Done! */
return 0;
/* Done! */
return 0;
@@
-328,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;
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;
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));
/* NOTE: No response. */
error = hn_nvs_req_send(hv, &conf, sizeof(conf));
@@
-537,10
+532,19
@@
void
hn_nvs_set_datapath(struct hn_data *hv, uint32_t path)
{
struct hn_nvs_datapath dp;
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;
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);
+ }
}
}