mhi: net: Reduce NAPI poll weight to 64 for debug builds

Reducing NAPI poll weight to 64 from 128 for debug builds.
The maximum frags previously it can accumlate for  SKB is 128,
which leads to stack overflow. So, will reduce max frags to skb
to 64.

Change-Id: Iec33c4e870f9bf3c601d72078992ccb2a0b458ec
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
This commit is contained in:
Vivek Pernamitta 2020-09-01 10:51:36 +05:30
parent 1e7e670083
commit 8d7ca73b11

View file

@ -21,7 +21,6 @@
#define WATCHDOG_TIMEOUT (30 * HZ)
#define IPC_LOG_PAGES (100)
#define MAX_NETBUF_SIZE (128)
#define MHI_NETDEV_NAPI_POLL_WEIGHT (128)
#ifdef CONFIG_MHI_DEBUG
@ -34,6 +33,8 @@
__func__, ##__VA_ARGS__); \
} while (0)
#define MHI_NETDEV_NAPI_POLL_WEIGHT (64)
#else
#define MSG_VERB(fmt, ...) do { \
@ -43,6 +44,8 @@
__func__, ##__VA_ARGS__); \
} while (0)
#define MHI_NETDEV_NAPI_POLL_WEIGHT (128)
#endif
#define MSG_LOG(fmt, ...) do { \
@ -723,6 +726,7 @@ static int mhi_netdev_enable_iface(struct mhi_netdev *mhi_netdev)
netif_napi_add(mhi_netdev->ndev, mhi_netdev->napi,
mhi_netdev_poll, MHI_NETDEV_NAPI_POLL_WEIGHT);
ret = register_netdev(mhi_netdev->ndev);
if (ret) {
MSG_ERR("Network device registration failed\n");