aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/sfc/ef100_rep.h
diff options
context:
space:
mode:
authorEdward Cree <ecree.xilinx@gmail.com>2022-07-28 19:57:44 +0100
committerJakub Kicinski <kuba@kernel.org>2022-07-29 21:22:05 -0700
commit69bb5fa73d2b2d7fa3ccbf16e8b1f055fe2d26b1 (patch)
tree0a758fefd18572d8f59966e85df6c3319c4f96d0 /drivers/net/ethernet/sfc/ef100_rep.h
parentsfc: plumb ef100 representor stats (diff)
downloadwireguard-linux-69bb5fa73d2b2d7fa3ccbf16e8b1f055fe2d26b1.tar.xz
wireguard-linux-69bb5fa73d2b2d7fa3ccbf16e8b1f055fe2d26b1.zip
sfc: ef100 representor RX NAPI poll
This patch adds the 'bottom half' napi->poll routine for representor RX. See the next patch (with the top half) for an explanation of the 'fake interrupt' scheme used to drive this NAPI context. Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/sfc/ef100_rep.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef100_rep.h b/drivers/net/ethernet/sfc/ef100_rep.h
index d47fd8ff6220..77037ab22052 100644
--- a/drivers/net/ethernet/sfc/ef100_rep.h
+++ b/drivers/net/ethernet/sfc/ef100_rep.h
@@ -29,7 +29,13 @@ struct efx_rep_sw_stats {
* @msg_enable: log message enable flags
* @mport: m-port ID of corresponding VF
* @idx: VF index
+ * @write_index: number of packets enqueued to @rx_list
+ * @read_index: number of packets consumed from @rx_list
+ * @rx_pring_size: max length of RX list
* @list: entry on efx->vf_reps
+ * @rx_list: list of SKBs queued for receive in NAPI poll
+ * @rx_lock: protects @rx_list
+ * @napi: NAPI control structure
* @stats: software traffic counters for netdev stats
*/
struct efx_rep {
@@ -38,7 +44,12 @@ struct efx_rep {
u32 msg_enable;
u32 mport;
unsigned int idx;
+ unsigned int write_index, read_index;
+ unsigned int rx_pring_size;
struct list_head list;
+ struct list_head rx_list;
+ spinlock_t rx_lock;
+ struct napi_struct napi;
struct efx_rep_sw_stats stats;
};