ixgbe: convert rings from q_vector bit indexed array to linked list
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / intel / ixgbe / ixgbe.h
index e04a8e49e6dcc37c3143276b2b955dad90e77c24..dc3b12e1533153424ae1191b26e2995cd368cbb2 100644 (file)
 #define IXGBE_RX_BUFFER_WRITE  16      /* Must be power of 2 */
 
 #define IXGBE_TX_FLAGS_CSUM            (u32)(1)
-#define IXGBE_TX_FLAGS_VLAN            (u32)(1 << 1)
-#define IXGBE_TX_FLAGS_TSO             (u32)(1 << 2)
-#define IXGBE_TX_FLAGS_IPV4            (u32)(1 << 3)
-#define IXGBE_TX_FLAGS_FCOE            (u32)(1 << 4)
-#define IXGBE_TX_FLAGS_FSO             (u32)(1 << 5)
+#define IXGBE_TX_FLAGS_HW_VLAN         (u32)(1 << 1)
+#define IXGBE_TX_FLAGS_SW_VLAN         (u32)(1 << 2)
+#define IXGBE_TX_FLAGS_TSO             (u32)(1 << 3)
+#define IXGBE_TX_FLAGS_IPV4            (u32)(1 << 4)
+#define IXGBE_TX_FLAGS_FCOE            (u32)(1 << 5)
+#define IXGBE_TX_FLAGS_FSO             (u32)(1 << 6)
+#define IXGBE_TX_FLAGS_MAPPED_AS_PAGE  (u32)(1 << 7)
 #define IXGBE_TX_FLAGS_VLAN_MASK       0xffff0000
-#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK   0x0000e000
+#define IXGBE_TX_FLAGS_VLAN_PRIO_MASK  0xe0000000
+#define IXGBE_TX_FLAGS_VLAN_PRIO_SHIFT  29
 #define IXGBE_TX_FLAGS_VLAN_SHIFT      16
 
 #define IXGBE_MAX_RSC_INT_RATE          162760
@@ -141,14 +144,14 @@ struct vf_macvlans {
 /* wrapper around a pointer to a socket buffer,
  * so a DMA handle can be stored along with the buffer */
 struct ixgbe_tx_buffer {
-       struct sk_buff *skb;
-       dma_addr_t dma;
+       union ixgbe_adv_tx_desc *next_to_watch;
        unsigned long time_stamp;
-       u16 length;
-       u16 next_to_watch;
-       unsigned int bytecount;
+       dma_addr_t dma;
+       u32 length;
+       u32 tx_flags;
+       struct sk_buff *skb;
+       u32 bytecount;
        u16 gso_segs;
-       u8 mapped_as_page;
 };
 
 struct ixgbe_rx_buffer {
@@ -206,6 +209,7 @@ enum ixbge_ring_state_t {
 #define clear_ring_rsc_enabled(ring) \
        clear_bit(__IXGBE_RX_RSC_ENABLED, &(ring)->state)
 struct ixgbe_ring {
+       struct ixgbe_ring *next;        /* pointer to next ring in q_vector */
        void *desc;                     /* descriptor ring memory */
        struct device *dev;             /* device for DMA mapping */
        struct net_device *netdev;      /* netdev ring belongs to */
@@ -274,11 +278,7 @@ struct ixgbe_ring_feature {
 } ____cacheline_internodealigned_in_smp;
 
 struct ixgbe_ring_container {
-#if MAX_RX_QUEUES > MAX_TX_QUEUES
-       DECLARE_BITMAP(idx, MAX_RX_QUEUES);
-#else
-       DECLARE_BITMAP(idx, MAX_TX_QUEUES);
-#endif
+       struct ixgbe_ring *ring;        /* pointer to linked list of rings */
        unsigned int total_bytes;       /* total bytes processed this int */
        unsigned int total_packets;     /* total packets processed this int */
        u16 work_limit;                 /* total work allowed per interrupt */