一、HiSilicon有线网卡芯片历程与规格

主要系列发展历程

Hi16xx系列以太网控制器 (2012-2018)

  • Hi1610: 早期ARM服务器SoC集成千兆以太网

  • Hi1612: 改进版,支持双端口千兆

  • Hi1616: 高性能服务器SoC,集成10GbE

Hi18xx系列 (2016-2020)

  • Hi1822: 2x25GbE+2x10GbE智能网卡

  • Hi1822SP: 存储优化版本

  • Hi1882: 2x100GbE智能网卡

Hi19xx系列 (2019-至今)

  • Hi1910: 低成本智能网卡

  • Hi1921: 200GbE智能网卡

  • Hi1981: 400GbE智能网卡

技术参数对比

芯片型号 接口速率 总线接口 支持特性 Linux内核支持版本
Hi1610 10/100/1000M SoC集成 基本网络功能 3.10+
Hi1616 10GbE SoC集成 RSS, VF 4.4+
Hi1822 2x25GbE+2x10GbE PCIe 3.0 RoCE, iWARP, VF 4.12+
Hi1921 200GbE PCIe 4.0 RoCEv2, VF, DPDK 5.4+
Hi1981 400GbE PCIe 5.0 RDMA, TLS, VF 5.10+

二、Linux内核网络架构与HiSilicon集成

hns3驱动架构

// drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
struct hns3_nic_priv {
    struct hnae3_handle *ae_handle;
    struct net_device *netdev;
    struct hns3_enet_ring *ring;
    
    // 多队列支持
    struct hns3_enet_ring *tx_ring;
    struct hns3_enet_ring *rx_ring;
    u16 num_tx_queues;
    u16 num_rx_queues;
    
    // 统计信息
    struct hns3_enet_stats stats;
};
​
struct hnae3_handle {
    struct hnae3_ae_dev *ae_dev;
    struct pci_dev *pdev;
    struct hnae3_ops *ops;
    
    // 硬件抽象
    void *priv;
    u32 flags;
#define HNAE3_SUPPORT_VF        BIT(0)
#define HNAE3_SUPPORT_RDMA      BIT(1)
#define HNAE3_SUPPORT_FCOE      BIT(2)
};
​
// 网络设备操作
static const struct net_device_ops hns3_nic_netdev_ops = {
    .ndo_open = hns3_nic_net_open,
    .ndo_stop = hns3_nic_net_stop,
    .ndo_start_xmit = hns3_nic_net_xmit,
    .ndo_set_mac_address = hns3_nic_net_set_mac_addr,
    .ndo_validate_addr = eth_validate_addr,
    .ndo_change_mtu = hns3_nic_net_change_mtu,
    .ndo_do_ioctl = hns3_nic_net_ioctl,
    .ndo_tx_timeout = hns3_nic_net_timeout,
    .ndo_get_stats64 = hns3_nic_get_stats64,
    .ndo_features_check = hns3_features_check,
    .ndo_set_features = hns3_set_features,
    .ndo_bpf = hns3_xdp,
};

硬件抽象层架构

// drivers/net/ethernet/hisilicon/hns3/hns3_ae_dev.c
struct hnae3_ae_ops {
    int (*init_ae_dev)(struct hnae3_ae_dev *ae_dev);
    void (*uninit_ae_dev)(struct hnae3_ae_dev *ae_dev);
    
    // 客户端操作
    int (*init_client_instance)(struct hnae3_client *client,
                               struct hnae3_ae_dev *ae_dev);
    void (*uninit_client_instance)(struct hnae3_client *client,
                                  struct hnae3_ae_dev *ae_dev);
    
    // 队列操作
    int (*start)(struct hnae3_handle *handle);
    void (*stop)(struct hnae3_handle *handle);
    int (*map_ring_to_vector)(struct hnae3_handle *handle,
                             int vector_num,
                             struct hnae3_ring_chain_node *vr_chain);
    int (*unmap_ring_from_vector)(struct hnae3_handle *handle,
                                 int vector_num,
                                 struct hnae3_ring_chain_node *vr_chain);
};
​
// 客户端注册
static struct hnae3_client hns3_client = {
    .name = "hns3",
    .type = HNAE3_CLIENT_KNIC,
    .ops = &hns3_ops,
    .init_instance = hns3_client_init,
    .uninit_instance = hns3_client_uninit,
};

三、性能优化技术架构

多队列与RSS支持

// drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
static int hns3_set_rss_tc_mode(struct hns3_nic_priv *priv)
{
    struct hnae3_handle *h = priv->ae_handle;
    struct hns3_rss_tc_mode_cmd *req;
    struct hns3_desc desc;
    int ret;
    
    hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_TC_MODE, false);
    
    req = (struct hns3_rss_tc_mode_cmd *)desc.data;
    req->rss_tc_mode = h->kinfo.rss_tc_mode;
    
    ret = hns3_cmd_send(h, &desc, 1);
    if (ret)
        netdev_err(priv->netdev, "set rss tc mode fail, ret=%d\n", ret);
    
    return ret;
}
​
// RSS配置
static int hns3_set_rss_indir_table(struct hns3_nic_priv *priv,
                                   const u32 *indir)
{
    struct hnae3_handle *h = priv->ae_handle;
    struct hns3_rss_indirection_table_cmd *req;
    struct hns3_desc desc;
    int i, ret;
    
    hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_INDIR_TABLE, false);
    
    req = (struct hns3_rss_indirection_table_cmd *)desc.data;
    for (i = 0; i < HNS3_RSS_IND_TBL_SIZE; i++)
        req->rss_result[i] = indir[i];
    
    ret = hns3_cmd_send(h, &desc, 1);
    if (ret)
        netdev_err(priv->netdev, "set rss indir table fail, ret=%d\n", ret);
    
    return ret;
}

NAPI实现

// NAPI轮询函数
static int hns3_nic_common_poll(struct napi_struct *napi, int budget)
{
    struct hns3_enet_tqp_vector *tqp_vector =
        container_of(napi, struct hns3_enet_tqp_vector, napi);
    struct hns3_enet_ring *ring;
    bool clean_complete = true;
    int rx_budget = budget;
    int tx_clean;
    int i;
    
    // 处理接收队列
    for (i = 0; i < tqp_vector->num_tqps; i++) {
        ring = tqp_vector->rings[i];
        if (ring->queue_index & HNS3_RING_TYPE_RX) {
            int rx_done = hns3_clean_rx_ring(ring, rx_budget, &clean_complete);
            rx_budget -= rx_done;
            if (rx_budget <= 0)
                break;
        }
    }
    
    // 处理发送完成
    for (i = 0; i < tqp_vector->num_tqps; i++) {
        ring = tqp_vector->rings[i];
        if (ring->queue_index & HNS3_RING_TYPE_TX) {
            tx_clean = hns3_clean_tx_ring(ring);
            if (tx_clean < ring->desc_num)
                clean_complete = false;
        }
    }
    
    if (clean_complete && napi_complete_done(napi, budget - rx_budget))
        hns3_mask_vector_irq(tqp_vector, 0);
    
    return budget - rx_budget;
}

四、USB网卡芯片技术演进

HiSilicon USB网络解决方案

Hi11xx系列USB网卡

  • Hi1102: WiFi+BT组合芯片,USB接口

  • Hi1103: 改进版本,支持802.11ac

  • Hi1105: 高性能版本,支持160MHz信道

Linux USB驱动架构

// drivers/net/wireless/hisi/hi11xx/hi11xx_core.c
struct hi11xx_priv {
    struct usb_device *udev;
    struct ieee80211_hw *hw;
    struct device *dev;
    
    // USB端点
    struct usb_endpoint_descriptor *bulk_in_ep;
    struct usb_endpoint_descriptor *bulk_out_ep;
    struct usb_endpoint_descriptor *intr_in_ep;
    
    // 传输管理
    struct hi11xx_usb_tx tx;
    struct hi11xx_usb_rx rx;
    
