drivers/net Add Support mucse N10 Pmd Driver
Subsystems (2)
v4 cover drivers/net Add Support mucse N10 Pmd Driver
For This patchset just to support the basic chip init work and user can just found the eth_dev, but can't control more. For Now just support 2*10g nic,the chip can support 2*10g,4*10g,4*1g,8*1g,8*10g.
The Feature rx side can support rx-cksum-offload,rss,vlan-filter flow_clow,uncast_filter,mcast_filter,1588,Jumbo-frame The Feature tx side can supprt tx-cksum-offload,tso,vxlan-tso flow director base on ntuple pattern of tcp/udp/ip/ eth_hdr->type for sriov is also support.
Because of the chip desgin defect, for multiple-port mode one pci-bdf will have multiple-port (max can have four ports) so this code must be care of one bdf init multiple-port.
v4:
* one patch has been forget to upload :(
v3:
* fixed http://dpdk.org/patch/129830 FreeBSD 13 compile Issue
* change iobar type to void suggest by Stephen Hemminger
* add KMOD_DEP support for vfio-pci
* change run-cmd argument parse check for invalid extra_args
v2:
* fixed MAINTAIN maillist fullname format
* fixed driver/net/meson the order issue of new driver to driver list
* improve virtual point function usage suggest by Stephen Hemminger
Wenbo Cao (8):
net/rnp: add skeleton
net/rnp: add ethdev probe and remove
net/rnp: add device init and uninit
net/rnp: add mbx basic api feature
net/rnp add reset code for Chip Init process
net/rnp add port info resource init
net/rnp add devargs runtime parsing functions
net/rnp handle device interrupts
MAINTAINERS | 6 + doc/guides/nics/features/rnp.ini | 8 + doc/guides/nics/index.rst | 1 + doc/guides/nics/rnp.rst | 43 ++ drivers/net/meson.build | 1 + drivers/net/rnp/base/rnp_api.c | 71 +++ drivers/net/rnp/base/rnp_api.h | 17 + drivers/net/rnp/base/rnp_cfg.h | 7 + drivers/net/rnp/base/rnp_dma_regs.h | 73 +++ drivers/net/rnp/base/rnp_eth_regs.h | 124 +++++ drivers/net/rnp/base/rnp_hw.h | 206 +++++++ drivers/net/rnp/base/rnp_mac_regs.h | 279 ++++++++++ drivers/net/rnp/meson.build | 18 + drivers/net/rnp/rnp.h | 218 ++++++++ drivers/net/rnp/rnp_ethdev.c | 822 ++++++++++++++++++++++++++++ drivers/net/rnp/rnp_logs.h | 43 ++ drivers/net/rnp/rnp_mbx.c | 524 ++++++++++++++++++ drivers/net/rnp/rnp_mbx.h | 140 +++++ drivers/net/rnp/rnp_mbx_fw.c | 781 ++++++++++++++++++++++++++ drivers/net/rnp/rnp_mbx_fw.h | 401 ++++++++++++++ drivers/net/rnp/rnp_osdep.h | 30 + drivers/net/rnp/rnp_rxtx.c | 83 +++ drivers/net/rnp/rnp_rxtx.h | 14 + 23 files changed, 3910 insertions(+) create mode 100644 doc/guides/nics/features/rnp.ini create mode 100644 doc/guides/nics/rnp.rst create mode 100644 drivers/net/rnp/base/rnp_api.c create mode 100644 drivers/net/rnp/base/rnp_api.h create mode 100644 drivers/net/rnp/base/rnp_cfg.h create mode 100644 drivers/net/rnp/base/rnp_dma_regs.h create mode 100644 drivers/net/rnp/base/rnp_eth_regs.h create mode 100644 drivers/net/rnp/base/rnp_hw.h create mode 100644 drivers/net/rnp/base/rnp_mac_regs.h create mode 100644 drivers/net/rnp/meson.build create mode 100644 drivers/net/rnp/rnp.h create mode 100644 drivers/net/rnp/rnp_ethdev.c create mode 100644 drivers/net/rnp/rnp_logs.h create mode 100644 drivers/net/rnp/rnp_mbx.c create mode 100644 drivers/net/rnp/rnp_mbx.h create mode 100644 drivers/net/rnp/rnp_mbx_fw.c create mode 100644 drivers/net/rnp/rnp_mbx_fw.h create mode 100644 drivers/net/rnp/rnp_osdep.h create mode 100644 drivers/net/rnp/rnp_rxtx.c create mode 100644 drivers/net/rnp/rnp_rxtx.h
Signature · 1 line
2.27.0
PATCH v4 1/8 net/rnp: add skeleton
Add Basic PMD library and doc build infrastructure Update maintainers file to claim responsibility.
--- MAINTAINERS | 6 +++++ doc/guides/nics/features/rnp.ini | 8 ++++++ doc/guides/nics/index.rst | 1 + doc/guides/nics/rnp.rst | 43 ++++++++++++++++++++++++++++++++ drivers/net/meson.build | 1 + drivers/net/rnp/meson.build | 12 +++++++++ drivers/net/rnp/rnp_ethdev.c | 3 +++ 7 files changed, 74 insertions(+) create mode 100644 doc/guides/nics/features/rnp.ini create mode 100644 doc/guides/nics/rnp.rst create mode 100644 drivers/net/rnp/meson.build create mode 100644 drivers/net/rnp/rnp_ethdev.c
MAINTAINERS +6 -0
@@ -955,6 +955,12 @@ F: drivers/net/qede/ F: doc/guides/nics/qede.rst F: doc/guides/nics/features/qede*.ini +Mucse rnp +M: Wenbo Cao <[email protected]> +F: drivers/net/rnp +F: doc/guides/nics/rnp.rst +F: doc/guides/nics/features/rnp.ini + Solarflare sfc_efx M: Andrew Rybchenko <[email protected]> F: drivers/common/sfc_efx/
doc/guides/nics/features/rnp.ini new file +8 -0
@@ -0,0 +1,8 @@ +; +; Supported features of the 'rnp' network poll mode driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Linux = Y +x86-64 = Y
doc/guides/nics/index.rst +1 -0
@@ -61,6 +61,7 @@ Network Interface Controller Drivers pcap_ring pfe qede + rnp sfc_efx softnic tap
doc/guides/nics/rnp.rst new file +43 -0
43 lines not on this page · raw message
drivers/net/meson.build +1 -0
@@ -54,6 +54,7 @@ drivers = [ 'pfe', 'qede', 'ring', + 'rnp', 'sfc', 'softnic', 'tap',
drivers/net/rnp/meson.build new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(C) 2023 Mucse IC Design Ltd. +# +if is_windows + build = false + reason = 'not supported on Windows' + subdir_done() +endif + +sources = files( + 'rnp_ethdev.c', +)
drivers/net/rnp/rnp_ethdev.c new file +3 -0
@@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2023 Mucse IC Design Ltd. +*/
Signature · 1 line
2.27.0
PATCH v4 2/8 net/rnp: add ethdev probe and remove
In reply to Wenbo CaoAdd basic PCIe ethdev probe and remove.
--- drivers/net/rnp/rnp.h | 13 ++++++ drivers/net/rnp/rnp_ethdev.c | 83 ++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 drivers/net/rnp/rnp.h
drivers/net/rnp/rnp.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2023 Mucse IC Design Ltd. +*/ +#ifndef __RNP_H__ +#define __RNP_H__ + +#define PCI_VENDOR_ID_MUCSE (0x8848) +#define RNP_DEV_ID_N10G (0x1000) + +struct rnp_eth_port { +} __rte_cache_aligned; + +#endif /* __RNP_H__ */
drivers/net/rnp/rnp_ethdev.c +83 -0
86 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v4 3/8 net/rnp: add device init and uninit
In reply to Wenbo CaoAdd basic init and uninit function
--- drivers/net/rnp/base/rnp_hw.h | 19 ++++ drivers/net/rnp/meson.build | 1 + drivers/net/rnp/rnp.h | 25 +++++ drivers/net/rnp/rnp_ethdev.c | 196 +++++++++++++++++++++++++++++++++- drivers/net/rnp/rnp_logs.h | 34 ++++++ drivers/net/rnp/rnp_osdep.h | 30 ++++++ 6 files changed, 300 insertions(+), 5 deletions(-) create mode 100644 drivers/net/rnp/base/rnp_hw.h create mode 100644 drivers/net/rnp/rnp_logs.h create mode 100644 drivers/net/rnp/rnp_osdep.h
drivers/net/rnp/base/rnp_hw.h new file +19 -0
@@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2023 Mucse IC Design Ltd. +*/ +#ifndef __RNP_HW_H__ +#define __RNP_HW_H__ + +struct rnp_eth_adapter ; +struct rnp_hw { +struct rnp_eth_adapter *back; +void *iobar0; +uint32_t iobar0_len; +void *iobar4; +uint32_t iobar4_len; + +uint16_t device_id; +uint16_t vendor_id; +} __rte_cache_aligned; + +#endif /* __RNP_H__*/
drivers/net/rnp/meson.build +1 -0
@@ -10,3 +10,4 @@ endif sources = files( 'rnp_ethdev.c', ) +includes += include_directories('base')
drivers/net/rnp/rnp.h +25 -0
@@ -4,10 +4,35 @@#ifndef __RNP_H__#define __RNP_H__ +#include "base/rnp_hw.h" +#define PCI_VENDOR_ID_MUCSE (0x8848)#define RNP_DEV_ID_N10G (0x1000) +#define RNP_MAX_PORT_OF_PF (4) +#define RNP_CFG_BAR (4) +#define RNP_PF_INFO_BAR (0)struct rnp_eth_port { +struct rnp_eth_adapter *adapt; +struct rte_eth_dev *eth_dev; +} __rte_cache_aligned; + +struct rnp_share_ops { } __rte_cache_aligned; +struct rnp_eth_adapter { +struct rnp_hw hw; +struct rte_pci_device *pdev; +struct rte_eth_dev *eth_dev;/* master eth_dev */ +struct rnp_eth_port *ports[RNP_MAX_PORT_OF_PF ]; +struct rnp_share_ops *share_priv; + +uint8_t num_ports;/* Cur Pf Has physical Port Num */ +} __rte_cache_aligned; + +#define RNP_DEV_TO_PORT (eth_dev) \ + (((struct rnp_eth_port *)((eth_dev)->data->dev_private))) +#define RNP_DEV_TO_ADAPTER (eth_dev) \ + ((struct rnp_eth_adapter *)(RNP_DEV_TO_PORT(eth_dev)->adapt)) +#endif /* __RNP_H__ */
drivers/net/rnp/rnp_ethdev.c +191 -5
217 lines not on this page · raw message
drivers/net/rnp/rnp_logs.h new file +34 -0
@@ -0,0 +1,34 @@ +#ifndef __RNP_LOGS_H__ +#define __RNP_LOGS_H__ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2023 Mucse IC Design Ltd. +*/ +extern int rnp_init_logtype; + +#define RNP_PMD_INIT_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_##level, rnp_init_logtype, \ + "%s() " fmt, __func__, ##args) +#define PMD_INIT_FUNC_TRACE () RNP_PMD_INIT_LOG(DEBUG, " >>") +extern int rnp_drv_logtype; +#define RNP_PMD_DRV_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_##level, rnp_drv_logtype, \ + "%s() " fmt, __func__, ##args) +#ifdef RTE_LIBRTE_RNP_DEBUG_RX +extern int rnp_rx_logtype; +#define RNP_PMD_RX_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, rnp_rx_logtype, \ + "%s(): " fmt "\n", __func__, ##args) +#else +#define RNP_PMD_RX_LOG(level, fmt, args...) do { } while (0) +#endif + +#ifdef RTE_LIBRTE_RNP_DEBUG_TX +extern int rnp_tx_logtype; +#define PMD_TX_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, rnp_tx_logtype, \ + "%s(): " fmt "\n", __func__, ##args) +#else +#define PMD_TX_LOG(level, fmt, args...) do { } while (0) +#endif + +#endif /* __RNP_LOGS_H__ */
drivers/net/rnp/rnp_osdep.h new file +30 -0
@@ -0,0 +1,30 @@ +#ifndef __RNP_OSDEP_H__ +#define __RNP_OSDEP_H__ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright(C) 2023 Mucse IC Design Ltd. +*/ +#include <stdint.h> + +#include <rte_byteorder.h> + +#define __iomem +#define _RING_ (off) ((off) + 0x000000) +#define _DMA_ (off) ((off)) +#define _GLB_ (off) ((off) + 0x000000) +#define _NIC_ (off) ((off) + 0x000000) +#define _ETH_ (off) ((off)) +#define _MAC_ (off) ((off)) +#define BIT (n) (1UL << (n)) +#define BIT64 (n) (1ULL << (n)) +#define BITS_PER_LONG (__SIZEOF_LONG__ * 8) +#define GENMASK (h, l) \ + (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) + +typedef uint8_t u8 ; +typedef uint16_t u16 ; +typedef uint32_t u32 ; +typedef uint64_t u64 ; +typedef int32_t s32 ; +typedef int16_t s16 ; +typedef int8_t s8 ; +#endif /* __RNP_OSDEP_H__ */
Signature · 1 line
2.27.0
PATCH v4 4/8 net/rnp: add mbx basic api feature
In reply to Wenbo Caombx base code is for communicate with the firmware
--- drivers/net/rnp/base/rnp_api.c | 23 ++ drivers/net/rnp/base/rnp_api.h | 7 + drivers/net/rnp/base/rnp_cfg.h | 7 + drivers/net/rnp/base/rnp_dma_regs.h | 73 ++++ drivers/net/rnp/base/rnp_eth_regs.h | 124 +++++++ drivers/net/rnp/base/rnp_hw.h | 112 +++++- drivers/net/rnp/meson.build | 1 + drivers/net/rnp/rnp.h | 35 ++ drivers/net/rnp/rnp_ethdev.c | 70 +++- drivers/net/rnp/rnp_logs.h | 9 + drivers/net/rnp/rnp_mbx.c | 524 ++++++++++++++++++++++++++++ drivers/net/rnp/rnp_mbx.h | 139 ++++++++ drivers/net/rnp/rnp_mbx_fw.c | 272 +++++++++++++++ drivers/net/rnp/rnp_mbx_fw.h | 22 ++ 14 files changed, 1415 insertions(+), 3 deletions(-) create mode 100644 drivers/net/rnp/base/rnp_api.c create mode 100644 drivers/net/rnp/base/rnp_api.h create mode 100644 drivers/net/rnp/base/rnp_cfg.h create mode 100644 drivers/net/rnp/base/rnp_dma_regs.h create mode 100644 drivers/net/rnp/base/rnp_eth_regs.h create mode 100644 drivers/net/rnp/rnp_mbx.c create mode 100644 drivers/net/rnp/rnp_mbx.h create mode 100644 drivers/net/rnp/rnp_mbx_fw.c create mode 100644 drivers/net/rnp/rnp_mbx_fw.h
drivers/net/rnp/base/rnp_api.c new file +23 -0
@@ -0,0 +1,23 @@ +#include "rnp.h" +#include "rnp_api.h" + +int +rnp_init_hw (struct rte_eth_dev *dev) +{ +const struct rnp_mac_api *ops =RNP_DEV_TO_MAC_OPS (dev); +struct rnp_hw *hw =RNP_DEV_TO_HW (dev); + +if (ops->init_hw) +return ops->init_hw (hw); +return -EOPNOTSUPP ; +} + +int +rnp_reset_hw (struct rte_eth_dev *dev,struct rnp_hw *hw) +{ +const struct rnp_mac_api *ops =RNP_DEV_TO_MAC_OPS (dev); + +if (ops->reset_hw) +return ops->reset_hw (hw); +return -EOPNOTSUPP ; +}
drivers/net/rnp/base/rnp_api.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef __RNP_API_H__ +#define __RNP_API_H__ +int +rnp_init_hw (struct rte_eth_dev *dev); +int +rnp_reset_hw (struct rte_eth_dev *dev,struct rnp_hw *hw); +#endif /* __RNP_API_H__ */
drivers/net/rnp/base/rnp_cfg.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef __RNP_CFG_H__ +#define __RNP_CFG_H__ +#include "rnp_osdep.h" + +#define RNP_NIC_RESET _NIC_(0x0010) +#define RNP_TX_QINQ_WORKAROUND _NIC_(0x801c) +#endif /* __RNP_CFG_H__ */
drivers/net/rnp/base/rnp_dma_regs.h new file +73 -0
73 lines not on this page · raw message
drivers/net/rnp/base/rnp_eth_regs.h new file +124 -0
124 lines not on this page · raw message
drivers/net/rnp/base/rnp_hw.h +111 -1
127 lines not on this page · raw message
drivers/net/rnp/meson.build +1 -0
@@ -9,5 +9,6 @@ endif sources = files( 'rnp_ethdev.c', + 'rnp_mbx.c', ) includes += include_directories('base')
drivers/net/rnp/rnp.h +35 -0
@@ -3,6 +3,7 @@*/ #ifndef __RNP_H__#define __RNP_H__ +#include <rte_log.h> #include "base/rnp_hw.h"
@@ -14,14 +15,17 @@struct rnp_eth_port {struct rnp_eth_adapter *adapt; +struct rnp_hw *hw;struct rte_eth_dev *eth_dev; } __rte_cache_aligned;struct rnp_share_ops { +const struct rnp_mbx_api *mbx_api; } __rte_cache_aligned;struct rnp_eth_adapter {struct rnp_hw hw; +uint16_t max_vfs;struct rte_pci_device *pdev;struct rte_eth_dev *eth_dev;/* master eth_dev */ struct rnp_eth_port *ports[RNP_MAX_PORT_OF_PF ];
@@ -34,5 +38,36 @@ struct rnp_eth_adapter { (((struct rnp_eth_port *)((eth_dev)->data->dev_private)))#define RNP_DEV_TO_ADAPTER (eth_dev) \ ((struct rnp_eth_adapter *)(RNP_DEV_TO_PORT(eth_dev)->adapt)) +#define RNP_DEV_TO_HW (eth_dev) \ + (&((struct rnp_eth_adapter *)(RNP_DEV_TO_PORT((eth_dev))->adapt))->hw) +#define RNP_DEV_PP_PRIV_TO_MBX_OPS (dev) \ + (((struct rnp_share_ops *)(dev)->process_private)->mbx_api) +#define RNP_DEV_TO_MBX_OPS (dev) RNP_DEV_PP_PRIV_TO_MBX_OPS(dev) +static inline void rnp_reg_offset_init (struct rnp_hw *hw) +{ +uint16_t i; + +if (hw->device_id ==RNP_DEV_ID_N10G && hw->mbx.pf_num) { + hw->iobar4 = (void *)((uint8_t *)hw->iobar4 +0x100000 ); + hw->msix_base = (void *)((uint8_t *)hw->iobar4 +0xa4000 ); + hw->msix_base = (void *)((uint8_t *)hw->msix_base +0x200 ); + }else { + hw->msix_base = (void *)((uint8_t *)hw->iobar4 +0xa4000 ); + } +/* === dma status/config====== */ + hw->link_sync = (void *)((uint8_t *)hw->iobar4 +0x000c ); + hw->dma_axi_en = (void *)((uint8_t *)hw->iobar4 +0x0010 ); + hw->dma_axi_st = (void *)((uint8_t *)hw->iobar4 +0x0014 ); + +if (hw->mbx.pf_num) + hw->msix_base = (void *)((uint8_t *)0x200 ); +/* === queue registers === */ + hw->dma_base = (void *)((uint8_t *)hw->iobar4 +0x08000 ); + hw->veb_base = (void *)((uint8_t *)hw->iobar4 +0x0 ); + hw->eth_base = (void *)((uint8_t *)hw->iobar4 +0x10000 ); +/* mac */ +for (i =0 ; i <RNP_MAX_HW_PORT_PERR_PF ; i++) + hw->mac_base[i] = (void *)((uint8_t *)hw->iobar4 +0x60000 +0x10000 * i); +}#endif /* __RNP_H__ */
drivers/net/rnp/rnp_ethdev.c +68 -2
97 lines not on this page · raw message
drivers/net/rnp/rnp_logs.h +9 -0
@@ -13,6 +13,15 @@ extern int rnp_drv_logtype; #define RNP_PMD_DRV_LOG(level, fmt, args...) \ rte_log(RTE_LOG_##level, rnp_drv_logtype, \ "%s() " fmt, __func__, ##args) +#define PMD_DRV_LOG_RAW(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, rnp_drv_logtype, "%s(): " fmt, \ + __func__, ## args) +#define PMD_DRV_LOG(level, fmt, args...) \ + PMD_DRV_LOG_RAW(level, fmt "\n", ## args) + +#define RNP_PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_##level, rnp_drv_logtype, \ + "rnp_net: (%d) " fmt, __LINE__, ##args)#ifdef RTE_LIBRTE_RNP_DEBUG_RX extern int rnp_rx_logtype; #define RNP_PMD_RX_LOG(level, fmt, args...) \
drivers/net/rnp/rnp_mbx.c new file +524 -0
524 lines not on this page · raw message
drivers/net/rnp/rnp_mbx.h new file +139 -0
139 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.c new file +272 -0
272 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.h new file +22 -0
@@ -0,0 +1,22 @@ +#ifndef __RNP_MBX_FW_H__ +#define __RNP_MBX_FW_H__ + +struct mbx_fw_cmd_reply ; +typedef void (*cookie_cb )(struct mbx_fw_cmd_reply *reply,void *priv); +#define RNP_MAX_SHARE_MEM (8 * 8) +struct mbx_req_cookie { +int magic; +#define COOKIE_MAGIC 0xCE +cookie_cb cb; +int timeout_ms; +int errcode; + +/* wait_queue_head_t wait; */ +volatile int done; +int priv_len; +char priv[RNP_MAX_SHARE_MEM ]; +}; +struct mbx_fw_cmd_reply { +} __rte_cache_aligned; + +#endif /* __RNP_MBX_FW_H__*/
Signature · 1 line
2.27.0
PATCH v4 5/8 net/rnp add reset code for Chip Init process
In reply to Wenbo Caowe must get the shape info of nic from Firmware for reset. so the related codes is first get firmware info and then reset the chip
--- drivers/net/rnp/base/rnp_hw.h | 56 +++++++++++- drivers/net/rnp/meson.build | 3 + drivers/net/rnp/rnp.h | 27 ++++++ drivers/net/rnp/rnp_ethdev.c | 93 ++++++++++++++++++- drivers/net/rnp/rnp_mbx_fw.h | 163 +++++++++++++++++++++++++++++++++- 5 files changed, 339 insertions(+), 3 deletions(-)
drivers/net/rnp/base/rnp_hw.h +55 -1
@@ -8,6 +8,9 @@#include <ethdev_driver.h> #include "rnp_osdep.h" +#include "rnp_dma_regs.h" +#include "rnp_eth_regs.h" +#include "rnp_cfg.h" static inline unsigned int rnp_rd_reg (volatile void *addr) {
@@ -29,7 +32,18 @@ static inline void rnp_wr_reg(volatile void *reg, int val) rnp_rd_reg((uint8_t *)(_base) + (_off))#define rnp_io_wr (_base, _off, _val) \ rnp_wr_reg((uint8_t *)(_base) + (_off), (_val)) - +#define rnp_eth_rd (_hw, _off) \ + rnp_rd_reg((uint8_t *)((_hw)->eth_base) + (_off)) +#define rnp_eth_wr (_hw, _off, _val) \ + rnp_wr_reg((uint8_t *)((_hw)->eth_base) + (_off), (_val)) +#define rnp_dma_rd (_hw, _off) \ + rnp_rd_reg((uint8_t *)((_hw)->dma_base) + (_off)) +#define rnp_dma_wr (_hw, _off, _val) \ + rnp_wr_reg((uint8_t *)((_hw)->dma_base) + (_off), (_val)) +#define rnp_top_rd (_hw, _off) \ + rnp_rd_reg((uint8_t *)((_hw)->comm_reg_base) + (_off)) +#define rnp_top_wr (_hw, _off, _val) \ + rnp_wr_reg((uint8_t *)((_hw)->comm_reg_base) + (_off), (_val))struct rnp_hw ;/* Mbx Operate info */ enum MBX_ID {
@@ -98,6 +112,17 @@ struct rnp_mbx_info {rte_atomic16_t state; } __rte_cache_aligned; +struct rnp_mac_api { +int32_t (*init_hw)(struct rnp_hw *hw); +int32_t (*reset_hw)(struct rnp_hw *hw); +}; + +struct rnp_mac_info { +uint8_t assign_addr[RTE_ETHER_ADDR_LEN ]; +uint8_t set_addr[RTE_ETHER_ADDR_LEN ]; +struct rnp_mac_api ops; +} __rte_cache_aligned; +struct rnp_eth_adapter ;#define RNP_MAX_HW_PORT_PERR_PF (4)struct rnp_hw {
@@ -111,8 +136,10 @@ struct rnp_hw {void *eth_base;void *veb_base;void *mac_base[RNP_MAX_HW_PORT_PERR_PF ]; +void *comm_reg_base;void *msix_base;/* === dma == */ +void *dev_version;void *dma_axi_en;void *dma_axi_st;
@@ -120,10 +147,37 @@ struct rnp_hw {uint16_t vendor_id;uint16_t function;uint16_t pf_vf_num; +int pfvfnum;uint16_t max_vfs; + +bool ncsi_en; +uint8_t ncsi_rar_entries; + +int sgmii_phy_id; +int is_sgmii; +u16 phy_type; +uint8_t force_10g_1g_speed_ablity; +uint8_t force_speed_stat; +#define FORCE_SPEED_STAT_DISABLED (0) +#define FORCE_SPEED_STAT_1G (1) +#define FORCE_SPEED_STAT_10G (2) +uint32_t speed; +unsigned int axi_mhz; + +int fw_version;/* Primary FW Version */ +uint32_t fw_uid;/* Subclass Fw Version */ + +int nic_mode; +unsigned char lane_mask; +int lane_of_port[4 ]; +char phy_port_ids[4 ];/* port id: for lane0~3: value: 0 ~ 7 */ +uint8_t max_port_num;/* Max Port Num This PF Have */ +void *cookie_pool;char cookie_p_name[RTE_MEMZONE_NAMESIZE ]; +struct rnp_mac_info mac;struct rnp_mbx_info mbx; + rte_spinlock_t fw_lock; } __rte_cache_aligned;#endif /* __RNP_H__*/
drivers/net/rnp/meson.build +3 -0
@@ -10,5 +10,8 @@ endif sources = files( 'rnp_ethdev.c', 'rnp_mbx.c', + 'rnp_mbx_fw.c', + 'base/rnp_api.c', ) + includes += include_directories('base')
drivers/net/rnp/rnp.h +27 -0
@@ -13,6 +13,20 @@#define RNP_CFG_BAR (4)#define RNP_PF_INFO_BAR (0) +enum rnp_resource_share_m { +RNP_SHARE_CORPORATE =0 , +RNP_SHARE_INDEPEND , +}; +/* +* Structure to store private data for each driver instance (for each port). +*/ +enum rnp_work_mode { +RNP_SINGLE_40G =0 , +RNP_SINGLE_10G =1 , +RNP_DUAL_10G =2 , +RNP_QUAD_10G =3 , +}; +struct rnp_eth_port {struct rnp_eth_adapter *adapt;struct rnp_hw *hw;
@@ -21,9 +35,12 @@ struct rnp_eth_port {struct rnp_share_ops {const struct rnp_mbx_api *mbx_api; +const struct rnp_mac_api *mac_api; } __rte_cache_aligned;struct rnp_eth_adapter { +enum rnp_work_mode mode; +enum rnp_resource_share_m s_mode;/* Port Resource Share Policy */ struct rnp_hw hw;uint16_t max_vfs;struct rte_pci_device *pdev;
@@ -31,7 +48,9 @@ struct rnp_eth_adapter {struct rnp_eth_port *ports[RNP_MAX_PORT_OF_PF ];struct rnp_share_ops *share_priv; +int max_link_speed;uint8_t num_ports;/* Cur Pf Has physical Port Num */ +uint8_t lane_mask; } __rte_cache_aligned;#define RNP_DEV_TO_PORT (eth_dev) \
@@ -40,9 +59,14 @@ struct rnp_eth_adapter { ((struct rnp_eth_adapter *)(RNP_DEV_TO_PORT(eth_dev)->adapt))#define RNP_DEV_TO_HW (eth_dev) \ (&((struct rnp_eth_adapter *)(RNP_DEV_TO_PORT((eth_dev))->adapt))->hw) +#define RNP_HW_TO_ADAPTER (hw) \ + ((struct rnp_eth_adapter *)((hw)->back))#define RNP_DEV_PP_PRIV_TO_MBX_OPS (dev) \ (((struct rnp_share_ops *)(dev)->process_private)->mbx_api)#define RNP_DEV_TO_MBX_OPS (dev) RNP_DEV_PP_PRIV_TO_MBX_OPS(dev) +#define RNP_DEV_PP_PRIV_TO_MAC_OPS (dev) \ + (((struct rnp_share_ops *)(dev)->process_private)->mac_api) +#define RNP_DEV_TO_MAC_OPS (dev) RNP_DEV_PP_PRIV_TO_MAC_OPS(dev)static inline void rnp_reg_offset_init (struct rnp_hw *hw) {
@@ -56,6 +80,7 @@ static inline void rnp_reg_offset_init(struct rnp_hw *hw) hw->msix_base = (void *)((uint8_t *)hw->iobar4 +0xa4000 ); }/* === dma status/config====== */ + hw->dev_version = (void *)((uint8_t *)hw->iobar4 +0x0000 ); hw->link_sync = (void *)((uint8_t *)hw->iobar4 +0x000c ); hw->dma_axi_en = (void *)((uint8_t *)hw->iobar4 +0x0010 ); hw->dma_axi_st = (void *)((uint8_t *)hw->iobar4 +0x0014 );
@@ -69,5 +94,7 @@ static inline void rnp_reg_offset_init(struct rnp_hw *hw)/* mac */ for (i =0 ; i <RNP_MAX_HW_PORT_PERR_PF ; i++) hw->mac_base[i] = (void *)((uint8_t *)hw->iobar4 +0x60000 +0x10000 * i); +/* === top reg === */ + hw->comm_reg_base = (void *)((uint8_t *)hw->iobar4 + 0x30000); }#endif /* __RNP_H__ */
drivers/net/rnp/rnp_ethdev.c +92 -1
112 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.h +162 -1
169 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v4 6/8 net/rnp add port info resource init
In reply to Wenbo CaoAdd Api For FW Mac Info, Port Resoucre info init Code For Different Shape Of Nic
--- drivers/net/rnp/base/rnp_api.c | 48 +++++++ drivers/net/rnp/base/rnp_api.h | 10 ++ drivers/net/rnp/base/rnp_hw.h | 18 +++ drivers/net/rnp/meson.build | 1 + drivers/net/rnp/rnp.h | 88 +++++++++++++ drivers/net/rnp/rnp_ethdev.c | 224 +++++++++++++++++++++++++++++++-- drivers/net/rnp/rnp_mbx_fw.c | 112 +++++++++++++++++ drivers/net/rnp/rnp_mbx_fw.h | 115 +++++++++++++++++ drivers/net/rnp/rnp_rxtx.c | 83 ++++++++++++ drivers/net/rnp/rnp_rxtx.h | 14 +++ 10 files changed, 706 insertions(+), 7 deletions(-) create mode 100644 drivers/net/rnp/rnp_rxtx.c create mode 100644 drivers/net/rnp/rnp_rxtx.h
drivers/net/rnp/base/rnp_api.c +48 -0
@@ -21,3 +21,51 @@ rnp_reset_hw(struct rte_eth_dev *dev, struct rnp_hw *hw)return ops->reset_hw (hw);return -EOPNOTSUPP ; } + +int +rnp_get_mac_addr (struct rte_eth_dev *dev,uint8_t *macaddr) +{ +struct rnp_eth_port *port =RNP_DEV_TO_PORT (dev); +const struct rnp_mac_api *ops =RNP_DEV_TO_MAC_OPS (dev); + +if (!macaddr) +return -EINVAL ; +if (ops->get_mac_addr) +return ops->get_mac_addr (port, port->attr.nr_lane, macaddr); +return -EOPNOTSUPP ; +} + +int +rnp_set_default_mac (struct rte_eth_dev *dev,uint8_t *mac_addr) +{ +const struct rnp_mac_api *ops =RNP_DEV_TO_MAC_OPS (dev); +struct rnp_eth_port *port =RNP_DEV_TO_PORT (dev); + +if (ops->set_default_mac) +return ops->set_default_mac (port, mac_addr); +return -EOPNOTSUPP ; +} + +int +rnp_set_rafb (struct rte_eth_dev *dev,uint8_t *addr, +uint8_t vm_pool,uint8_t index) +{ +const struct rnp_mac_api *ops =RNP_DEV_TO_MAC_OPS (dev); +struct rnp_eth_port *port =RNP_DEV_TO_PORT (dev); + +if (ops->set_rafb) +return ops->set_rafb (port, addr, vm_pool, index); +return -EOPNOTSUPP ; +} + +int +rnp_clear_rafb (struct rte_eth_dev *dev, +uint8_t vm_pool,uint8_t index) +{ +const struct rnp_mac_api *ops =RNP_DEV_TO_MAC_OPS (dev); +struct rnp_eth_port *port =RNP_DEV_TO_PORT (dev); + +if (ops->clear_rafb) +return ops->clear_rafb (port, vm_pool, index); +return -EOPNOTSUPP ; +}
drivers/net/rnp/base/rnp_api.h +10 -0
@@ -4,4 +4,14 @@ int rnp_init_hw(struct rte_eth_dev *dev);int rnp_reset_hw (struct rte_eth_dev *dev,struct rnp_hw *hw); +int +rnp_get_mac_addr (struct rte_eth_dev *dev,uint8_t *macaddr); +int +rnp_set_default_mac (struct rte_eth_dev *dev,uint8_t *mac_addr); +int +rnp_set_rafb (struct rte_eth_dev *dev,uint8_t *addr, +uint8_t vm_pool,uint8_t index); +int +rnp_clear_rafb (struct rte_eth_dev *dev, +uint8_t vm_pool,uint8_t index);#endif /* __RNP_API_H__ */
drivers/net/rnp/base/rnp_hw.h +18 -0
@@ -44,6 +44,10 @@ static inline void rnp_wr_reg(volatile void *reg, int val) rnp_rd_reg((uint8_t *)((_hw)->comm_reg_base) + (_off))#define rnp_top_wr (_hw, _off, _val) \ rnp_wr_reg((uint8_t *)((_hw)->comm_reg_base) + (_off), (_val)) +#define RNP_MACADDR_UPDATE_LO (hw, hw_idx, val) \ + rnp_eth_wr(hw, RNP_RAL_BASE_ADDR(hw_idx), val) +#define RNP_MACADDR_UPDATE_HI (hw, hw_idx, val) \ + rnp_eth_wr(hw, RNP_RAH_BASE_ADDR(hw_idx), val)struct rnp_hw ;/* Mbx Operate info */ enum MBX_ID {
@@ -112,9 +116,23 @@ struct rnp_mbx_info {rte_atomic16_t state; } __rte_cache_aligned; +struct rnp_eth_port ;struct rnp_mac_api {int32_t (*init_hw)(struct rnp_hw *hw);int32_t (*reset_hw)(struct rnp_hw *hw); +/* MAC Address */ +int32_t (*get_mac_addr)(struct rnp_eth_port *port, +uint8_t lane, +uint8_t *macaddr); +int32_t (*set_default_mac)(struct rnp_eth_port *port,uint8_t *mac); +/* Receive Address Filter Table */ +int32_t (*set_rafb)(struct rnp_eth_port *port, +uint8_t *mac, +uint8_t vm_pool, +uint8_t index); +int32_t (*clear_rafb)(struct rnp_eth_port *port, +uint8_t vm_pool, +uint8_t index); };struct rnp_mac_info {
drivers/net/rnp/meson.build +1 -0
@@ -11,6 +11,7 @@ sources = files( 'rnp_ethdev.c', 'rnp_mbx.c', 'rnp_mbx_fw.c', + 'rnp_rxtx.c', 'base/rnp_api.c', )
drivers/net/rnp/rnp.h +88 -0
116 lines not on this page · raw message
drivers/net/rnp/rnp_ethdev.c +217 -7
278 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.c +112 -0
115 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.h +115 -0
159 lines not on this page · raw message
drivers/net/rnp/rnp_rxtx.c new file +83 -0
83 lines not on this page · raw message
drivers/net/rnp/rnp_rxtx.h new file +14 -0
@@ -0,0 +1,14 @@ +#ifndef __RNP_RXTX_H__ +#define __RNP_RXTX_H__ + +uint32_t rnp_dev_rx_queue_count (void *rx_queue); +int rnp_dev_rx_descriptor_status (void *rx_queue,uint16_t offset); +int rnp_dev_tx_descriptor_status (void *tx_queue,uint16_t offset); +uint16_t +rnp_recv_pkts (void *_rxq,struct rte_mbuf **rx_pkts,uint16_t nb_pkts); +uint16_t +rnp_xmit_pkts (void *_txq,struct rte_mbuf **tx_pkts,uint16_t nb_pkts); +uint16_t rnp_prep_pkts (void *tx_queue, +struct rte_mbuf **tx_pkts, +uint16_t nb_pkts); +#endif /* __RNP_RXTX_H__ */
Signature · 1 line
2.27.0
PATCH v4 7/8 net/rnp add devargs runtime parsing functions
In reply to Wenbo Caoadd various runtime devargs command line options
supported by this driver.
--- drivers/net/rnp/rnp.h | 22 +++++ drivers/net/rnp/rnp_ethdev.c | 166 +++++++++++++++++++++++++++++++++++ drivers/net/rnp/rnp_mbx_fw.c | 164 ++++++++++++++++++++++++++++++++++ drivers/net/rnp/rnp_mbx_fw.h | 69 +++++++++++++++ 4 files changed, 421 insertions(+)
drivers/net/rnp/rnp.h +22 -0
@@ -107,6 +107,8 @@ struct rnp_eth_port {struct rnp_eth_adapter *adapt;uint8_t mac_addr[RTE_ETHER_ADDR_LEN ];struct rnp_hw *hw; +uint8_t rx_func_sec;/* force set io rx_func */ +uint8_t tx_func_sec;/* force set io tx func */ struct rte_eth_dev *eth_dev;struct rnp_port_attr attr;/* Recvice Mac Address Record Table */
@@ -122,6 +124,13 @@ struct rnp_share_ops {const struct rnp_mac_api *mac_api; } __rte_cache_aligned; +enum { +RNP_IO_FUNC_USE_NONE =0 , +RNP_IO_FUNC_USE_VEC , +RNP_IO_FUNC_USE_SIMPLE , +RNP_IO_FUNC_USE_COMMON , +}; +struct rnp_eth_adapter {enum rnp_work_mode mode;enum rnp_resource_share_m s_mode;/* Port Resource Share Policy */
@@ -135,6 +144,19 @@ struct rnp_eth_adapter {int max_link_speed;uint8_t num_ports;/* Cur Pf Has physical Port Num */ uint8_t lane_mask; + +uint8_t rx_func_sec;/* force set io rx_func */ +uint8_t tx_func_sec;/* force set io tx func*/ +/*fw-update*/ +bool do_fw_update; +char *fw_path; + +bool loopback_en; +bool fw_sfp_10g_1g_auto_det; +int fw_force_speed_1g; +#define FOCE_SPEED_1G_NOT_SET (-1) +#define FOCE_SPEED_1G_DISABLED (0) +#define FOCE_SPEED_1G_ENABLED (1) } __rte_cache_aligned;#define RNP_DEV_TO_PORT (eth_dev) \
drivers/net/rnp/rnp_ethdev.c +166 -0
202 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.c +164 -0
173 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.h +69 -0
97 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH v4 8/8 net/rnp handle device interrupts
In reply to Wenbo CaoHandle device lsc interrupt event
--- drivers/net/rnp/base/rnp_hw.h | 5 + drivers/net/rnp/base/rnp_mac_regs.h | 279 ++++++++++++++++++++++++++++ drivers/net/rnp/rnp.h | 8 + drivers/net/rnp/rnp_ethdev.c | 17 ++ drivers/net/rnp/rnp_mbx.h | 3 +- drivers/net/rnp/rnp_mbx_fw.c | 233 +++++++++++++++++++++++ drivers/net/rnp/rnp_mbx_fw.h | 38 +++- 7 files changed, 580 insertions(+), 3 deletions(-) create mode 100644 drivers/net/rnp/base/rnp_mac_regs.h
drivers/net/rnp/base/rnp_hw.h +5 -0
@@ -10,6 +10,7 @@#include "rnp_osdep.h" #include "rnp_dma_regs.h" #include "rnp_eth_regs.h" +#include "rnp_mac_regs.h" #include "rnp_cfg.h" static inline unsigned int rnp_rd_reg (volatile void *addr)
@@ -48,6 +49,10 @@ static inline void rnp_wr_reg(volatile void *reg, int val) rnp_eth_wr(hw, RNP_RAL_BASE_ADDR(hw_idx), val)#define RNP_MACADDR_UPDATE_HI (hw, hw_idx, val) \ rnp_eth_wr(hw, RNP_RAH_BASE_ADDR(hw_idx), val) +#define rnp_mac_rd (hw, id, off) \ + rnp_rd_reg((char *)(hw)->mac_base[id] + (off)) +#define rnp_mac_wr (hw, id, off, val) \ + rnp_wr_reg((char *)(hw)->mac_base[id] + (off), val)struct rnp_hw ;/* Mbx Operate info */ enum MBX_ID {
drivers/net/rnp/base/rnp_mac_regs.h new file +279 -0
279 lines not on this page · raw message
drivers/net/rnp/rnp.h +8 -0
@@ -111,6 +111,8 @@ struct rnp_eth_port {uint8_t tx_func_sec;/* force set io tx func */ struct rte_eth_dev *eth_dev;struct rnp_port_attr attr; +uint64_t state; +rte_spinlock_t rx_mac_lock;/* Lock For Mac_cfg resource write */ /* Recvice Mac Address Record Table */ uint8_t mac_use_tb[RNP_MAX_MAC_ADDRS ];uint8_t use_num_mac;
@@ -131,6 +133,12 @@ enum { RNP_IO_FUNC_USE_COMMON, }; +enum rnp_port_state { +RNP_PORT_STATE_PAUSE =0 , +RNP_PORT_STATE_FINISH , +RNP_PORT_STATE_SETTING , +}; +struct rnp_eth_adapter {enum rnp_work_mode mode;enum rnp_resource_share_m s_mode;/* Port Resource Share Policy */
drivers/net/rnp/rnp_ethdev.c +17 -0
@@ -601,10 +601,23 @@ static int rnp_post_handle(struct rnp_eth_adapter *adapter)return 0 ; } +static void rnp_dev_interrupt_handler (void *param) +{ +struct rte_eth_dev *dev = (struct rte_eth_dev *)param; +struct rte_pci_device *pci_dev =RTE_ETH_DEV_TO_PCI (dev); +struct rte_intr_handle *intr_handle = pci_dev->intr_handle; +struct rnp_eth_adapter *adapter =RNP_DEV_TO_ADAPTER (dev); + +rte_intr_disable (intr_handle); +rnp_fw_msg_handler (adapter); +rte_intr_enable (intr_handle); +} +static int rnp_eth_dev_init (struct rte_eth_dev *dev) {struct rte_pci_device *pci_dev =RTE_ETH_DEV_TO_PCI (dev); +struct rte_intr_handle *intr_handle = pci_dev->intr_handle;struct rnp_eth_port *port =RNP_DEV_TO_PORT (dev);struct rnp_eth_adapter *adapter =NULL ;char name[RTE_ETH_NAME_MAX_LEN ] =" " ;
@@ -680,6 +693,10 @@ rnp_eth_dev_init(struct rte_eth_dev *dev)rnp_mac_rx_disable (eth_dev);rnp_mac_tx_disable (eth_dev); } +rte_intr_disable (intr_handle); +/* Enable Link Update Event Interrupt */ +rte_intr_callback_register (intr_handle, + rnp_dev_interrupt_handler, dev); ret =rnp_post_handle (adapter);if (ret) goto eth_alloc_error;
drivers/net/rnp/rnp_mbx.h +2 -1
@@ -13,7 +13,8 @@/* Mbx Ctrl state */ #define RNP_VFMAILBOX_SIZE (14)/* 16 32 bit words - 64 bytes */ -#define TSRN10_VFMBX_SIZE (RNP_VFMAILBOX_SIZE) +#define RNP_FW_MAILBOX_SIZE RNP_VFMAILBOX_SIZE +#define RNP_VFMBX_SIZE (RNP_VFMAILBOX_SIZE)#define RNP_VT_MSGTYPE_ACK (0x80000000)#define RNP_VT_MSGTYPE_NACK (0x40000000)
drivers/net/rnp/rnp_mbx_fw.c +233 -0
236 lines not on this page · raw message
drivers/net/rnp/rnp_mbx_fw.h +36 -2
@@ -32,6 +32,8 @@ enum GENERIC_CMD {GET_PHY_ABALITY =0x0601 ,GET_MAC_ADDRES =0x0602 ,RESET_PHY =0x0603 , +GET_LINK_STATUS =0x0607 , +LINK_STATUS_EVENT =0x0608 ,GET_LANE_STATUS =0x0610 , SET_EVENT_MASK = 0x0613,/* fw update */
@@ -98,6 +100,21 @@ struct phy_abilities { }; } __rte_packed __rte_aligned(4); +struct port_stat { +u8 phy_addr;/* Phy MDIO address */ + +u8 duplex :1 ;/* FIBRE is always 1,Twisted Pair 1 or 0 */ +u8 autoneg :1 ;/* autoned state */ +u8 fec :1 ; +u8 an_rev :1 ; +u8 link_traing :1 ; +u8 is_sgmii :1 ;/* avild fw >= 0.5.0.17 */ +u16 speed;/* cur port linked speed */ + +u16 pause :4 ; +u16 rev :12 ; +} __rte_packed; +#define RNP_SPEED_CAP_UNKNOWN (0)#define RNP_SPEED_CAP_10M_FULL BIT(2)#define RNP_SPEED_CAP_100M_FULL BIT(3)
@@ -186,8 +203,14 @@ struct mbx_fw_cmd_reply {struct phy_abilities phy_abilities; }; } __rte_packed __rte_aligned(4); - -#define MBX_REQ_HDR_LEN 24 +/* == flags == */ +#define FLAGS_DD BIT(0)/* driver clear 0, FW must set 1 */ +#define FLAGS_CMP BIT(1)/* driver clear 0, FW mucst set */ +/* driver clear 0, FW must set only if it reporting an error */ +#define FLAGS_ERR BIT(2) + +#define MBX_REQ_HDR_LEN (24) +#define RNP_ALARM_INTERVAL (50000)/* unit us */ /* driver -> firmware */ struct mbx_fw_cmd_req {unsigned short flags;/* 0-1 */
@@ -240,6 +263,14 @@ struct mbx_fw_cmd_req {int flag;int nr_lane; } set_dump; + +struct { +unsigned short changed_lanes; +unsigned short lane_status; +unsigned int port_st_magic; +#define SPEED_VALID_MAGIC 0xa4a6a8a9 +struct port_stat st[4 ]; + } link_stat;/* FW->RC */ }; } __rte_packed __rte_aligned(4);
@@ -364,4 +395,7 @@ int rnp_mbx_get_lane_stat(struct rte_eth_dev *dev);int rnp_fw_update (struct rnp_eth_adapter *adapter);int rnp_hw_set_fw_10g_1g_auto_detch (struct rte_eth_dev *dev,int enable);int rnp_hw_set_fw_force_speed_1g (struct rte_eth_dev *dev,int enable); +void rnp_link_stat_mark (struct rnp_hw *hw,int nr_lane,int up); +void rnp_link_report (struct rte_eth_dev *dev,bool link_en); +int rnp_fw_msg_handler (struct rnp_eth_adapter *adapter);#endif /* __RNP_MBX_FW_H__*/
Signature · 1 line
2.27.0