aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt.h
diff options
context:
space:
mode:
authorMichael Chan <michael.chan@broadcom.com>2018-10-14 07:02:57 -0400
committerDavid S. Miller <davem@davemloft.net>2018-10-15 22:44:33 -0700
commit3675b92fa70ece4c9263b812fc8cbf3bd606398c (patch)
treec9c377c86d20b498639873d3f6adacb2127515eb /drivers/net/ethernet/broadcom/bnxt/bnxt.h
parentbnxt_en: Add coalescing setup for 57500 chips. (diff)
downloadlinux-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.h5
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