Skip to content

Commit

Permalink
net/ipn3ke: support TM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rosen-xu authored and Ferruh Yigit committed Apr 19, 2019
1 parent 70d6b7f commit c820468
Show file tree
Hide file tree
Showing 6 changed files with 2,086 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/net/ipn3ke/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions drivers/net/ipn3ke/ipn3ke_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
7 changes: 7 additions & 0 deletions drivers/net/ipn3ke/ipn3ke_ethdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/ipn3ke/ipn3ke_representor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;

Expand Down
Loading

0 comments on commit c820468

Please sign in to comment.