]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bnxt_en: Fix max_mtu setting for multi-buf XDP
authorMichael Chan <michael.chan@broadcom.com>
Mon, 31 Jul 2023 14:20:43 +0000 (07:20 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Aug 2023 22:04:58 +0000 (15:04 -0700)
commit08450ea98ae98d5a35145b675b76db616046ea11
tree0f6eeabdf2445bd7e2069a31bc3ace28910e290e
parentf6974b4c2d8e1062b5a52228ee47293c15b4ee1e
bnxt_en: Fix max_mtu setting for multi-buf XDP

The existing code does not allow the MTU to be set to the maximum even
after an XDP program supporting multiple buffers is attached.  Fix it
to set the netdev->max_mtu to the maximum value if the attached XDP
program supports mutiple buffers, regardless of the current MTU value.

Also use a local variable dev instead of repeatedly using bp->dev.

Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff")
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20230731142043.58855-3-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c