cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

hinic_tx.h (1261B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/*
      3 * Huawei HiNIC PCI Express Linux driver
      4 * Copyright(c) 2017 Huawei Technologies Co., Ltd
      5 */
      6
      7#ifndef HINIC_TX_H
      8#define HINIC_TX_H
      9
     10#include <linux/types.h>
     11#include <linux/netdevice.h>
     12#include <linux/skbuff.h>
     13#include <linux/u64_stats_sync.h>
     14
     15#include "hinic_common.h"
     16#include "hinic_hw_qp.h"
     17
     18struct hinic_txq_stats {
     19	u64     pkts;
     20	u64     bytes;
     21	u64     tx_busy;
     22	u64     tx_wake;
     23	u64     tx_dropped;
     24	u64	big_frags_pkts;
     25
     26	struct u64_stats_sync   syncp;
     27};
     28
     29struct hinic_txq {
     30	struct net_device       *netdev;
     31	struct hinic_sq         *sq;
     32
     33	struct hinic_txq_stats  txq_stats;
     34
     35	int                     max_sges;
     36	struct hinic_sge        *sges;
     37	struct hinic_sge        *free_sges;
     38
     39	char                    *irq_name;
     40	struct napi_struct      napi;
     41};
     42
     43void hinic_txq_clean_stats(struct hinic_txq *txq);
     44
     45void hinic_txq_get_stats(struct hinic_txq *txq, struct hinic_txq_stats *stats);
     46
     47netdev_tx_t hinic_lb_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
     48
     49netdev_tx_t hinic_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
     50
     51int hinic_init_txq(struct hinic_txq *txq, struct hinic_sq *sq,
     52		   struct net_device *netdev);
     53
     54void hinic_clean_txq(struct hinic_txq *txq);
     55
     56#endif