net/ipn3ke: support TM

Add Intel FPGA Acceleration NIC IPN3KE TM of PMD driver.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Dan Wei <dan.wei@intel.com>
This commit is contained in:
Rosen Xu 2019-04-16 11:17:42 +08:00 committed by Ferruh Yigit
parent 70d6b7f550
commit c820468ac9
6 changed files with 2086 additions and 1 deletions

View File

@ -34,5 +34,6 @@ LIBABIVER := 1
#
SRCS-$(CONFIG_RTE_LIBRTE_IPN3KE_PMD) += ipn3ke_ethdev.c
SRCS-$(CONFIG_RTE_LIBRTE_IPN3KE_PMD) += ipn3ke_representor.c
SRCS-$(CONFIG_RTE_LIBRTE_IPN3KE_PMD) += ipn3ke_tm.c
include $(RTE_SDK)/mk/rte.lib.mk

View File

@ -262,6 +262,9 @@ ipn3ke_hw_init(struct rte_afu_device *afu_dev,
hw->flow_hw_enable = 0;
if (afu_dev->id.uuid.uuid_low == IPN3KE_UUID_VBNG_LOW &&
afu_dev->id.uuid.uuid_high == IPN3KE_UUID_VBNG_HIGH) {
ret = ipn3ke_hw_tm_init(hw);
if (ret)
return ret;
hw->tm_hw_enable = 1;
hw->flow_hw_enable = 1;
}

View File

@ -552,6 +552,13 @@ int
ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params);
int
ipn3ke_rpst_uninit(struct rte_eth_dev *ethdev);
int
ipn3ke_hw_tm_init(struct ipn3ke_hw *hw);
void
ipn3ke_tm_init(struct ipn3ke_rpst *rpst);
int
ipn3ke_tm_ops_get(struct rte_eth_dev *ethdev,
void *arg);
/* IPN3KE_MASK is a macro used on 32 bit registers */

View File

@ -801,6 +801,8 @@ static const struct eth_dev_ops ipn3ke_rpst_dev_ops = {
.allmulticast_disable = ipn3ke_rpst_allmulticast_disable,
.mac_addr_set = ipn3ke_rpst_mac_addr_set,
.mtu_set = ipn3ke_rpst_mtu_set,
.tm_ops_get = ipn3ke_tm_ops_get,
};
static uint16_t ipn3ke_rpst_recv_pkts(__rte_unused void *rx_q,
@ -840,6 +842,9 @@ ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void *init_params)
return -ENODEV;
}
if (rpst->hw->tm_hw_enable)
ipn3ke_tm_init(rpst);
/* Set representor device ops */
ethdev->dev_ops = &ipn3ke_rpst_dev_ops;

File diff suppressed because it is too large Load Diff

View File

@ -11,5 +11,6 @@
allow_experimental_apis = true
sources += files('ipn3ke_ethdev.c',
'ipn3ke_representor.c')
'ipn3ke_representor.c',
'ipn3ke_tm.c')
deps += ['bus_ifpga', 'sched']