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
crypto/aesni_gcm: support in-place chained mbufs
[dpdk.git]
/
drivers
/
net
/
i40e
/
rte_pmd_i40e.c
diff --git
a/drivers/net/i40e/rte_pmd_i40e.c
b/drivers/net/i40e/rte_pmd_i40e.c
index
8e56255
..
4c3c708
100644
(file)
--- a/
drivers/net/i40e/rte_pmd_i40e.c
+++ b/
drivers/net/i40e/rte_pmd_i40e.c
@@
-560,7
+560,7
@@
rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
return -EINVAL;
}
return -EINVAL;
}
- ether_addr_copy(mac_addr, &vf->mac_addr);
+
rte_
ether_addr_copy(mac_addr, &vf->mac_addr);
/* Remove all existing mac */
TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp)
/* Remove all existing mac */
TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp)
@@
-581,6
+581,7
@@
rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
struct i40e_pf_vf *vf;
struct i40e_vsi *vsi;
struct i40e_pf *pf;
struct i40e_pf_vf *vf;
struct i40e_vsi *vsi;
struct i40e_pf *pf;
+ int ret;
if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
return -EINVAL;
if (i40e_validate_mac_addr((u8 *)mac_addr) != I40E_SUCCESS)
return -EINVAL;
@@
-604,13
+605,14
@@
rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
return -EINVAL;
}
return -EINVAL;
}
- if (is_same_ether_addr(mac_addr, &vf->mac_addr))
+ if (
rte_
is_same_ether_addr(mac_addr, &vf->mac_addr))
/* Reset the mac with NULL address */
/* Reset the mac with NULL address */
- ether_addr_copy(&null_mac_addr, &vf->mac_addr);
+
rte_
ether_addr_copy(&null_mac_addr, &vf->mac_addr);
/* Remove the mac */
/* Remove the mac */
- i40e_vsi_delete_mac(vsi, mac_addr);
-
+ ret = i40e_vsi_delete_mac(vsi, mac_addr);
+ if (ret != I40E_SUCCESS)
+ return ret;
return 0;
}
return 0;
}
@@
-663,7
+665,7
@@
int rte_pmd_i40e_set_vf_vlan_insert(uint16_t port, uint16_t vf_id,
RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
- if (vlan_id > ETHER_MAX_VLAN_ID) {
+ if (vlan_id >
RTE_
ETHER_MAX_VLAN_ID) {
PMD_DRV_LOG(ERR, "Invalid VLAN ID.");
return -EINVAL;
}
PMD_DRV_LOG(ERR, "Invalid VLAN ID.");
return -EINVAL;
}
@@
-765,7
+767,7
@@
int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
}
if (on) {
}
if (on) {
- rte_memcpy(&filter.mac_addr, &broadcast, ETHER_ADDR_LEN);
+ rte_memcpy(&filter.mac_addr, &broadcast,
RTE_
ETHER_ADDR_LEN);
filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
ret = i40e_vsi_add_mac(vsi, &filter);
} else {
filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
ret = i40e_vsi_add_mac(vsi, &filter);
} else {
@@
-893,7
+895,7
@@
int rte_pmd_i40e_set_vf_vlan_filter(uint16_t port, uint16_t vlan_id,
if (!is_i40e_supported(dev))
return -ENOTSUP;
if (!is_i40e_supported(dev))
return -ENOTSUP;
- if (vlan_id > ETHER_MAX_VLAN_ID || !vlan_id) {
+ if (vlan_id >
RTE_
ETHER_MAX_VLAN_ID || !vlan_id) {
PMD_DRV_LOG(ERR, "Invalid VLAN ID.");
return -EINVAL;
}
PMD_DRV_LOG(ERR, "Invalid VLAN ID.");
return -EINVAL;
}
@@
-2387,7
+2389,7
@@
rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
}
mac_filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
}
mac_filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
- ether_addr_copy(mac_addr, &mac_filter.mac_addr);
+
rte_
ether_addr_copy(mac_addr, &mac_filter.mac_addr);
ret = i40e_vsi_add_mac(vsi, &mac_filter);
if (ret != I40E_SUCCESS) {
PMD_DRV_LOG(ERR, "Failed to add MAC filter.");
ret = i40e_vsi_add_mac(vsi, &mac_filter);
if (ret != I40E_SUCCESS) {
PMD_DRV_LOG(ERR, "Failed to add MAC filter.");
@@
-2405,7
+2407,8
@@
int rte_pmd_i40e_flow_type_mapping_reset(uint16_t port)
dev = &rte_eth_devices[port];
dev = &rte_eth_devices[port];
- if (!is_i40e_supported(dev))
+ if (!is_i40e_supported(dev) &&
+ !is_i40evf_supported(dev))
return -ENOTSUP;
i40e_set_default_pctype_table(dev);
return -ENOTSUP;
i40e_set_default_pctype_table(dev);
@@
-2425,7
+2428,8
@@
int rte_pmd_i40e_flow_type_mapping_get(
dev = &rte_eth_devices[port];
dev = &rte_eth_devices[port];
- if (!is_i40e_supported(dev))
+ if (!is_i40e_supported(dev) &&
+ !is_i40evf_supported(dev))
return -ENOTSUP;
ad = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
return -ENOTSUP;
ad = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
@@
-2453,7
+2457,8
@@
rte_pmd_i40e_flow_type_mapping_update(
dev = &rte_eth_devices[port];
dev = &rte_eth_devices[port];
- if (!is_i40e_supported(dev))
+ if (!is_i40e_supported(dev) &&
+ !is_i40evf_supported(dev))
return -ENOTSUP;
if (count > I40E_FLOW_TYPE_MAX)
return -ENOTSUP;
if (count > I40E_FLOW_TYPE_MAX)
@@
-2515,7
+2520,7
@@
rte_pmd_i40e_query_vfid_by_mac(uint16_t port,
vf = &pf->vfs[vf_id];
mac = &vf->mac_addr;
vf = &pf->vfs[vf_id];
mac = &vf->mac_addr;
- if (is_same_ether_addr(mac, vf_mac))
+ if (
rte_
is_same_ether_addr(mac, vf_mac))
return vf_id;
}
return vf_id;
}