    // 固件信息
    const struct firmware *fw;
    u32 fw_version;
};
​
// USB设备表
static const struct usb_device_id hi11xx_usb_ids[] = {
    { USB_DEVICE(0x12d1, 0x1102) }, /* Hi1102 */
    { USB_DEVICE(0x12d1, 0x1103) }, /* Hi1103 */
    { USB_DEVICE(0x12d1, 0x1105) }, /* Hi1105 */
    { /* Sentinel */ }
};
​
// USB批量传输处理
static void hi11xx_usb_rx_complete(struct urb *urb)
{
    struct hi11xx_usb_rx *rx = urb->context;
    struct hi11xx_priv *priv = rx->priv;
    struct sk_buff *skb;
    int ret;
    
    if (urb->status == 0) {
        skb = rx->skb;
        skb_put(skb, urb->actual_length);
        
        // 处理接收数据
        hi11xx_mac_rx(priv->hw, skb);
        
        // 重新分配SKB
        rx->skb = __dev_alloc_skb(HI11XX_MAX_RX_SIZE, GFP_ATOMIC);
        if (!rx->skb) {
            dev_err(priv->dev, "failed to allocate rx skb\n");
            return;
        }
    }
    
    // 重新提交URB
    if (rx->skb) {
        usb_fill_bulk_urb(urb, priv->udev,
                         usb_rcvbulkpipe(priv->udev, 
                                       priv->bulk_in_ep->bEndpointAddress),
                         rx->skb->data, HI11XX_MAX_RX_SIZE,
                         hi11xx_usb_rx_complete, rx);
        
        ret = usb_submit_urb(urb, GFP_ATOMIC);
        if (ret)
            dev_err(priv->dev, "failed to resubmit rx urb: %d\n", ret);
    }
}

五、无线网卡芯片与内核支持

HiSilicon无线解决方案系列

Hi11xx系列WiFi芯片

  • Hi1102: 2x2 802.11ac, 867 Mbps

  • Hi1103: 2x2 802.11ac, 支持MU-MIMO

  • Hi1105: 2x2 802.11ax, 1.2 Gbps

Hi11xx系列技术特点

  • 集成蓝牙功能

  • 低功耗设计

  • 主要用于移动设备和IoT

  • 支持Huawei HiLink技术

Linux无线驱动架构

hi11xx驱动架构

// drivers/net/wireless/hisi/hi11xx/hi11xx_mac80211.c
static const struct ieee80211_ops hi11xx_ops = {
    .tx = hi11xx_ops_tx,
    .start = hi11xx_ops_start,
    .stop = hi11xx_ops_stop,
    .add_interface = hi11xx_ops_add_interface,
    .remove_interface = hi11xx_ops_remove_interface,
    .config = hi11xx_ops_config,
    .bss_info_changed = hi11xx_ops_bss_info_changed,
    .configure_filter = hi11xx_ops_configure_filter,
    .set_key = hi11xx_ops_set_key,
    .hw_scan = hi11xx_ops_hw_scan,
    .cancel_hw_scan = hi11xx_ops_cancel_hw_scan,
    .sta_state = hi11xx_ops_sta_state,
    .ampdu_action = hi11xx_ops_ampdu_action,
    .flush = hi11xx_ops_flush,
    .set_rts_threshold = hi11xx_ops_set_rts_threshold,
    .set_frag_threshold = hi11xx_ops_set_frag_threshold,
};
​
// 固件加载机制
static int hi11xx_load_firmware(struct hi11xx_priv *priv)
{
    const struct firmware *fw;
    char fw_name[64];
    int ret;
    
    snprintf(fw_name, sizeof(fw_name), "hi11xx/hi110x_fw.bin");
    
    ret = request_firmware(&fw, fw_name, priv->dev);
    if (ret) {
        dev_err(priv->dev, "failed to request firmware %s: %d\n",
                fw_name, ret);
        return ret;
    }
    
    // 上传固件到设备
    ret = hi11xx_upload_firmware(priv, fw->data, fw->size);
    if (ret) {
        dev_err(priv->dev, "failed to upload firmware: %d\n", ret);
        release_firmware(fw);
        return ret;
    }
    
    release_firmware(fw);
    return 0;
}

六、授时技术与PTP支持

HiSilicon网卡PTP实现

hns3驱动PTP支持

// drivers/net/ethernet/hisilicon/hns3/hns3_ptp.c
static const struct ptp_clock_info hns3_ptp_clock_ops = {
    .owner = THIS_MODULE,
    .name = "hns3 ptp",
    .max_adj = 500000000,
    .n_alarm = 0,
    .n_ext_ts = 0,
    .n_per_out = 0,
    .pps = 0,
    .adjfine = hns3_ptp_adjfine,
    .adjtime = hns3_ptp_adjtime,
    .gettime64 = hns3_ptp_gettime,
    .settime64 = hns3_ptp_settime,
    .enable = hns3_ptp_enable,
};
​
static int hns3_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
{
    struct hns3_ptp *ptp_priv = container_of(ptp, struct hns3_ptp, caps);
    struct hnae3_handle *h = ptp_priv->handle;
    u32 adj_val, sign;
    int ret;
    
    if (scaled_ppm < 0) {
        sign = 1;
        scaled_ppm = -scaled_ppm;
    } else {
        sign = 0;
    }
    
    // 计算调整值
    adj_val = scaled_ppm;
    adj_val <<= 13;
    adj_val = div_u64(adj_val, 15625);
    
    if (sign)
        adj_val = ~adj_val + 1;
    
    // 配置硬件
    ret = hns3_ptp_set_adj(h, adj_val);
    if (ret)
        dev_err(&h->pdev->dev, "set ptp adj fail, ret=%d\n", ret);
    
    return ret;
}
​
// 硬件时间戳处理
static int hns3_ptp_get_rx_hwts(struct hnae3_handle *h,
                               struct sk_buff *skb, u64 *ns)
{
    struct hns3_enet_ring *ring = skb->cb;
    struct hns3_desc *desc;
    u32 sec_h, sec_l, nsec;
    
