DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/gve: Refill all descriptors that were consumed
@ 2023-09-14 20:52 Rushil Gupta
  2023-09-15  2:28 ` Guo, Junfeng
  0 siblings, 1 reply; 3+ messages in thread
From: Rushil Gupta @ 2023-09-14 20:52 UTC (permalink / raw)
  To: qi.z.zhang, ferruh.yigit
  Cc: junfeng.guo, dev, Rushil Gupta, Joshua Washington

Refill all consumed descriptors instead of refilling a set amount of
descriptors everytime. Also, lower the rx-free-thresh to refill more
aggressively. This yields in fewer packet drops for DQO queue format.

Signed-off-by: Rushil Gupta <rushilg@google.com>
Reviewed-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/gve/gve_ethdev.h | 2 +-
 drivers/net/gve/gve_rx_dqo.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h
index c9bcfa553c..fe7095ed76 100644
--- a/drivers/net/gve/gve_ethdev.h
+++ b/drivers/net/gve/gve_ethdev.h
@@ -27,7 +27,7 @@
 #define PCI_MSIX_FLAGS		2	/* Message Control */
 #define PCI_MSIX_FLAGS_QSIZE	0x07FF	/* Table size */
 
-#define GVE_DEFAULT_RX_FREE_THRESH  512
+#define GVE_DEFAULT_RX_FREE_THRESH   64
 #define GVE_DEFAULT_TX_FREE_THRESH   32
 #define GVE_DEFAULT_TX_RS_THRESH     32
 #define GVE_TX_MAX_FREE_SZ          512
diff --git a/drivers/net/gve/gve_rx_dqo.c b/drivers/net/gve/gve_rx_dqo.c
index 236aefd2a8..7e7ddac48e 100644
--- a/drivers/net/gve/gve_rx_dqo.c
+++ b/drivers/net/gve/gve_rx_dqo.c
@@ -12,8 +12,8 @@ gve_rx_refill_dqo(struct gve_rx_queue *rxq)
 {
 	volatile struct gve_rx_desc_dqo *rx_buf_ring;
 	volatile struct gve_rx_desc_dqo *rx_buf_desc;
-	struct rte_mbuf *nmb[rxq->free_thresh];
-	uint16_t nb_refill = rxq->free_thresh;
+	struct rte_mbuf *nmb[rxq->nb_rx_hold];
+	uint16_t nb_refill = rxq->nb_rx_hold;
 	uint16_t nb_desc = rxq->nb_rx_desc;
 	uint16_t next_avail = rxq->bufq_tail;
 	struct rte_eth_dev *dev;
-- 
2.42.0.459.ge4e396fd5e-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] net/gve: Refill all descriptors that were consumed
  2023-09-14 20:52 [PATCH] net/gve: Refill all descriptors that were consumed Rushil Gupta
@ 2023-09-15  2:28 ` Guo, Junfeng
  2023-09-21 16:37   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Guo, Junfeng @ 2023-09-15  2:28 UTC (permalink / raw)
  To: Rushil Gupta, Zhang, Qi Z, ferruh.yigit; +Cc: dev, Joshua Washington

Acked-by: Junfeng Guo <junfeng.guo@intel.com>

Regards,
Junfeng

> -----Original Message-----
> From: Rushil Gupta <rushilg@google.com>
> Sent: Friday, September 15, 2023 04:52
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; ferruh.yigit@amd.com
> Cc: Guo, Junfeng <junfeng.guo@intel.com>; dev@dpdk.org; Rushil Gupta
> <rushilg@google.com>; Joshua Washington <joshwash@google.com>
> Subject: [PATCH] net/gve: Refill all descriptors that were consumed
> 
> Refill all consumed descriptors instead of refilling a set amount of
> descriptors everytime. Also, lower the rx-free-thresh to refill more
> aggressively. This yields in fewer packet drops for DQO queue format.
> 
> Signed-off-by: Rushil Gupta <rushilg@google.com>
> Reviewed-by: Joshua Washington <joshwash@google.com>
> ---
>  drivers/net/gve/gve_ethdev.h | 2 +-
>  drivers/net/gve/gve_rx_dqo.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h
> index c9bcfa553c..fe7095ed76 100644
> --- a/drivers/net/gve/gve_ethdev.h
> +++ b/drivers/net/gve/gve_ethdev.h
> @@ -27,7 +27,7 @@
>  #define PCI_MSIX_FLAGS		2	/* Message Control */
>  #define PCI_MSIX_FLAGS_QSIZE	0x07FF	/* Table size */
> 
> -#define GVE_DEFAULT_RX_FREE_THRESH  512
> +#define GVE_DEFAULT_RX_FREE_THRESH   64
>  #define GVE_DEFAULT_TX_FREE_THRESH   32
>  #define GVE_DEFAULT_TX_RS_THRESH     32
>  #define GVE_TX_MAX_FREE_SZ          512
> diff --git a/drivers/net/gve/gve_rx_dqo.c b/drivers/net/gve/gve_rx_dqo.c
> index 236aefd2a8..7e7ddac48e 100644
> --- a/drivers/net/gve/gve_rx_dqo.c
> +++ b/drivers/net/gve/gve_rx_dqo.c
> @@ -12,8 +12,8 @@ gve_rx_refill_dqo(struct gve_rx_queue *rxq)
>  {
>  	volatile struct gve_rx_desc_dqo *rx_buf_ring;
>  	volatile struct gve_rx_desc_dqo *rx_buf_desc;
> -	struct rte_mbuf *nmb[rxq->free_thresh];
> -	uint16_t nb_refill = rxq->free_thresh;
> +	struct rte_mbuf *nmb[rxq->nb_rx_hold];
> +	uint16_t nb_refill = rxq->nb_rx_hold;
>  	uint16_t nb_desc = rxq->nb_rx_desc;
>  	uint16_t next_avail = rxq->bufq_tail;
>  	struct rte_eth_dev *dev;
> --
> 2.42.0.459.ge4e396fd5e-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/gve: Refill all descriptors that were consumed
  2023-09-15  2:28 ` Guo, Junfeng
@ 2023-09-21 16:37   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2023-09-21 16:37 UTC (permalink / raw)
  To: Guo, Junfeng, Rushil Gupta, Zhang, Qi Z; +Cc: dev, Joshua Washington

On 9/15/2023 3:28 AM, Guo, Junfeng wrote:
>> -----Original Message-----
>> From: Rushil Gupta <rushilg@google.com>
>> Sent: Friday, September 15, 2023 04:52
>> To: Zhang, Qi Z <qi.z.zhang@intel.com>; ferruh.yigit@amd.com
>> Cc: Guo, Junfeng <junfeng.guo@intel.com>; dev@dpdk.org; Rushil Gupta
>> <rushilg@google.com>; Joshua Washington <joshwash@google.com>
>> Subject: [PATCH] net/gve: Refill all descriptors that were consumed
>>
>> Refill all consumed descriptors instead of refilling a set amount of
>> descriptors everytime. Also, lower the rx-free-thresh to refill more
>> aggressively. This yields in fewer packet drops for DQO queue format.
>>
>> Signed-off-by: Rushil Gupta <rushilg@google.com>
>> Reviewed-by: Joshua Washington <joshwash@google.com>
> 
> Acked-by: Junfeng Guo <junfeng.guo@intel.com>
>

Applied to dpdk-next-net/main, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-21 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-14 20:52 [PATCH] net/gve: Refill all descriptors that were consumed Rushil Gupta
2023-09-15  2:28 ` Guo, Junfeng
2023-09-21 16:37   ` Ferruh Yigit

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).