DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: David Marchand <david.marchand@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 0/7] add mtu and flow control handlers
Date: Mon, 16 Jun 2014 17:07:12 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB9772580EFB73D4@IRSMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <1402666663-10260-1-git-send-email-david.marchand@6wind.com>

Hi David,

> This patchset introduces 3 new ethdev operations: flow control parameters
> retrieval and mtu get/set operations.

> Changes since v1:
> - compute min rx buffer size at ethdev level (to simplify pmd mtu checks)
> - introduce enable_scatter rx mode so that we can advise pmd to configure
>  scatter mode
> - rework mtu get/set operations (based on Konstantin comments)
> - pass checkpatch.pl checks

1)  [PATCH v2 3/7] ethdev: store min rx buffer size
@@ -879,6 +879,8 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
 		       const struct rte_eth_rxconf *rx_conf,
 		       struct rte_mempool *mp)
 {
...
+	if (!ret) {
+		if (dev->data->min_rx_buf_size > mbp_buf_size)
+			dev->data->min_rx_buf_size = mbp_buf_size;
+	}
+
+	return ret;
 
Where do you set the initial value of min_rx_buf_size?
Can't find it by some reason.

2)  [PATCH v2 5/7] ethdev: add mtu accessors
+static int
+ixgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+{
...
+	if (!dev->data->scattered_rx &&
+	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)
+		return -EINVAL;

Reading 82599 spec, 8.2.3.22.13 Max Frame Size - MAXFRS (0x04268; RW):
" The MFS does not include the 4 bytes of the VLAN header. Packets with VLAN header
can be as large as MFS + 4. When double VLAN is enabled, the device adds 8 to the
MFS for any packets."

So, I suppose it should be:
if (!dev->data->scattered_rx &&
frame_size + 2 * IXGBE_VLAN_TAG_SIZE > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)

Like in ixgbe_dev_rx_init().


3)  if ((mtu < 68) || (frame_size > dev_info.max_rx_pktlen))
Can we add a new define for min allowable MTU (68) as it used in few places.

Thanks
Konstantin

  parent reply	other threads:[~2014-06-16 17:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 13:37 David Marchand
2014-06-13 13:37 ` [dpdk-dev] [PATCH v2 1/7] ethdev: retrieve flow control configuration David Marchand
2014-06-13 13:37 ` [dpdk-dev] [PATCH v2 2/7] ethdev: add autoneg parameter in flow ctrl accessors David Marchand
2014-06-13 13:37 ` [dpdk-dev] [PATCH v2 3/7] ethdev: store min rx buffer size David Marchand
2014-06-13 13:37 ` [dpdk-dev] [PATCH v2 4/7] ethdev: introduce enable_scatter rx mode David Marchand
2014-06-13 13:37 ` [dpdk-dev] [PATCH v2 5/7] ethdev: add mtu accessors David Marchand
2014-06-13 13:37 ` [dpdk-dev] [PATCH v2 6/7] ixgbe: add set_mtu to ixgbevf David Marchand
2014-06-13 13:37 ` [dpdk-dev] [PATCH v2 7/7] app/testpmd: allow to configure mtu David Marchand
2014-06-16 17:07 ` Ananyev, Konstantin [this message]
2014-06-17  8:42   ` [dpdk-dev] [PATCH v2 0/7] add mtu and flow control handlers David Marchand
2014-06-17  8:57     ` Ananyev, Konstantin
2014-06-17  9:25       ` Thomas Monjalon
2014-06-17 11:42         ` Ananyev, Konstantin
2014-06-17 13:39       ` David Marchand
2014-06-17 15:26         ` Ananyev, Konstantin

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=2601191342CEEE43887BDE71AB9772580EFB73D4@IRSMSX105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.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).