    if (!ring->ptp_rx)
        return -EOPNOTSUPP;
    
    desc = &ring->desc[ring->next_to_clean];
    
    // 从描述符读取时间戳
    sec_l = le32_to_cpu(desc->rx.time_stamp_sec_l);
    sec_h = le32_to_cpu(desc->rx.time_stamp_sec_h);
    nsec = le32_to_cpu(desc->rx.time_stamp_nsec);
    
    *ns = (u64)sec_h << 32 | sec_l;
    *ns = *ns * NSEC_PER_SEC + nsec;
    
    return 0;
}

七、网络驱动架构软件设计模式演进

第一代:平台驱动设计 (Linux 3.x)

// 早期HiSilicon平台驱动
static struct platform_driver hip04_eth_driver = {
    .probe = hip04_eth_probe,
    .remove = hip04_eth_remove,
    .driver = {
        .name = "hip04-eth",
        .of_match_table = hip04_eth_match,
    },
};
​
static int hip04_eth_probe(struct platform_device *pdev)
{
    struct hip04_priv *priv;
    struct net_device *ndev;
    struct resource *res;
    int ret;
    
    ndev = alloc_etherdev(sizeof(*priv));
    if (!ndev)
        return -ENOMEM;
    
    priv = netdev_priv(ndev);
    priv->ndev = ndev;
    
    // 获取资源
    res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
    priv->base = devm_ioremap_resource(&pdev->dev, res);
    if (IS_ERR(priv->base)) {
        ret = PTR_ERR(priv->base);
        goto err_free_netdev;
    }
    
    // 简单初始化
    hip04_eth_hw_init(priv);
    
    return 0;
    
err_free_netdev:
    free_netdev(ndev);
    return ret;
}

第二代:硬件抽象层设计 (Linux 4.x)

// hnae3硬件抽象层
struct hnae3_ae_algo {
    struct list_head node;
    const struct pci_device_id *pdev_id_table;
    
    // 算法操作
    int (*init_ae_dev)(struct hnae3_ae_dev *ae_dev);
    void (*uninit_ae_dev)(struct hnae3_ae_dev *ae_dev);
    int (*init_client_instance)(struct hnae3_client *client,
                               struct hnae3_ae_dev *ae_dev);
    void (*uninit_client_instance)(struct hnae3_client *client,
                                  struct hnae3_ae_dev *ae_dev);
};
​
// 客户端管理
static LIST_HEAD(hnae3_ae_algo_list);
static DEFINE_MUTEX(hnae3_common_lock);
​
int hnae3_register_ae_algo(struct hnae3_ae_algo *ae_algo)
{
    mutex_lock(&hnae3_common_lock);
    list_add_tail(&ae_algo->node, &hnae3_ae_algo_list);
    mutex_unlock(&hnae3_common_lock);
    
    return 0;
}

第三代:模块化驱动框架 (Linux 5.x+)

// hns3模块化驱动
static struct pci_driver hns3_driver = {
    .name = HNS3_DRIVER_NAME,
    .id_table = hns3_pci_tbl,
    .probe = hns3_probe,
    .remove = hns3_remove,
    .shutdown = hns3_shutdown,
#ifdef CONFIG_PM
    .suspend = hns3_suspend,
    .resume = hns3_resume,
#endif
};
​
static int hns3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
    struct hnae3_ae_dev *ae_dev;
    int ret;
    
    // 分配AE设备
    ae_dev = devm_kzalloc(&pdev->dev, sizeof(*ae_dev), GFP_KERNEL);
    if (!ae_dev)
        return -ENOMEM;
    
    ae_dev->pdev = pdev;
    ae_dev->ops = &hns3_ops;
    
    // PCIe初始化
    ret = hns3_pci_init(ae_dev);
    if (ret)
        goto err_pci_init;
    
    // 注册AE设备
    ret = hnae3_register_ae_dev(ae_dev);
    if (ret)
        goto err_ae_register;
    
    return 0;
    
