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 CEB672A7 for ; Tue, 17 Jun 2014 15:39:27 +0200 (CEST) Received: by mail-wi0-f178.google.com with SMTP id n15so5860574wiw.11 for ; Tue, 17 Jun 2014 06:39:43 -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=uNnT8H91yuizpXnJf3Me7dvP5Mor1Yh2N65dKYZRzWY=; b=MDJ/hkMaoCeOn4mNtM6ksiIEnTRD8XLCrqTM+1RPGWXqKt5TeKf9SQD8vJ9fEmofHL v3kSZWd497EKIQSD7BYV/HfU9rqsBibBBcGzd46Ga1m8kiFn3jM8n9L/9Y52W+xCcWIl XnfLNb3LftiJLtpxppsfXf21/jMliWa50bfyDQ1XTOCbkzp/OOH9j+VyiioDptlU3FwN keUfeg/3CpMQ1IRUTkr/iFeq7ccEZGsl4ml4N+oBuCmCY75TqSirWCpXymRWv8dX7TDm BWCzxQqRED/XmOc2RNUdE306BTr7UGC3PVD9YGISCtwR8kjQIsuyM9NCH5ncfHIOp/T+ /e7A== X-Gm-Message-State: ALoCoQlr+HjHCAvz1NhTKUtyvJI4rskAZDi60ZfVdZcw0PIurtfxgza2x7s/QiB34GS9mZUL9bzY X-Received: by 10.180.14.196 with SMTP id r4mr36400340wic.2.1403012383607; Tue, 17 Jun 2014 06:39:43 -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 wj4sm23430088wjc.23.2014.06.17.06.39.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 06:39:42 -0700 (PDT) Message-ID: <53A0451B.6090104@6wind.com> Date: Tue, 17 Jun 2014 15:39:39 +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> <539FFF5A.80307@6wind.com> <2601191342CEEE43887BDE71AB9772580EFB75F6@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772580EFB75F6@IRSMSX105.ger.corp.intel.com> Content-Type: text/plain; charset=UTF-8; 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 13:39:28 -0000 On 06/17/2014 10:57 AM, Ananyev, Konstantin wrote: > Yes, I understand that it will be initialised to 0 together with whole dev->data. > But then, the condition: > if (dev->data->min_rx_buf_size > mbp_buf_size) > would never be true, and min_rx_buf_size would always remain 0? > I thought you need to initialise it with UINT32_MAX(or UINT16_MAX). > BTW, not big deal, but I think uint16_t is enough for min_rx_buf_size. - Oh, right... We need a check on this : if (!dev->data->min_rx_buf_size || dev->data->min_rx_buf_size > mbp_buf_size) - Yep, uint16_t should be enough for min_rx_buf_size, but then, we might want to update other places where bufsizes are compared to uin32_t as well. - Actually, looking at dev->data structure, there is something suspicious to me. From what I understood, secondary processes are not supposed to touch dev->data, at it is shared between processes. So I don't understand why rte_eth_dev_allocate() writes dev->data->port_id, without looking at process type. Idem, later in rte_eth_dev_init(), where eth_dev->data->rx_mbuf_alloc_failed is set to 0 (which should already be set to 0 anyway). I think a cleanup is required here but it can wait until 1.7 is out. Plus, I am not sure we should let secondary processes use fdir calls, change vlan offloads etc... > >>> >>> 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 ? > > Sounds good to me. > >> I am not sure where this belongs, it could go in rte_ethdev.h. > > Probably rte_ether.h? Ok, I spoke to Ivan and Thomas off-list. I propose to add the following definition in rte_ether.h : #define ETHER_MIN_MTU 68 /**< Minimum MTU for IPv4 packets, see RFC 791. */ What do you think of this ? -- David Marchand