DPDK patches and discussions
 help / color / mirror / Atom feed
From: Julien Meunier <julien.meunier@6wind.com>
To: Beilei Xing <beilei.xing@intel.com>, jingjing.wu@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] i40e: configure MTU
Date: Wed, 27 Apr 2016 13:43:43 +0200	[thread overview]
Message-ID: <5720A5EF.7000206@6wind.com> (raw)
In-Reply-To: <1461410769-16942-1-git-send-email-beilei.xing@intel.com>

Hello,

On 04/23/2016 01:26 PM, Beilei Xing wrote:
[...]
> +	/* mtu setting is forbidden if port is start */
> +	if (dev_data->dev_started) {
> +		PMD_DRV_LOG(ERR,
> +			    "port %d must be stopped before configuration\n",
> +			    dev_data->port_id);
> +		return -EBUSY;
> +	}

According to rte_ethdev.h, only 4 return codes are supported for
rte_eth_dev_set_mtu:

* - (0) if successful.
* - (-ENOTSUP) if operation is not supported.
* - (-ENODEV) if *port_id* invalid.
* - (-EINVAL) if *mtu* invalid.

EBUSY should not be returned.

> +	for (i = 0; i < dev_data->nb_rx_queues; i++) {
> +		rxq = dev_data->rx_queues[i];
> +		if (!rxq || !rxq->q_set)
> +			continue;
> +
> +		dev_data->dev_conf.rxmode.max_rx_pkt_len = frame_size;
> +		len = hw->func_caps.rx_buf_chain_len * rxq->rx_buf_len;
> +		rxq->max_pkt_len = RTE_MIN(len, frame_size);
> +	}
> +
> +	ret = i40e_dev_rx_init(pf);
> +
> +	return ret;
> +}
> 

Why do want to reconfigure rxq here ? All these operations are already
done when you call i40e_dev_rx_init.
i40e_dev_rx_init => i40e_rx_queue_init (for each queue) =>
i40e_rx_queue_config => redefine rxq->max_pkt_len

Moreover, you should move dev_data->dev_conf.rxmode.max_rx_pkt_len out
of the loop. frame_size is the same for all rx_queues.

-- 
Julien MEUNIER
6WIND

  parent reply	other threads:[~2016-04-27 11:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23 11:26 Beilei Xing
2016-04-26  2:00 ` Wu, Jingjing
2016-04-27 11:43 ` Julien Meunier [this message]
2016-04-27 15:01   ` Xing, Beilei
2016-04-28  3:19 ` [dpdk-dev] [PATCH V2] " Beilei Xing
2016-05-13  8:15   ` [dpdk-dev] [PATCH v3] " Beilei Xing
2016-05-16 12:27     ` Olivier Matz
2016-06-16 17:40       ` Yong Wang
2016-06-16 17:51         ` Yong Wang
2016-06-17  0:03           ` Ananyev, Konstantin
2016-06-20  4:49         ` Xing, Beilei
2016-06-20  4:59           ` Xing, Beilei
2016-06-20  8:05           ` Ananyev, Konstantin
2016-06-20 12:04             ` Xing, Beilei
2016-06-20 12:15               ` Ananyev, Konstantin
2016-06-20 12:46                 ` Xing, Beilei
2016-05-20 15:17     ` [dpdk-dev] [PATCH v4] " Beilei Xing
2016-05-23  1:33       ` Wu, Jingjing
2016-06-09 14:23         ` Bruce Richardson
2016-06-23 10:13           ` Bruce Richardson
2016-06-23 13:37             ` Xing, Beilei
2016-06-23 13:44               ` Bruce Richardson

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=5720A5EF.7000206@6wind.com \
    --to=julien.meunier@6wind.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@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).