From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id EA61A374C for ; Wed, 27 Apr 2016 13:43:55 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id e201so34808053wme.0 for ; Wed, 27 Apr 2016 04:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=tq3z7ieDQuSxnxuqUvc1QO0AJsymyabyUzV4FGSN9H4=; b=C6/f/tVeHUH4/8IKuU2d5slg7g0gpEouvz4KEHvXSqze2S6Wo3+tqpcKb018CWVKCf ZmU+RaNO7JI7ESg++LDI3+ArX4CQ8i3W1k66eNM0Ha4SEt06LRRQQamSg0BO9wPUVypf +6JflzcRNv51np1vNue1XChbH1ijgQo1g9GZldD6DYE6VcbfWk1EaTFD/4gziPkNRo4u qO5/W1Jvt/iGmDlfece7eGkMyOX6g+bTWnKIGLwUlgf2TUUT20m/AyBzerDWosVMEC2W HNZaX0991uNBP1w16oou1aCjzTGKZNmxs5iTbd2r/+fJno5+9KOK1ME1vSExY+9HCJ6Q jhHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=tq3z7ieDQuSxnxuqUvc1QO0AJsymyabyUzV4FGSN9H4=; b=hPcKGLLfzkkdFTTzkfk1Biv7pDpQQTRxGJY7vO/VLFCDnygPEfTwGUDdptzdzL//b+ 6h1dlFI35fXulT6IjWe0PKde8H6TjQrzsx7tlCwkbYca4WaILJSCxaNCWIPH8T7nRWOz CeA7RsexFUswg6VZS95hmeXgJIj1e1Rp/cBYAKNMuKtBDgQtCApXVk/pjphG8SUTAd/H J/riwjcutIfpGVVwN6QtdTcSLARv4hgWWMMr7c1cmFEGjxSrLB3WxdOgmTl5ImKTWhfc LmzLSbaq9peTJhyr6s8VetcFRU1otGxGTyhRCCoT1leUeINRleEzOuZL/MLAAmBul+DW ujyQ== X-Gm-Message-State: AOPr4FUob9MJlv4hXOhSv25GpeDSWeMYdnC6mhKdcxZ7CtHISBeGmE6RHVBD+3KMfaCCOg6k X-Received: by 10.28.13.141 with SMTP id 135mr25514822wmn.12.1461757435738; Wed, 27 Apr 2016 04:43:55 -0700 (PDT) Received: from [10.16.0.205] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id f8sm3650657wjm.13.2016.04.27.04.43.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 04:43:55 -0700 (PDT) To: Beilei Xing , jingjing.wu@intel.com References: <1461410769-16942-1-git-send-email-beilei.xing@intel.com> Cc: dev@dpdk.org From: Julien Meunier Message-ID: <5720A5EF.7000206@6wind.com> Date: Wed, 27 Apr 2016 13:43:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <1461410769-16942-1-git-send-email-beilei.xing@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] i40e: configure MTU 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: Wed, 27 Apr 2016 11:43:56 -0000 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