gve: Unify duplicate GQ min pkt desc size constants
Subsystems (3)
PATCH 1/1 gve: Unify duplicate GQ min pkt desc size constants
The two constants accomplish the same thing.
Signed-off-by Shailend Chand <[email protected]>
--- drivers/net/ethernet/google/gve/gve.h | 2 -- drivers/net/ethernet/google/gve/gve_tx.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/google/gve/gve.h +0 -2
@@ -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 */
drivers/net/ethernet/google/gve/gve_tx.c +2 -2
@@ -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);
Signature · 1 line
2.40.0.577.gac1e443424-goog
Quoted 3 lines · On Fri, 7 Apr 2023 11:48:30 -0700 Shailend Chand wrote:
The two constants accomplish the same thing.
Signed-off-by Shailend Chand <[email protected]>
Reviewed-by Jakub Kicinski <[email protected]>
Thanks!
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 7 lines · On Fri, 7 Apr 2023 11:48:30 -0700 you wrote:
The two constants accomplish the same thing.
Signed-off-by Shailend Chand <[email protected]>--- 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html