diff options
author | Michael Chan <michael.chan@broadcom.com> | 2018-10-14 07:02:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-15 22:44:33 -0700 |
commit | 3675b92fa70ece4c9263b812fc8cbf3bd606398c (patch) | |
tree | c9c377c86d20b498639873d3f6adacb2127515eb /drivers/net/ethernet/broadcom/bnxt/bnxt.h | |
parent | bnxt_en: Add coalescing setup for 57500 chips. (diff) | |
download | linux-dev-3675b92fa70ece4c9263b812fc8cbf3bd606398c.tar.xz linux-dev-3675b92fa70ece4c9263b812fc8cbf3bd606398c.zip |
bnxt_en: Refactor bnxt_poll_work().
Separate the CP ring polling logic in bnxt_poll_work() into 2 separate
functions __bnxt_poll_work() and __bnxt_poll_work_done(). Since the logic
is separated, we need to add tx_pkts and events fields to struct bnxt_napi
to keep track of the events to handle between the 2 functions. We also
add had_work_done field to struct bnxt_cp_ring_info to indicate whether
some work was performed on the CP ring.
This is needed to better support the 57500 chips. We need to poll up to
2 separate CP rings before we update or ARM the CP rings on the 57500 chips.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h index 50b129e53a48..48cb2d54c3bc 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h @@ -792,6 +792,8 @@ struct bnxt_cp_ring_info { u32 cp_raw_cons; struct bnxt_db_info cp_db; + u8 had_work_done:1; + struct bnxt_coal rx_ring_coal; u64 rx_packets; u64 rx_bytes; @@ -829,6 +831,9 @@ struct bnxt_napi { void (*tx_int)(struct bnxt *, struct bnxt_napi *, int); + int tx_pkts; + u8 events; + u32 flags; #define BNXT_NAPI_FLAG_XDP 0x1 |