net/enic: replace some PMD macros with standard API
[dpdk.git] / drivers / net / enic / base / rq_enet_desc.h
index 3585bf3..15c5994 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef _RQ_ENET_DESC_H_
 #define _RQ_ENET_DESC_H_
 
+#include <rte_byteorder.h>
+
 /* Ethernet receive queue descriptor: 16B */
 struct rq_enet_desc {
        __le64 address;
@@ -29,17 +31,17 @@ enum rq_enet_type_types {
 static inline void rq_enet_desc_enc(volatile struct rq_enet_desc *desc,
        u64 address, u8 type, u16 length)
 {
-       desc->address = cpu_to_le64(address);
-       desc->length_type = cpu_to_le16((length & RQ_ENET_LEN_MASK) |
+       desc->address = rte_cpu_to_le_64(address);
+       desc->length_type = rte_cpu_to_le_16((length & RQ_ENET_LEN_MASK) |
                ((type & RQ_ENET_TYPE_MASK) << RQ_ENET_LEN_BITS));
 }
 
 static inline void rq_enet_desc_dec(struct rq_enet_desc *desc,
        u64 *address, u8 *type, u16 *length)
 {
-       *address = le64_to_cpu(desc->address);
-       *length = le16_to_cpu(desc->length_type) & RQ_ENET_LEN_MASK;
-       *type = (u8)((le16_to_cpu(desc->length_type) >> RQ_ENET_LEN_BITS) &
+       *address = rte_le_to_cpu_64(desc->address);
+       *length = rte_le_to_cpu_16(desc->length_type) & RQ_ENET_LEN_MASK;
+       *type = (u8)((rte_le_to_cpu_16(desc->length_type) >> RQ_ENET_LEN_BITS) &
                RQ_ENET_TYPE_MASK);
 }