From 44a30d94abcbb10aacc21db29be212518a6b1bf7 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 20 May 2021 14:57:46 +0200 Subject: [PATCH] EDMA: Use NAPI_POLL_WEIGHT as NAPI weight Currently a weight of 100 is used by the EDMA, according to upstream max of 64 should be used and that is used for almost any driver. They also introduced NAPI_POLL_WEIGHT define which equals to 64. So use NAPI_POLL_WEIGHT as the weight. Signed-off-by: Robert Marko --- hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 2 +- hal/dp_ops/edma_dp/edma_v1/edma_data_plane.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) --- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c +++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c @@ -837,7 +837,7 @@ static int edma_register_netdevice(struc */ if (!edma_hw.napi_added) { netif_napi_add(netdev, &edma_hw.napi, edma_napi, - EDMA_NAPI_WORK); + NAPI_POLL_WEIGHT); /* * Register the interrupt handlers and enable interrupts */ --- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.h +++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.h @@ -26,7 +26,6 @@ #define EDMA_RX_PREHDR_SIZE (sizeof(struct edma_rx_preheader)) #define EDMA_TX_PREHDR_SIZE (sizeof(struct edma_tx_preheader)) #define EDMA_RING_SIZE 128 -#define EDMA_NAPI_WORK 100 #define EDMA_START_GMACS NSS_DP_HAL_START_IFNUM #define EDMA_MAX_GMACS NSS_DP_HAL_MAX_PORTS #define EDMA_TX_PKT_MIN_SIZE 33 /* IPQ807x EDMA needs a minimum packet size of 33 bytes */