DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Ian Stokes <ian.stokes@intel.com>, dev@dpdk.org
Cc: stephen@networkplumber.org, Qi Zhang <qi.z.zhang@intel.com>,
	Helin Zhang <helin.zhang@intel.com>,
	Beilei Xing <beilei.xing@intel.com>
Subject: Re: [dpdk-dev] [PATCH v1 2/6] net/i40e: set min and max MTU for i40e devices
Date: Tue, 19 Mar 2019 16:18:09 +0000	[thread overview]
Message-ID: <2784e21c-51f2-c18f-6f26-3586fb4a5133@intel.com> (raw)
Message-ID: <20190319161809.fpD1B8nuNKlCCSiu7eitbhWF3Nuv-1BCKVGb837rpvs@z> (raw)
In-Reply-To: <1551303948-19746-3-git-send-email-ian.stokes@intel.com>

On 2/27/2019 9:45 PM, Ian Stokes wrote:
> This commit sets the min and max supported MTU values for i40e devices
> via the i40e_dev_info_get() function. Min MTU supported is set to
> ETHER_MIN_MTU and max mtu is calculated as the max packet length
> supported minus the transport overhead.
> 
> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index dca61f03a..caab1624f 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -3499,6 +3499,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>  	dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
>  	dev_info->max_mac_addrs = vsi->max_macaddrs;
>  	dev_info->max_vfs = pci_dev->max_vfs;
> +	dev_info->max_mtu = dev_info->max_rx_pktlen - I40E_ETH_OVERHEAD;

'I40E_ETH_OVERHEAD' [1] is the max overhead, when VLAN and QINQ is not
configured, we are wasting 8 bytes, should we try to be more fine grained when
setting the max_mtu? Does it worth the complexity?


[1]
(ETHER_HDR_LEN + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2)

> +	dev_info->min_mtu = ETHER_MIN_MTU;
>  	dev_info->rx_queue_offload_capa = 0;
>  	dev_info->rx_offload_capa =
>  		DEV_RX_OFFLOAD_VLAN_STRIP |
> 


  reply	other threads:[~2019-03-19 16:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 21:45 [dpdk-dev] [PATCH v1 0/6] ethdev: add min/max MTU to device info Ian Stokes
2019-02-27 21:45 ` [dpdk-dev] [PATCH v1 1/6] " Ian Stokes
2019-03-19 16:15   ` Ferruh Yigit
2019-03-19 16:15     ` Ferruh Yigit
2019-03-21 12:50     ` Ian Stokes
2019-03-21 12:50       ` Ian Stokes
2019-03-21 14:06       ` Ferruh Yigit
2019-03-21 14:06         ` Ferruh Yigit
2019-03-21 14:59         ` Ian Stokes
2019-03-21 14:59           ` Ian Stokes
2019-02-27 21:45 ` [dpdk-dev] [PATCH v1 2/6] net/i40e: set min and max MTU for i40e devices Ian Stokes
2019-03-19 16:18   ` Ferruh Yigit [this message]
2019-03-19 16:18     ` Ferruh Yigit
2019-03-21 12:57     ` Ian Stokes
2019-03-21 12:57       ` Ian Stokes
2019-02-27 21:45 ` [dpdk-dev] [PATCH v1 3/6] net/i40e: set min and max MTU for i40e VF devices Ian Stokes
2019-02-27 21:45 ` [dpdk-dev] [PATCH v1 4/6] net/ixgbe: set min and max MTU for ixgbe devices Ian Stokes
2019-02-27 21:45 ` [dpdk-dev] [PATCH v1 5/6] net/ixgbe: set min and max MTU for ixgbe VF devices Ian Stokes
2019-02-27 21:45 ` [dpdk-dev] [PATCH v1 6/6] net/e1000: set min and max MTU for igb devices Ian Stokes
2019-03-19 16:30 ` [dpdk-dev] [PATCH v1 0/6] ethdev: add min/max MTU to device info Ferruh Yigit
2019-03-19 16:30   ` Ferruh Yigit
2019-03-21 13:03   ` Ian Stokes
2019-03-21 13:03     ` Ian Stokes
2019-03-22 13:05     ` Ian Stokes
2019-03-22 13:05       ` Ian Stokes
2019-03-22 14:08       ` Ferruh Yigit
2019-03-22 14:08         ` 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=2784e21c-51f2-c18f-6f26-3586fb4a5133@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=ian.stokes@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stephen@networkplumber.org \
    /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).