err_ae_register:
    hns3_pci_uninit(ae_dev);
err_pci_init:
    devm_kfree(&pdev->dev, ae_dev);
    return ret;
}

八、数据上传实时技术演进

实时传输技术发展

1. 传统DMA传输

// hns3 DMA描述符处理
static int hns3_fill_desc(struct hns3_enet_ring *ring,
                         struct hns3_desc *desc, int size,
                         dma_addr_t dma, enum hns3_desc_type type)
{
    desc->tx.addr = cpu_to_le64(dma);
    desc->tx.tp_fe_sc_vld_ra_ri = cpu_to_le16(
        (size & HNS3_TXD_SIZE_M) << HNS3_TXD_SIZE_S);
    
    // 配置描述符类型
    switch (type) {
    case DESC_TYPE_SKB:
        desc->tx.tp_fe_sc_vld_ra_ri |= cpu_to_le16(HNS3_TXD_VLD_B);
        break;
    case DESC_TYPE_PAGE:
        desc->tx.tp_fe_sc_vld_ra_ri |= cpu_to_le16(HNS3_TXD_FE_B |
                                                  HNS3_TXD_VLD_B);
        break;
    default:
        return -EINVAL;
    }
    
    return 0;
}

2. XDP加速支持

// hns3 XDP实现
static int hns3_run_xdp(struct hns3_nic_priv *priv,
                       struct hns3_enet_ring *ring,
                       struct xdp_buff *xdp)
{
    struct bpf_prog *prog;
    u32 act;
    
    rcu_read_lock();
    prog = rcu_dereference(ring->xdp_prog);
    if (!prog) {
        rcu_read_unlock();
        return XDP_PASS;
    }
    
    act = bpf_prog_run_xdp(prog, xdp);
    rcu_read_unlock();
    
    switch (act) {
    case XDP_PASS:
        return XDP_PASS;
    case XDP_TX:
        return hns3_xdp_xmit_back(priv, ring, xdp);
    case XDP_REDIRECT:
        return hns3_xdp_redirect(priv, ring, xdp);
    default:
        bpf_warn_invalid_xdp_action(act);
        fallthrough;
    case XDP_ABORTED:
        trace_xdp_exception(priv->netdev, prog, act);
        fallthrough;
    case XDP_DROP:
        return XDP_DROP;
    }
}
​
// XDP TX处理
static int hns3_xdp_xmit_frame(struct net_device *dev,
                              struct xdp_frame *frame)
{
    struct hns3_nic_priv *priv = netdev_priv(dev);
    struct hns3_enet_ring *ring;
    struct hns3_desc *desc;
    dma_addr_t dma_addr;
    int ret;
    
    ring = &priv->ring_data[frame->queue_index];
    
    // DMA映射
    dma_addr = dma_map_single(ring->dev, frame->data, frame->len,
                             DMA_TO_DEVICE);
    if (dma_mapping_error(ring->dev, dma_addr))
        return -ENOMEM;
    
    // 填充描述符
    desc = &ring->desc[ring->next_to_use];
    ret = hns3_fill_desc(ring, desc, frame->len, dma_addr, DESC_TYPE_SKB);
    if (ret) {
        dma_unmap_single(ring->dev, dma_addr, frame->len, DMA_TO_DEVICE);
        return ret;
    }
    
    // 触发传输
    hns3_db(ring, ring->next_to_use);
    
    return 0;
}

3. RDMA RoCE支持

// hns3 RoCE实现
#ifdef CONFIG_HNS3_ROCE
static int hns3_roce_init(struct hnae3_handle *h)
{
    struct hns3_roce *roce;
    int ret;
    
    roce = kzalloc(sizeof(*roce), GFP_KERNEL);
    if (!roce)
        return -ENOMEM;
    
    h->roce = roce;
    roce->handle = h;
    
    // 初始化RoCE资源
    ret = hns3_roce_alloc_resources(roce);
    if (ret)
        goto err_alloc_res;
    
    // 注册RDMA设备
    ret = hns3_roce_register_device(roce);
    if (ret)
        goto err_register;
    
    return 0;
    
err_register:
    hns3_roce_free_resources(roce);
err_alloc_res:
    kfree(roce);
    h->roce = NULL;
    return ret;
}
​
// RoCE队列对创建
static int hns3_roce_create_qp(struct hns3_roce *roce,
                              struct ib_qp_init_attr *init_attr,
                              struct ib_udata *udata)
{
    struct hns3_roce_qp *qp;
    int ret;
    
