From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6A2BFB0B7 for ; Mon, 16 Jun 2014 19:07:02 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 16 Jun 2014 10:01:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,488,1400050800"; d="scan'208";a="529321772" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga001.jf.intel.com with ESMTP; 16 Jun 2014 10:07:14 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.239]) by IRSMSX102.ger.corp.intel.com ([169.254.2.105]) with mapi id 14.03.0123.003; Mon, 16 Jun 2014 18:07:13 +0100 From: "Ananyev, Konstantin" To: David Marchand , "dev@dpdk.org" Thread-Topic: [PATCH v2 0/7] add mtu and flow control handlers Thread-Index: AQHPhwy3DNZ+AHlmXEexeQr1GYA9WZtz+DGg Date: Mon, 16 Jun 2014 17:07:12 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772580EFB73D4@IRSMSX105.ger.corp.intel.com> References: <1402666663-10260-1-git-send-email-david.marchand@6wind.com> In-Reply-To: <1402666663-10260-1-git-send-email-david.marchand@6wind.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 0/7] add mtu and flow control handlers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 17:07:02 -0000 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_que= ue_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 =3D mbp_buf_size; + } + + return ret; =20 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 VLA= N 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_PKT= MBUF_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