DPDK patches and discussions
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: Joshua Washington <joshwash@google.com>,
	Junfeng Guo <junfeng.guo@intel.com>,
	Jeroen de Borst <jeroendb@google.com>,
	Rushil Gupta <rushilg@google.com>
Cc: <dev@dpdk.org>, Ferruh Yigit <ferruh.yigit@amd.com>
Subject: Re: [PATCH] net/gve: add support for max_rx_bufsize
Date: Fri, 17 Nov 2023 09:35:36 +0800	[thread overview]
Message-ID: <7733f1a7-1c70-1724-7d3d-13e798d30932@huawei.com> (raw)
In-Reply-To: <20231116221605.2240305-1-joshwash@google.com>


在 2023/11/17 6:16, Joshua Washington 写道:
> The new max_rx_bufsize field in dev_info can be used to guide mbuf sizes
> chosen by DPDK programs by ensuring that DPDK programs do not waste
> memory by using an mbuf size too large for the maximum RX buffer size.
> This patch adds support for this field in the GVE PMD.
>
> Signed-off-by: Joshua Washington <joshwash@google.com>
> Reviewed-by: Rushil Gupta <rushilg@google.com>
> ---
>   drivers/net/gve/gve_ethdev.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
> index 43b4ab523d..001cae2b98 100644
> --- a/drivers/net/gve/gve_ethdev.c
> +++ b/drivers/net/gve/gve_ethdev.c
> @@ -296,10 +296,14 @@ gve_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>   	dev_info->max_mac_addrs = 1;
>   	dev_info->max_rx_queues = priv->max_nb_rxq;
>   	dev_info->max_tx_queues = priv->max_nb_txq;
> -	if (gve_is_gqi(priv))
> +	if (gve_is_gqi(priv)) {
>   		dev_info->min_rx_bufsize = GVE_RX_MIN_BUF_SIZE_GQI;
> -	else
> +		dev_info->max_rx_bufsize = GVE_RX_MAX_BUF_SIZE_GQI;
> +	} else {
>   		dev_info->min_rx_bufsize = GVE_RX_MIN_BUF_SIZE_DQO;
> +		dev_info->max_rx_bufsize = GVE_RX_MAX_BUF_SIZE_DQO;
> +	}
nice
Reviewed-by: Huisong Li <lihuisong@huawei.com>
> +
>   	dev_info->max_rx_pktlen = priv->max_mtu + RTE_ETHER_HDR_LEN;
>   	dev_info->max_mtu = priv->max_mtu;
>   	dev_info->min_mtu = RTE_ETHER_MIN_MTU;

  reply	other threads:[~2023-11-17  1:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 22:16 Joshua Washington
2023-11-17  1:35 ` lihuisong (C) [this message]
2023-11-17 10:59   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7733f1a7-1c70-1724-7d3d-13e798d30932@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=jeroendb@google.com \
    --cc=joshwash@google.com \
    --cc=junfeng.guo@intel.com \
    --cc=rushilg@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).