enetc BD rings should be aligned to 128
instead of RTE_CACHE_LINE_SIZE.
Fixes:
469c6111a799 ("net/enetc: enable Rx and Tx")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
#define ENETC_DEV_ID_VF 0xef00
#define ENETC_DEV_ID 0xe100
#define ENETC_DEV_ID_VF 0xef00
#define ENETC_DEV_ID 0xe100
+/* BD RING ALIGNMENT */
+#define ENETC_BD_RING_ALIGN 128
+
/* ENETC register block BAR */
#define ENETC_BAR_REGS 0x0
/* ENETC register block BAR */
#define ENETC_BAR_REGS 0x0
int size;
size = nb_desc * sizeof(struct enetc_swbd);
int size;
size = nb_desc * sizeof(struct enetc_swbd);
- txr->q_swbd = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+ txr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
if (txr->q_swbd == NULL)
return -ENOMEM;
size = nb_desc * sizeof(struct enetc_tx_bd);
if (txr->q_swbd == NULL)
return -ENOMEM;
size = nb_desc * sizeof(struct enetc_tx_bd);
- txr->bd_base = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+ txr->bd_base = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
if (txr->bd_base == NULL) {
rte_free(txr->q_swbd);
txr->q_swbd = NULL;
if (txr->bd_base == NULL) {
rte_free(txr->q_swbd);
txr->q_swbd = NULL;
int size;
size = nb_rx_desc * sizeof(struct enetc_swbd);
int size;
size = nb_rx_desc * sizeof(struct enetc_swbd);
- rxr->q_swbd = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+ rxr->q_swbd = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
if (rxr->q_swbd == NULL)
return -ENOMEM;
size = nb_rx_desc * sizeof(union enetc_rx_bd);
if (rxr->q_swbd == NULL)
return -ENOMEM;
size = nb_rx_desc * sizeof(union enetc_rx_bd);
- rxr->bd_base = rte_malloc(NULL, size, RTE_CACHE_LINE_SIZE);
+ rxr->bd_base = rte_malloc(NULL, size, ENETC_BD_RING_ALIGN);
if (rxr->bd_base == NULL) {
rte_free(rxr->q_swbd);
rxr->q_swbd = NULL;
if (rxr->bd_base == NULL) {
rte_free(rxr->q_swbd);
rxr->q_swbd = NULL;