]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Use PAGE_SIZE to init buffer when multi buffer XDP is not in use
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Mon, 22 Aug 2022 15:06:51 +0000 (11:06 -0400)
committerJakub Kicinski <kuba@kernel.org>
Tue, 23 Aug 2022 22:32:07 +0000 (15:32 -0700)
commitce83c0e365e2c3b959996efe819aab6a9e50f4b7
tree14871ce1ece7fb3c49b2a23f0c77907828b71a6e
parent4e86371521f5e90eef920000f4e26f936536eda7
bnxt_en: Use PAGE_SIZE to init buffer when multi buffer XDP is not in use

Using BNXT_PAGE_MODE_BUF_SIZE + offset as buffer length value is not
sufficient when running single buffer XDP programs doing redirect
operations. The stack will complain on missing skb tail room. Fix it
by using PAGE_SIZE when calling xdp_init_buff() for single buffer
programs.

Fixes: fa785a30ac94 ("bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff")
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c