]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/sw/rxe/rxe_verbs.h
IB/rxe: Offload CRC calculation when possible
[karo-tx-linux.git] / drivers / infiniband / sw / rxe / rxe_verbs.h
index e100c500ae851bca8b291ea81dd4e8c74542c5c3..5a180fbe40d91b850d5bc83951e9f7901e14b468 100644 (file)
@@ -38,6 +38,7 @@
 #include <rdma/rdma_user_rxe.h>
 #include "rxe_pool.h"
 #include "rxe_task.h"
+#include "rxe_hw_counters.h"
 
 static inline int pkey_match(u16 key1, u16 key2)
 {
@@ -401,10 +402,18 @@ struct rxe_dev {
        spinlock_t              mmap_offset_lock; /* guard mmap_offset */
        int                     mmap_offset;
 
+       u64                     stats_counters[RXE_NUM_OF_COUNTERS];
+
        struct rxe_port         port;
        struct list_head        list;
+       struct crypto_shash     *tfm;
 };
 
+static inline void rxe_counter_inc(struct rxe_dev *rxe, enum rxe_counters cnt)
+{
+       rxe->stats_counters[cnt]++;
+}
+
 static inline struct rxe_dev *to_rdev(struct ib_device *dev)
 {
        return dev ? container_of(dev, struct rxe_dev, ib_dev) : NULL;