From: "Eelco Chaudron" <echaudro@redhat.com>
To: "Ciara Loftus" <ciara.loftus@intel.com>
Cc: dev@dpdk.org, xiaolong.ye@intel.com
Subject: Re: [dpdk-dev] [PATCH] net/af_xdp: enforce an MTU of 1500
Date: Thu, 07 Nov 2019 15:05:23 +0100 [thread overview]
Message-ID: <17CD9BBC-BAC8-4717-8104-52AA2360A2D9@redhat.com> (raw)
In-Reply-To: <20191107132710.14912-1-ciara.loftus@intel.com>
On 7 Nov 2019, at 14:27, Ciara Loftus wrote:
> Packets larger than this will fail to be transmitted by AF_XDP,
> so limit the MTU to 1500.
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c
> b/drivers/net/af_xdp/rte_eth_af_xdp.c
> index 2b1245ee4..62c801500 100644
> --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
> +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
> @@ -595,7 +595,7 @@ eth_dev_info(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
> dev_info->max_tx_queues = internals->queue_cnt;
>
> dev_info->min_mtu = RTE_ETHER_MIN_MTU;
> - dev_info->max_mtu = ETH_AF_XDP_FRAME_SIZE -
> ETH_AF_XDP_DATA_HEADROOM;
> + dev_info->max_mtu = 1500;
Why is this limited to 1500 in the AF_XDP PMD? For native AF_XDP in OVS
the limit is mainly by the driver/XDP page limit:
min(PAGE_SIZE, ETH_AF_XDP_FRAME_SIZE ) - ETH_XDP_DATA_HEADROOM -
XDP_PACKET_HEADROOM
>
> dev_info->default_rxportconf.nb_queues = 1;
> dev_info->default_txportconf.nb_queues = 1;
> @@ -1328,6 +1328,8 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device
> *dev)
> return -1;
> }
>
> + eth_dev_mtu_set(eth_dev, 1500);
> +
> rte_eth_dev_probing_finish(eth_dev);
>
> return 0;
> --
> 2.17.1
prev parent reply other threads:[~2019-11-07 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 13:27 Ciara Loftus
2019-11-07 14:05 ` Eelco Chaudron [this message]
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=17CD9BBC-BAC8-4717-8104-52AA2360A2D9@redhat.com \
--to=echaudro@redhat.com \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=xiaolong.ye@intel.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).