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:
parent
70d6b7f550
commit
c820468ac9
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
|
2068
drivers/net/ipn3ke/ipn3ke_tm.c
Normal file
2068
drivers/net/ipn3ke/ipn3ke_tm.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -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']
|
||||
|
Loading…
Reference in New Issue
Block a user