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/octeontx2: add flow MCAM utility functions
[dpdk.git]
/
drivers
/
net
/
ipn3ke
/
ipn3ke_representor.c
diff --git
a/drivers/net/ipn3ke/ipn3ke_representor.c
b/drivers/net/ipn3ke/ipn3ke_representor.c
index
b18d183
..
01ad92e
100644
(file)
--- a/
drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/
drivers/net/ipn3ke/ipn3ke_representor.c
@@
-128,7
+128,7
@@
ipn3ke_rpst_dev_start(struct rte_eth_dev *dev)
&rpst->mac_addr);
rte_ether_addr_copy(&rpst->mac_addr, &dev->data->mac_addrs[0]);
&rpst->mac_addr);
rte_ether_addr_copy(&rpst->mac_addr, &dev->data->mac_addrs[0]);
- dev->data->mac_addrs->addr_bytes[ETHER_ADDR_LEN - 1] =
+ dev->data->mac_addrs->addr_bytes[
RTE_
ETHER_ADDR_LEN - 1] =
(uint8_t)rpst->port_id + 1;
if (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) {
(uint8_t)rpst->port_id + 1;
if (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) {
@@
-692,7
+692,7
@@
ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu)
uint32_t frame_size = mtu + IPN3KE_ETH_OVERHEAD;
/* check if mtu is within the allowed range */
uint32_t frame_size = mtu + IPN3KE_ETH_OVERHEAD;
/* check if mtu is within the allowed range */
- if (mtu < ETHER_MIN_MTU ||
+ if (mtu <
RTE_
ETHER_MIN_MTU ||
frame_size > IPN3KE_MAC_FRAME_SIZE_MAX)
return -EINVAL;
frame_size > IPN3KE_MAC_FRAME_SIZE_MAX)
return -EINVAL;
@@
-712,7
+712,7
@@
ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu)
return -EBUSY;
}
return -EBUSY;
}
- if (frame_size > ETHER_MAX_LEN)
+ if (frame_size >
RTE_
ETHER_MAX_LEN)
dev_data->dev_conf.rxmode.offloads |=
(uint64_t)(DEV_RX_OFFLOAD_JUMBO_FRAME);
else
dev_data->dev_conf.rxmode.offloads |=
(uint64_t)(DEV_RX_OFFLOAD_JUMBO_FRAME);
else
@@
-736,13
+736,16
@@
ipn3ke_afu_filter_ctrl(struct rte_eth_dev *ethdev,
enum rte_filter_type filter_type, enum rte_filter_op filter_op,
void *arg)
{
enum rte_filter_type filter_type, enum rte_filter_op filter_op,
void *arg)
{
- struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev);
- struct ipn3ke_rpst *rpst = IPN3KE_DEV_PRIVATE_TO_RPST(ethdev);
int ret = 0;
int ret = 0;
+ struct ipn3ke_hw *hw;
+ struct ipn3ke_rpst *rpst;
if (ethdev == NULL)
return -EINVAL;
if (ethdev == NULL)
return -EINVAL;
+ hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev);
+ rpst = IPN3KE_DEV_PRIVATE_TO_RPST(ethdev);
+
if (hw->acc_flow)
switch (filter_type) {
case RTE_ETH_FILTER_GENERIC:
if (hw->acc_flow)
switch (filter_type) {
case RTE_ETH_FILTER_GENERIC:
@@
-837,7
+840,7
@@
ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params)
rpst->i40e_pf_eth = NULL;
rpst->i40e_pf_eth_port_id = 0xFFFF;
rpst->i40e_pf_eth = NULL;
rpst->i40e_pf_eth_port_id = 0xFFFF;
- ethdev->data->mac_addrs = rte_zmalloc("ipn3ke", ETHER_ADDR_LEN, 0);
+ ethdev->data->mac_addrs = rte_zmalloc("ipn3ke",
RTE_
ETHER_ADDR_LEN, 0);
if (!ethdev->data->mac_addrs) {
IPN3KE_AFU_PMD_ERR("Failed to "
"allocated memory for storing mac address");
if (!ethdev->data->mac_addrs) {
IPN3KE_AFU_PMD_ERR("Failed to "
"allocated memory for storing mac address");
@@
-860,7
+863,7
@@
ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params)
ethdev->data->nb_tx_queues = 1;
ethdev->data->mac_addrs = rte_zmalloc("ipn3ke_afu_representor",
ethdev->data->nb_tx_queues = 1;
ethdev->data->mac_addrs = rte_zmalloc("ipn3ke_afu_representor",
- ETHER_ADDR_LEN,
+
RTE_
ETHER_ADDR_LEN,
0);
if (!ethdev->data->mac_addrs) {
IPN3KE_AFU_PMD_ERR("Failed to "
0);
if (!ethdev->data->mac_addrs) {
IPN3KE_AFU_PMD_ERR("Failed to "