static int
eth_ark_dev_init(struct rte_eth_dev *dev)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
struct rte_pci_device *pci_dev;
int ret;
int port_count = 1;
static int
ark_config_device(struct rte_eth_dev *dev)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
uint16_t num_q, i;
struct ark_mpu_t *mpu;
static int
eth_ark_dev_uninit(struct rte_eth_dev *dev)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
eth_ark_dev_configure(struct rte_eth_dev *dev)
{
PMD_FUNC_LOG(DEBUG, "\n");
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
eth_ark_dev_set_link_up(dev);
if (ark->user_ext.dev_configure)
static int
eth_ark_dev_start(struct rte_eth_dev *dev)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
int i;
PMD_FUNC_LOG(DEBUG, "\n");
{
uint16_t i;
int status;
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
struct ark_mpu_t *mpu;
PMD_FUNC_LOG(DEBUG, "\n");
static void
eth_ark_dev_close(struct rte_eth_dev *dev)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
uint16_t i;
if (ark->user_ext.dev_close)
eth_ark_dev_info_get(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
struct ark_mpu_t *tx_mpu = RTE_PTR_ADD(ark->bar0, ARK_MPU_TX_BASE);
struct ark_mpu_t *rx_mpu = RTE_PTR_ADD(ark->bar0, ARK_MPU_RX_BASE);
uint16_t ports = ark->num_ports;
{
PMD_DEBUG_LOG(DEBUG, "link status = %d\n",
dev->data->dev_link.link_status);
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (ark->user_ext.link_update) {
return ark->user_ext.link_update
eth_ark_dev_set_link_up(struct rte_eth_dev *dev)
{
dev->data->dev_link.link_status = 1;
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (ark->user_ext.dev_set_link_up)
return ark->user_ext.dev_set_link_up(dev,
eth_ark_dev_set_link_down(struct rte_eth_dev *dev)
{
dev->data->dev_link.link_status = 0;
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (ark->user_ext.dev_set_link_down)
return ark->user_ext.dev_set_link_down(dev,
eth_ark_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
{
uint16_t i;
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
stats->ipackets = 0;
stats->ibytes = 0;
eth_ark_dev_stats_reset(struct rte_eth_dev *dev)
{
uint16_t i;
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
for (i = 0; i < dev->data->nb_tx_queues; i++)
eth_tx_queue_stats_reset(dev->data->tx_queues[i]);
uint32_t index,
uint32_t pool)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (ark->user_ext.mac_addr_add) {
ark->user_ext.mac_addr_add(dev,
static void
eth_ark_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (ark->user_ext.mac_addr_remove)
ark->user_ext.mac_addr_remove(dev, index,
eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
struct rte_ether_addr *mac_addr)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (ark->user_ext.mac_addr_set) {
ark->user_ext.mac_addr_set(dev, mac_addr,
static int
eth_ark_set_mtu(struct rte_eth_dev *dev, uint16_t size)
{
- struct ark_adapter *ark =
- (struct ark_adapter *)dev->data->dev_private;
+ struct ark_adapter *ark = dev->data->dev_private;
if (ark->user_ext.set_mtu)
return ark->user_ext.set_mtu(dev, size,