]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
net: hns3: Add reset handle for flow director
[linux.git] / drivers / net / ethernet / hisilicon / hns3 / hns3_enet.h
index a02a96aee2a2bfdcb9ebb49ea56b40546df83ae8..ac881e8fc05d7fad0173e3f7e97f47b5b0aa1445 100644 (file)
@@ -284,11 +284,11 @@ struct hns3_desc_cb {
 
        /* priv data for the desc, e.g. skb when use with ip stack*/
        void *priv;
-       u16 page_offset;
-       u16 reuse_flag;
-
+       u32 page_offset;
        u32 length;     /* length of the buffer */
 
+       u16 reuse_flag;
+
        /* desc type, used by the ring user to mark the type of the priv data */
        u16 type;
 };
@@ -491,7 +491,9 @@ struct hns3_enet_tqp_vector {
        struct hns3_enet_ring_group rx_group;
        struct hns3_enet_ring_group tx_group;
 
+       cpumask_t affinity_mask;
        u16 num_tqps;   /* total number of tqps in TQP vector */
+       struct irq_affinity_notify affinity_notify;
 
        char name[HNAE3_INT_NAME_LEN];
 
@@ -541,6 +543,8 @@ struct hns3_nic_priv {
        /* Vxlan/Geneve information */
        struct hns3_udp_tunnel udp_tnl[HNS3_UDP_TNL_MAX];
        unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
+       struct hns3_enet_coalesce tx_coal;
+       struct hns3_enet_coalesce rx_coal;
 };
 
 union l3_hdr_info {
@@ -581,6 +585,11 @@ static inline void hns3_write_reg(void __iomem *base, u32 reg, u32 value)
        writel(value, reg_addr + reg);
 }
 
+static inline bool hns3_dev_ongoing_func_reset(struct hnae3_ae_dev *ae_dev)
+{
+       return (ae_dev && (ae_dev->reset_type == HNAE3_FUNC_RESET));
+}
+
 #define hns3_write_dev(a, reg, value) \
        hns3_write_reg((a)->io_base, (reg), (value))
 
@@ -615,7 +624,7 @@ void hns3_ethtool_set_ops(struct net_device *netdev);
 int hns3_set_channels(struct net_device *netdev,
                      struct ethtool_channels *ch);
 
-bool hns3_clean_tx_ring(struct hns3_enet_ring *ring, int budget);
+void hns3_clean_tx_ring(struct hns3_enet_ring *ring);
 int hns3_init_all_ring(struct hns3_nic_priv *priv);
 int hns3_uninit_all_ring(struct hns3_nic_priv *priv);
 int hns3_nic_reset_all_ring(struct hnae3_handle *h);