From: Ophir Munk <ophirmu@nvidia.com>
To: dev@dpdk.org
Cc: Ophir Munk <ophirmu@nvidia.com>,
Gregory Etelson <getelson@mellanox.com>,
Ophir Munk <ophirmu@mellanox.com>
Subject: [dpdk-dev] [PATCH v1 02/13] common/mlx5: replace linux __bexx types with rte
Date: Thu, 20 Aug 2020 14:50:17 +0000 [thread overview]
Message-ID: <20200820145028.4090-2-ophirmu@nvidia.com> (raw)
In-Reply-To: <20200820145028.4090-1-ophirmu@nvidia.com>
From: Ophir Munk <ophirmu@mellanox.com>
Replace Linux specific int types with their corresponding rte typedefs.
__be16 ==> rte_be16_t
__be32 ==> rte_be32_t
__be64 ==> rte_be64_t
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/common/mlx5/mlx5_prm.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index e0ebe12..69511bc 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -608,7 +608,7 @@ typedef uint8_t u8;
#define MLX5_SET(typ, p, fld, v) \
do { \
u32 _v = v; \
- *((__be32 *)(p) + __mlx5_dw_off(typ, fld)) = \
+ *((rte_be32_t *)(p) + __mlx5_dw_off(typ, fld)) = \
rte_cpu_to_be_32((rte_be_to_cpu_32(*((u32 *)(p) + \
__mlx5_dw_off(typ, fld))) & \
(~__mlx5_dw_mask(typ, fld))) | \
@@ -619,15 +619,15 @@ typedef uint8_t u8;
#define MLX5_SET64(typ, p, fld, v) \
do { \
MLX5_ASSERT(__mlx5_bit_sz(typ, fld) == 64); \
- *((__be64 *)(p) + __mlx5_64_off(typ, fld)) = \
+ *((rte_be64_t *)(p) + __mlx5_64_off(typ, fld)) = \
rte_cpu_to_be_64(v); \
} while (0)
#define MLX5_SET16(typ, p, fld, v) \
do { \
u16 _v = v; \
- *((__be16 *)(p) + __mlx5_16_off(typ, fld)) = \
- rte_cpu_to_be_16((rte_be_to_cpu_16(*((__be16 *)(p) + \
+ *((rte_be16_t *)(p) + __mlx5_16_off(typ, fld)) = \
+ rte_cpu_to_be_16((rte_be_to_cpu_16(*((rte_be16_t *)(p) + \
__mlx5_16_off(typ, fld))) & \
(~__mlx5_16_mask(typ, fld))) | \
(((_v) & __mlx5_mask16(typ, fld)) << \
@@ -639,14 +639,14 @@ typedef uint8_t u8;
__mlx5_dw_off(typ, fld))) >> __mlx5_dw_bit_off(typ, fld)) & \
__mlx5_mask(typ, fld))
#define MLX5_GET(typ, p, fld) \
- ((rte_be_to_cpu_32(*((__be32 *)(p) +\
+ ((rte_be_to_cpu_32(*((rte_be32_t *)(p) +\
__mlx5_dw_off(typ, fld))) >> __mlx5_dw_bit_off(typ, fld)) & \
__mlx5_mask(typ, fld))
#define MLX5_GET16(typ, p, fld) \
- ((rte_be_to_cpu_16(*((__be16 *)(p) + \
+ ((rte_be_to_cpu_16(*((rte_be16_t *)(p) + \
__mlx5_16_off(typ, fld))) >> __mlx5_16_bit_off(typ, fld)) & \
__mlx5_mask16(typ, fld))
-#define MLX5_GET64(typ, p, fld) rte_be_to_cpu_64(*((__be64 *)(p) + \
+#define MLX5_GET64(typ, p, fld) rte_be_to_cpu_64(*((rte_be64_t *)(p) + \
__mlx5_64_off(typ, fld)))
#define MLX5_FLD_SZ_BYTES(typ, fld) (__mlx5_bit_sz(typ, fld) / 8)
--
2.8.4
next prev parent reply other threads:[~2020-08-20 14:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 14:50 [dpdk-dev] [PATCH v1 01/13] common/mlx5: replace strsep with strtok_r Ophir Munk
2020-08-20 14:50 ` Ophir Munk [this message]
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 03/13] net/mlx5: rename mlx5 enumeration REG_NONE Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 04/13] net/mlx5: move mlx5_get_ifname prototype under Linux Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 05/13] net/mlx5: fix removal of unused inclusion files Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 06/13] net/mlx5: remove Netlink dependency in shared code Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 07/13] net/mlx5: fix unused utility macros Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 08/13] net/mlx5: call meter detach only if DR is supported Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 09/13] net/mlx5: add ICMP protocol number definition Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 10/13] net/mlx5: remove more DV dependencies Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 11/13] net/mlx5: remove ibv_* dependency in rx/tx objects Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 12/13] net/mlx5: separate vlan strip modification Ophir Munk
2020-08-20 14:50 ` [dpdk-dev] [PATCH v1 13/13] linux/mlx5: refactor VLAN Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 00/13] mlx5 PMD multi OS support - part #4 Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 01/13] common/mlx5: replace strsep with strtok_r Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 02/13] common/mlx5: replace Linux __bexx types with rte Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 03/13] net/mlx5: rename mlx5 enumeration REG_NONE Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 04/13] net/mlx5: move mlx5_get_ifname prototype under Linux Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 05/13] net/mlx5: fix removal of unused inclusion files Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 06/13] net/mlx5: remove Netlink dependency in shared code Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 07/13] net/mlx5: fix unused utility macros Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 08/13] net/mlx5: call meter detach only if DR is supported Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 09/13] net/mlx5: add ICMP protocol number definition Ophir Munk
2020-09-22 11:49 ` Thomas Monjalon
2020-09-22 12:20 ` Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 10/13] net/mlx5: remove more DV dependencies Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 11/13] net/mlx5: remove ibv_* dependency in Rx/Tx objects Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 12/13] net/mlx5: separate VLAN strip modification Ophir Munk
2020-08-25 9:31 ` [dpdk-dev] [PATCH v2 13/13] linux/mlx5: refactor VLAN Ophir Munk
[not found] ` <20200825092943.26312-1-ophirmu@mellanox.com>
2020-08-27 9:53 ` [dpdk-dev] [PATCH v2 00/13] mlx5 PMD multi OS support - part #4 Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200820145028.4090-2-ophirmu@nvidia.com \
--to=ophirmu@nvidia.com \
--cc=dev@dpdk.org \
--cc=getelson@mellanox.com \
--cc=ophirmu@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.