Commit cbd7a03
Shruti Parab
bnxt_en: Report the ethtool coredump length after copying the coredump
JIRA: https://issues.redhat.com/browse/RHEL-76568
commit c21c8e1
Author: Shruti Parab <shruti.parab@broadcom.com>
Date: Thu Apr 17 10:24:46 2025 -0700
bnxt_en: Report the ethtool coredump length after copying the coredump
ethtool first calls .get_dump_flags() to get the dump length. For
coredump, the driver calls the FW to get the coredump length (L1). The
min. of L1 and the user specified length is then passed to
.get_dump_data() (L2) to get the coredump. The actual coredump length
retrieved by the FW (L3) during .get_dump_data() may be smaller than L1.
This length discrepancy will trigger a WARN_ON() in
ethtool_get_dump_data().
ethtool has already vzalloc'ed a buffer with size L1. Just report
the coredump length as L2 even though the actual coredump length L3
may be smaller. The extra zero padding does not matter. This will
prevent the warning that may alarm the user.
For correctness, only do the final length update if there is no error.
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Signed-off-by: Shruti Parab <shruti.parab@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250417172448.1206107-3-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Shruti Parab <shruti.parab@broadcom.com>1 parent 26ddaa9 commit cbd7a03
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
501 | 507 | | |
| 508 | + | |
502 | 509 | | |
503 | 510 | | |
504 | 511 | | |
| |||
0 commit comments