diff mbox series

[net,v2,1/3] gve: Correct available tx qpl check

Message ID 20211006024221.1301628-1-jeroendb@google.com (mailing list archive)
State Accepted
Commit d03477ee10f4bc35d3573cf1823814378ef2dca2
Delegated to: Netdev Maintainers
Headers show
Series [net,v2,1/3] gve: Correct available tx qpl check | expand

Checks

Context Check Description
netdev/cover_letter warning Series does not have a cover letter
netdev/fixes_present success Fixes tag present in non-next series
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers fail 3 blamed authors not CCed: jonolson@google.com sagis@google.com willemb@google.com; 5 maintainers not CCed: awogbemila@google.com bcf@google.com sagis@google.com willemb@google.com jonolson@google.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Fixes tag looks correct
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success No static functions without inline keyword in header files

Commit Message

Jeroen de Borst Oct. 6, 2021, 2:42 a.m. UTC
From: Catherine Sullivan <csully@google.com>

The qpl_map_size is rounded up to a multiple of sizeof(long), but the
number of qpls doesn't have to be.

Fixes: f5cedc84a30d2 ("gve: Add transmit and receive support")
Signed-off-by: Catherine Sullivan <csully@google.com>
Signed-off-by: Jeroen de Borst <jeroendb@google.com>
---
 drivers/net/ethernet/google/gve/gve.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 6, 2021, 2:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Tue,  5 Oct 2021 19:42:19 -0700 you wrote:
> From: Catherine Sullivan <csully@google.com>
> 
> The qpl_map_size is rounded up to a multiple of sizeof(long), but the
> number of qpls doesn't have to be.
> 
> Fixes: f5cedc84a30d2 ("gve: Add transmit and receive support")
> Signed-off-by: Catherine Sullivan <csully@google.com>
> Signed-off-by: Jeroen de Borst <jeroendb@google.com>
> 
> [...]

Here is the summary with links:
  - [net,v2,1/3] gve: Correct available tx qpl check
    https://git.kernel.org/netdev/net/c/d03477ee10f4
  - [net,v2,2/3] gve: Avoid freeing NULL pointer
    https://git.kernel.org/netdev/net/c/922aa9bcac92
  - [net,v2,3/3] gve: Properly handle errors in gve_assign_qpl
    https://git.kernel.org/netdev/net/c/d4b111fda69a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h
index 1d3188e8e3b3..92dc18a4bcc4 100644
--- a/drivers/net/ethernet/google/gve/gve.h
+++ b/drivers/net/ethernet/google/gve/gve.h
@@ -780,7 +780,7 @@  struct gve_queue_page_list *gve_assign_rx_qpl(struct gve_priv *priv)
 				    gve_num_tx_qpls(priv));
 
 	/* we are out of rx qpls */
-	if (id == priv->qpl_cfg.qpl_map_size)
+	if (id == gve_num_tx_qpls(priv) + gve_num_rx_qpls(priv))
 		return NULL;
 
 	set_bit(id, priv->qpl_cfg.qpl_id_map);