net/mlx5: fix Tx max inline with TSO
[dpdk.git] / drivers / net / vmxnet3 / vmxnet3_ethdev.h
index f1c8bc1..7a03262 100644 (file)
@@ -104,6 +104,7 @@ struct vmxnet3_hw {
        uint8_t version;
 
        uint16_t txdata_desc_size; /* tx data ring buffer size */
+       uint16_t rxdata_desc_size; /* rx data ring buffer size */
 
        Vmxnet3_TxQueueDesc   *tqd_start;       /* start address of all tx queue desc */
        Vmxnet3_RxQueueDesc   *rqd_start;       /* start address of all rx queue desc */
@@ -118,6 +119,8 @@ struct vmxnet3_hw {
        uint64_t              rss_confPA;
        vmxnet3_mf_table_t    *mf_table;
        uint32_t              shadow_vfta[VMXNET3_VFT_SIZE];
+       Vmxnet3_MemRegs       *memRegs;
+       uint64_t              memRegsPA;
 #define VMXNET3_VFT_TABLE_SIZE     (VMXNET3_VFT_SIZE * sizeof(uint32_t))
 };
 
@@ -157,6 +160,20 @@ vmxnet3_read_addr(volatile void *addr)
 #define VMXNET3_WRITE_BAR1_REG(hw, reg, value) \
        VMXNET3_PCI_REG_WRITE(VMXNET3_PCI_BAR1_REG_ADDR((hw), (reg)), (value))
 
+static inline uint8_t
+vmxnet3_get_ring_idx(struct vmxnet3_hw *hw, uint32 rqID)
+{
+       return (rqID >= hw->num_rx_queues &&
+               rqID < 2 * hw->num_rx_queues) ? 1 : 0;
+}
+
+static inline bool
+vmxnet3_rx_data_ring(struct vmxnet3_hw *hw, uint32 rqID)
+{
+       return (rqID >= 2 * hw->num_rx_queues &&
+               rqID < 3 * hw->num_rx_queues);
+}
+
 /*
  * RX/TX function prototypes
  */