* [PATCH 1/2] gve: Fix various typos and improve code comments
@ 2025-06-16 5:45 Alok Tiwari
2025-06-16 5:45 ` [PATCH 2/2] gve: Return error for unknown admin queue command Alok Tiwari
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Alok Tiwari @ 2025-06-16 5:45 UTC (permalink / raw)
To: pabeni, kuba, jeroendb, hramamurthy, andrew+netdev, davem,
edumazet, netdev, almasrymina, bcf
Cc: alok.a.tiwari, linux-kernel, ziweixiao, joshwash, willemb,
pkaligineedi
- Correct spelling and improves the clarity of comments
"confiugration" -> "configuration"
"spilt" -> "split"
"It if is 0" -> "If it is 0"
"DQ" -> "DQO" (correct abbreviation)
- Clarify BIT(0) flag usage in gve_get_priv_flags()
- Replaced hardcoded array size with GVE_NUM_PTYPES
for clarity and maintainability.
These changes are purely cosmetic and do not affect functionality.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/ethernet/google/gve/gve.h | 2 +-
drivers/net/ethernet/google/gve/gve_adminq.c | 2 +-
drivers/net/ethernet/google/gve/gve_adminq.h | 2 +-
drivers/net/ethernet/google/gve/gve_ethtool.c | 2 +-
drivers/net/ethernet/google/gve/gve_main.c | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h
index 2fab38c8ee78..bd4bf591e0b3 100644
--- a/drivers/net/ethernet/google/gve/gve.h
+++ b/drivers/net/ethernet/google/gve/gve.h
@@ -781,7 +781,7 @@ struct gve_priv {
struct gve_tx_queue_config tx_cfg;
struct gve_rx_queue_config rx_cfg;
- u32 num_ntfy_blks; /* spilt between TX and RX so must be even */
+ u32 num_ntfy_blks; /* split between TX and RX so must be even */
struct gve_registers __iomem *reg_bar0; /* see gve_register.h */
__be32 __iomem *db_bar2; /* "array" of doorbells */
diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
index 3e8fc33cc11f..e93e564f3e65 100644
--- a/drivers/net/ethernet/google/gve/gve_adminq.c
+++ b/drivers/net/ethernet/google/gve/gve_adminq.c
@@ -625,7 +625,7 @@ static int gve_adminq_execute_extended_cmd(struct gve_priv *priv, u32 opcode,
/* The device specifies that the management vector can either be the first irq
* or the last irq. ntfy_blk_msix_base_idx indicates the first irq assigned to
- * the ntfy blks. It if is 0 then the management vector is last, if it is 1 then
+ * the ntfy blks. If it is 0 then the management vector is last, if it is 1 then
* the management vector is first.
*
* gve arranges the msix vectors so that the management vector is last.
diff --git a/drivers/net/ethernet/google/gve/gve_adminq.h b/drivers/net/ethernet/google/gve/gve_adminq.h
index 228217458275..8490592d053e 100644
--- a/drivers/net/ethernet/google/gve/gve_adminq.h
+++ b/drivers/net/ethernet/google/gve/gve_adminq.h
@@ -451,7 +451,7 @@ struct gve_ptype_entry {
};
struct gve_ptype_map {
- struct gve_ptype_entry ptypes[1 << 10]; /* PTYPES are always 10 bits. */
+ struct gve_ptype_entry ptypes[GVE_NUM_PTYPES]; /* PTYPES are always 10 bits. */
};
struct gve_adminq_get_ptype_map {
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
index 3c1da0cf3f61..ab33e9d9b84c 100644
--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
+++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
@@ -667,7 +667,7 @@ static u32 gve_get_priv_flags(struct net_device *netdev)
struct gve_priv *priv = netdev_priv(netdev);
u32 ret_flags = 0;
- /* Only 1 flag exists currently: report-stats (BIT(O)), so set that flag. */
+ /* Only 1 flag exists currently: report-stats (BIT(0)), so set that flag. */
if (priv->ethtool_flags & BIT(0))
ret_flags |= BIT(0);
return ret_flags;
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index dc35a23ec47f..857c6d7dd676 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -1727,7 +1727,7 @@ int gve_adjust_config(struct gve_priv *priv,
{
int err;
- /* Allocate resources for the new confiugration */
+ /* Allocate resources for the new configuration */
err = gve_queues_mem_alloc(priv, tx_alloc_cfg, rx_alloc_cfg);
if (err) {
netif_err(priv, drv, priv->dev,
@@ -2236,7 +2236,7 @@ static int gve_init_priv(struct gve_priv *priv, bool skip_describe_device)
goto err;
}
- /* Big TCP is only supported on DQ*/
+ /* Big TCP is only supported on DQO */
if (!gve_is_gqi(priv))
netif_set_tso_max_size(priv->dev, GVE_DQO_TX_MAX);
--
2.47.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] gve: Return error for unknown admin queue command
2025-06-16 5:45 [PATCH 1/2] gve: Fix various typos and improve code comments Alok Tiwari
@ 2025-06-16 5:45 ` Alok Tiwari
2025-06-16 15:49 ` [PATCH 1/2] gve: Fix various typos and improve code comments Joe Damato
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Alok Tiwari @ 2025-06-16 5:45 UTC (permalink / raw)
To: pabeni, kuba, jeroendb, hramamurthy, andrew+netdev, davem,
edumazet, netdev, almasrymina, bcf
Cc: alok.a.tiwari, linux-kernel, ziweixiao, joshwash, willemb,
pkaligineedi
In gve_adminq_issue_cmd(), return -EINVAL instead of 0 when an unknown
admin queue command opcode is encountered.
This prevents the function from silently succeeding on invalid input
and prevents undefined behavior by ensuring the function fails gracefully
when an unrecognized opcode is provided.
These changes improve error handling.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/ethernet/google/gve/gve_adminq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
index e93e564f3e65..a7b21cea27da 100644
--- a/drivers/net/ethernet/google/gve/gve_adminq.c
+++ b/drivers/net/ethernet/google/gve/gve_adminq.c
@@ -564,6 +564,7 @@ static int gve_adminq_issue_cmd(struct gve_priv *priv,
break;
default:
dev_err(&priv->pdev->dev, "unknown AQ command opcode %d\n", opcode);
+ return -EINVAL;
}
return 0;
--
2.47.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] gve: Fix various typos and improve code comments
2025-06-16 5:45 [PATCH 1/2] gve: Fix various typos and improve code comments Alok Tiwari
2025-06-16 5:45 ` [PATCH 2/2] gve: Return error for unknown admin queue command Alok Tiwari
@ 2025-06-16 15:49 ` Joe Damato
2025-06-16 23:25 ` Mina Almasry
2025-06-18 1:41 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Joe Damato @ 2025-06-16 15:49 UTC (permalink / raw)
To: Alok Tiwari
Cc: pabeni, kuba, jeroendb, hramamurthy, andrew+netdev, davem,
edumazet, netdev, almasrymina, bcf, linux-kernel, ziweixiao,
joshwash, willemb, pkaligineedi
On Sun, Jun 15, 2025 at 10:45:00PM -0700, Alok Tiwari wrote:
> - Correct spelling and improves the clarity of comments
> "confiugration" -> "configuration"
> "spilt" -> "split"
> "It if is 0" -> "If it is 0"
> "DQ" -> "DQO" (correct abbreviation)
> - Clarify BIT(0) flag usage in gve_get_priv_flags()
> - Replaced hardcoded array size with GVE_NUM_PTYPES
> for clarity and maintainability.
Subject line should target the tree ("net-next") and it's helpful to include
the base-commit (git format-patch --base=auto). Since this series is two
patches you should probably include a short cover letter.
That said, the changes seem reasonable so when you resubmit you can add my:
Reviewed-by: Joe Damato <joe@dama.to>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] gve: Fix various typos and improve code comments
2025-06-16 5:45 [PATCH 1/2] gve: Fix various typos and improve code comments Alok Tiwari
2025-06-16 5:45 ` [PATCH 2/2] gve: Return error for unknown admin queue command Alok Tiwari
2025-06-16 15:49 ` [PATCH 1/2] gve: Fix various typos and improve code comments Joe Damato
@ 2025-06-16 23:25 ` Mina Almasry
2025-06-18 1:41 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Mina Almasry @ 2025-06-16 23:25 UTC (permalink / raw)
To: Alok Tiwari
Cc: pabeni, kuba, jeroendb, hramamurthy, andrew+netdev, davem,
edumazet, netdev, bcf, linux-kernel, ziweixiao, joshwash, willemb,
pkaligineedi
On Sun, Jun 15, 2025 at 10:45 PM Alok Tiwari <alok.a.tiwari@oracle.com> wrote:
>
> - Correct spelling and improves the clarity of comments
> "confiugration" -> "configuration"
> "spilt" -> "split"
> "It if is 0" -> "If it is 0"
> "DQ" -> "DQO" (correct abbreviation)
> - Clarify BIT(0) flag usage in gve_get_priv_flags()
> - Replaced hardcoded array size with GVE_NUM_PTYPES
> for clarity and maintainability.
>
> These changes are purely cosmetic and do not affect functionality.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed to make sure changes are indeed cosmetic and don't affect
functionality, and the spell fixes are indeed correct. So, FWIW,
Reviewed-by: Mina Almasry <almasrymina@google.com>
--
Thanks,
Mina
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] gve: Fix various typos and improve code comments
2025-06-16 5:45 [PATCH 1/2] gve: Fix various typos and improve code comments Alok Tiwari
` (2 preceding siblings ...)
2025-06-16 23:25 ` Mina Almasry
@ 2025-06-18 1:41 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-18 1:41 UTC (permalink / raw)
To: ALOK TIWARI
Cc: pabeni, kuba, jeroendb, hramamurthy, andrew+netdev, davem,
edumazet, netdev, almasrymina, bcf, linux-kernel, ziweixiao,
joshwash, willemb, pkaligineedi
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 15 Jun 2025 22:45:00 -0700 you wrote:
> - Correct spelling and improves the clarity of comments
> "confiugration" -> "configuration"
> "spilt" -> "split"
> "It if is 0" -> "If it is 0"
> "DQ" -> "DQO" (correct abbreviation)
> - Clarify BIT(0) flag usage in gve_get_priv_flags()
> - Replaced hardcoded array size with GVE_NUM_PTYPES
> for clarity and maintainability.
>
> [...]
Here is the summary with links:
- [1/2] gve: Fix various typos and improve code comments
https://git.kernel.org/netdev/net-next/c/b52a93bbaa51
- [2/2] gve: Return error for unknown admin queue command
https://git.kernel.org/netdev/net-next/c/b11344f63fdd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-18 1:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 5:45 [PATCH 1/2] gve: Fix various typos and improve code comments Alok Tiwari
2025-06-16 5:45 ` [PATCH 2/2] gve: Return error for unknown admin queue command Alok Tiwari
2025-06-16 15:49 ` [PATCH 1/2] gve: Fix various typos and improve code comments Joe Damato
2025-06-16 23:25 ` Mina Almasry
2025-06-18 1:41 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).