diff mbox series

[net-next] gve: Unify duplicate GQ min pkt desc size constants

Message ID 20230407184830.309398-1-shailend@google.com (mailing list archive)
State Accepted
Commit 4de00f0acc722f43046dca06fe1336597d1250ab
Delegated to: Netdev Maintainers
Headers show
Series [net-next] gve: Unify duplicate GQ min pkt desc size constants | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers warning 5 maintainers not CCed: pabeni@redhat.com edumazet@google.com csully@google.com pkaligineedi@google.com jeroendb@google.com
netdev/build_clang success Errors and warnings before: 21 this patch: 21
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 24 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Shailend Chand April 7, 2023, 6:48 p.m. UTC
The two constants accomplish the same thing.

Signed-off-by: Shailend Chand <shailend@google.com>
---
 drivers/net/ethernet/google/gve/gve.h    | 2 --
 drivers/net/ethernet/google/gve/gve_tx.c | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Jakub Kicinski April 8, 2023, 3:24 a.m. UTC | #1
On Fri,  7 Apr 2023 11:48:30 -0700 Shailend Chand wrote:
> The two constants accomplish the same thing.
> 
> Signed-off-by: Shailend Chand <shailend@google.com>

Reviewed-by: Jakub Kicinski <kuba@kernel.org>

Thanks!
patchwork-bot+netdevbpf@kernel.org April 11, 2023, 1:50 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri,  7 Apr 2023 11:48:30 -0700 you wrote:
> The two constants accomplish the same thing.
> 
> Signed-off-by: Shailend Chand <shailend@google.com>
> ---
>  drivers/net/ethernet/google/gve/gve.h    | 2 --
>  drivers/net/ethernet/google/gve/gve_tx.c | 4 ++--
>  2 files changed, 2 insertions(+), 4 deletions(-)

Here is the summary with links:
  - [net-next] gve: Unify duplicate GQ min pkt desc size constants
    https://git.kernel.org/netdev/net-next/c/4de00f0acc72

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h
index 4d01c66d2d65..98eb78d98e9f 100644
--- a/drivers/net/ethernet/google/gve/gve.h
+++ b/drivers/net/ethernet/google/gve/gve.h
@@ -49,8 +49,6 @@ 
 
 #define GVE_XDP_ACTIONS 5
 
-#define GVE_TX_MAX_HEADER_SIZE 182
-
 #define GVE_GQ_TX_MIN_PKT_DESC_BYTES 182
 
 /* Each slot in the desc ring has a 1:1 mapping to a slot in the data ring */
diff --git a/drivers/net/ethernet/google/gve/gve_tx.c b/drivers/net/ethernet/google/gve/gve_tx.c
index fe6b933e1df1..813da572abca 100644
--- a/drivers/net/ethernet/google/gve/gve_tx.c
+++ b/drivers/net/ethernet/google/gve/gve_tx.c
@@ -730,7 +730,7 @@  static int gve_tx_fill_xdp(struct gve_priv *priv, struct gve_tx_ring *tx,
 	u32 reqi = tx->req;
 
 	pad = gve_tx_fifo_pad_alloc_one_frag(&tx->tx_fifo, len);
-	if (pad >= GVE_TX_MAX_HEADER_SIZE)
+	if (pad >= GVE_GQ_TX_MIN_PKT_DESC_BYTES)
 		pad = 0;
 	info = &tx->info[reqi & tx->mask];
 	info->xdp_frame = frame_p;
@@ -810,7 +810,7 @@  int gve_xdp_xmit_one(struct gve_priv *priv, struct gve_tx_ring *tx,
 {
 	int nsegs;
 
-	if (!gve_can_tx(tx, len + GVE_TX_MAX_HEADER_SIZE - 1))
+	if (!gve_can_tx(tx, len + GVE_GQ_TX_MIN_PKT_DESC_BYTES - 1))
 		return -EBUSY;
 
 	nsegs = gve_tx_fill_xdp(priv, tx, data, len, frame_p, false);