Commit 08450ea
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: 1dc4c55 ("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>1 parent f6974b4 commit 08450ea
1 file changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4001 | 4001 | | |
4002 | 4002 | | |
4003 | 4003 | | |
| 4004 | + | |
| 4005 | + | |
4004 | 4006 | | |
4005 | 4007 | | |
4006 | 4008 | | |
4007 | 4009 | | |
4008 | | - | |
| 4010 | + | |
| 4011 | + | |
| 4012 | + | |
| 4013 | + | |
| 4014 | + | |
| 4015 | + | |
4009 | 4016 | | |
4010 | 4017 | | |
4011 | | - | |
4012 | | - | |
4013 | 4018 | | |
4014 | 4019 | | |
4015 | 4020 | | |
4016 | | - | |
4017 | | - | |
4018 | 4021 | | |
4019 | 4022 | | |
4020 | 4023 | | |
4021 | | - | |
| 4024 | + | |
4022 | 4025 | | |
4023 | | - | |
| 4026 | + | |
4024 | 4027 | | |
4025 | 4028 | | |
4026 | 4029 | | |
| |||
0 commit comments