-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add napi netdev device registration, interrupt handling and initial tx and rx polling stubs. The stubs will be filled in follow-on patches. Also: - LRO feature advertisement and handling - Also update ethtool logic Signed-off-by: Bailey Forrest <bcf@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Catherine Sullivan <csully@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Bailey Forrest
authored and
David S. Miller
committed
Jun 24, 2021
1 parent
1f6228e
commit 5e8c5ad
Showing
8 changed files
with
260 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Makefile for the Google virtual Ethernet (gve) driver | ||
|
||
obj-$(CONFIG_GVE) += gve.o | ||
gve-objs := gve_main.o gve_tx.o gve_rx.o gve_ethtool.o gve_adminq.o gve_utils.o | ||
gve-objs := gve_main.o gve_tx.o gve_tx_dqo.o gve_rx.o gve_rx_dqo.o gve_ethtool.o gve_adminq.o gve_utils.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
* Google virtual Ethernet (gve) driver | ||
* | ||
* Copyright (C) 2015-2021 Google, Inc. | ||
*/ | ||
|
||
#ifndef _GVE_DQO_H_ | ||
#define _GVE_DQO_H_ | ||
|
||
#include "gve_adminq.h" | ||
|
||
#define GVE_ITR_ENABLE_BIT_DQO BIT(0) | ||
#define GVE_ITR_CLEAR_PBA_BIT_DQO BIT(1) | ||
#define GVE_ITR_NO_UPDATE_DQO (3 << 3) | ||
|
||
#define GVE_TX_IRQ_RATELIMIT_US_DQO 50 | ||
#define GVE_RX_IRQ_RATELIMIT_US_DQO 20 | ||
|
||
netdev_tx_t gve_tx_dqo(struct sk_buff *skb, struct net_device *dev); | ||
bool gve_tx_poll_dqo(struct gve_notify_block *block, bool do_clean); | ||
int gve_rx_poll_dqo(struct gve_notify_block *block, int budget); | ||
|
||
static inline void | ||
gve_write_irq_doorbell_dqo(const struct gve_priv *priv, | ||
const struct gve_notify_block *block, u32 val) | ||
{ | ||
u32 index = be32_to_cpu(block->irq_db_index); | ||
|
||
iowrite32(val, &priv->db_bar2[index]); | ||
} | ||
|
||
#endif /* _GVE_DQO_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.