crypto/mlx5: support statistics operations
[dpdk.git] / drivers / common / octeontx2 / otx2_io_generic.h
index b1d7540..3436a6c 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef _OTX2_IO_GENERIC_H_
 #define _OTX2_IO_GENERIC_H_
 
+#include <string.h>
+
 #define otx2_load_pair(val0, val1, addr)                       \
 do {                                                           \
        val0 = rte_read64_relaxed((void *)(addr));              \
@@ -45,12 +47,22 @@ otx2_lmt_submit(uint64_t io_address)
        return 0;
 }
 
+static inline int64_t
+otx2_lmt_submit_release(uint64_t io_address)
+{
+       RTE_SET_USED(io_address);
+
+       return 0;
+}
+
 static __rte_always_inline void
 otx2_lmt_mov(void *out, const void *in, const uint32_t lmtext)
 {
-       RTE_SET_USED(out);
-       RTE_SET_USED(in);
-       RTE_SET_USED(lmtext);
+       /* Copy four words if lmtext = 0
+        *      six words if lmtext = 1
+        *      eight words if lmtext =2
+        */
+       memcpy(out, in, (4 + (2 * lmtext)) * sizeof(uint64_t));
 }
 
 static __rte_always_inline void