From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id 3315658D3 for ; Tue, 17 Jun 2014 10:41:50 +0200 (CEST) Received: by mail-wi0-f178.google.com with SMTP id n15so5366151wiw.11 for ; Tue, 17 Jun 2014 01:42:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=dhTz3/UwRjsuSV7uhfd4bM/sY9Q2GnIbix9AE56A03M=; b=GyPX/RlGYjsRBmciYjEXpCBCLbaZWQUU44rZG+NfAqpvyBIDBtoLis2NX1Jkcmh5OV YkUIKi/5zbTnRgIs+xSpMe98ltJwcQGVdcaksPZxDY/sAqa3A3h3PhkKNIDn4F5cXgEh H3++fdj2TM/rm2v0GHhgV9LJZ25+pxABV6EHBnH5sQe4zkzmb8XbN8uDfT+PbdIiNa2V 7pr2iA8XOi9vEzH8M4HcwPu4eLW1qziPOwwrEkbev96WJMckf8mNOtrbKxxXyw7T2kMO Pr/bbDy0C/LHrJ6Ww44Qd3T4wI22TU5Cj5ZHE2xuzfP2c6wyzp8CfxLXsjN6/dmziu2C 5dKg== X-Gm-Message-State: ALoCoQna2vTl6iNhZpBZp7NnOCSOPJMtQNZWdyclSY6j4Tiau3G1zYq4OgQxlsCtI77brQ4XdhKV X-Received: by 10.194.92.176 with SMTP id cn16mr35119904wjb.43.1402994526392; Tue, 17 Jun 2014 01:42:06 -0700 (PDT) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id u1sm18919849wia.16.2014.06.17.01.42.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 01:42:05 -0700 (PDT) Message-ID: <539FFF5A.80307@6wind.com> Date: Tue, 17 Jun 2014 10:42:02 +0200 From: David Marchand User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: "Ananyev, Konstantin" , "dev@dpdk.org" References: <1402666663-10260-1-git-send-email-david.marchand@6wind.com> <2601191342CEEE43887BDE71AB9772580EFB73D4@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772580EFB73D4@IRSMSX105.ger.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 17 Jun 2014 08:41:50 -0000 Hello Konstantin, On 06/16/2014 07:07 PM, Ananyev, Konstantin wrote: > > 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. Hum, actually, dev->data structure is supposed to be set to 0 at init time or I missed something. I would say this happens once for the whole rte_eth_dev_data array in rte_eth_dev_data_alloc() in primary process (first call to rte_eth_dev_allocate()). > > 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(). Ok, I forgot to take this part you mentioned earlier. I will send an update later (depending on the points 1) and 3)). > > 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. RTE_IPV4_MIN_MTU then ? I am not sure where this belongs, it could go in rte_ethdev.h. -- David Marchand