    qp = kzalloc(sizeof(*qp), GFP_KERNEL);
    if (!qp)
        return -ENOMEM;
    
    // 配置QP
    qp->qp_type = init_attr->qp_type;
    qp->state = IB_QPS_RESET;
    
    // 分配队列缓冲区
    ret = hns3_roce_alloc_qp_buf(roce, qp, init_attr);
    if (ret)
        goto err_alloc_buf;
    
    // 配置硬件
    ret = hns3_roce_cfg_qp(roce, qp);
    if (ret)
        goto err_cfg_qp;
    
    return 0;
    
err_cfg_qp:
    hns3_roce_free_qp_buf(roce, qp);
err_alloc_buf:
    kfree(qp);
    return ret;
}
#endif

性能对比分析

技术阶段 架构模式 延迟水平 吞吐量 CPU占用 适用场景
传统DMA 单队列 30-60μs 中等 基础网络
多队列RSS 并行处理 15-30μs 服务器
XDP加速 内核旁路 5-15μs 很高 安全过滤
RDMA RoCE 零拷贝 1-5μs 极高 极低 HPC, 存储

九、内核源码树形结构分析

HiSilicon网络驱动源码组织

drivers/net/ethernet/hisilicon/
├── hns/                       # 早期驱动
│   ├── hns_enet.c            # 以太网驱动
│   ├── hns_dsaf.c            # DSAF驱动
│   └── hns_ae_adapt.c        # AE适配层
├── hns3/                      # HNS3驱动
│   ├── hns3_enet.c           # 以太网核心
│   ├── hns3_ethtool.c        # ethtool接口
│   ├── hns3_debugfs.c        # 调试支持
│   ├── hns3_ptp.c            # PTP时间同步
│   ├── hns3_common.c         # 通用功能
│   ├── hns3_ae_dev.c         # AE设备管理
│   └── hns3_ops.c            # 操作接口
└── hip04_eth/                # HIP04以太网驱动
    └── hip04_eth.c
​
drivers/net/wireless/hisi/
├── hi11xx/                   # Hi11xx无线驱动
│   ├── hi11xx_core.c         # 核心功能
│   ├── hi11xx_mac80211.c     # MAC80211接口
│   ├── hi11xx_usb.c          # USB支持
│   └── hi11xx_fw.c           # 固件处理
└── Makefile

关键函数调用树

// hns3驱动初始化
hns3_init_module()
    → pci_register_driver(&hns3_driver)
        → hns3_probe()
            → hnae3_register_ae_dev()
            → hns3_client_init()
​
// 数据发送路径
hns3_nic_net_xmit()
    → hns3_nic_maybe_stop_tx()
    → hns3_fill_skb_to_desc()
    → hns3_map_tx_buffs()
    → hns3_db()
​
// 数据接收路径
hns3_nic_common_poll()
    → hns3_clean_rx_ring()
        → hns3_rx_checksum()
        → napi_gro_receive()
​
// RoCE数据路径
hns3_roce_post_send()
    → hns3_roce_build_sq_wqe()
    → hns3_roce_db()

十、未来发展趋势

技术发展方向

  1. 智能网卡技术

    • 可编程数据平面

    • 硬件加速功能

    • 存储网络融合

  2. 高性能网络

    • 800GbE/1.6TbE解决方案

    • PCIe 5.0/6.0接口支持

    • 更低延迟设计

  3. 云原生网络

    • 容器网络加速

    • 服务网格卸载

    • eBPF硬件加速

  4. 安全增强

    • 内联加密

    • 安全启动

    • 可信执行环境

  5. AI网络融合

    • 分布式训练加速

    • 模型参数服务器优化

    • 智能流量调度

这个全面的分析展示了HiSilicon在网络芯片领域从早期的SoC集成方案到现代智能网卡的技术演进,体现了其在数据中心和云计算网络市场的技术实力和创新能力。HiSilicon驱动在Linux内核中的架构演进也反映了现代网络设备驱动的发展趋势。

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