net/ionic: observe endiannness in ioread/iowrite

The IONIC FW is little-endian.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
This commit is contained in:
Andrew Boyer 2021-01-18 12:35:04 -08:00 committed by Ferruh Yigit
parent d318c6464c
commit f3926b1f87
2 changed files with 3 additions and 3 deletions

View File

@ -277,7 +277,7 @@ ionic_q_flush(struct ionic_queue *q)
{
uint64_t val = IONIC_DBELL_QID(q->hw_index) | q->head_idx;
rte_write64(val, q->db);
rte_write64(rte_cpu_to_le_64(val), q->db);
}
int ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx *ctx);

View File

@ -40,8 +40,8 @@ typedef uint32_t __le32;
typedef uint64_t __le64;
#define ioread8(reg) rte_read8(reg)
#define ioread32(reg) rte_read32(reg)
#define ioread32(reg) rte_read32(rte_le_to_cpu_32(reg))
#define iowrite8(value, reg) rte_write8(value, reg)
#define iowrite32(value, reg) rte_write32(value, reg)
#define iowrite32(value, reg) rte_write32(rte_cpu_to_le_32(value), reg)
#endif