From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v3]virtio:add mtu set in virtio Date: Wed, 7 Sep 2016 11:42:52 +0800 Message-ID: <20160907034252.GI23158@yliu-dev.sh.intel.com> References: <20160907032156.34492-1-sodey@sonusnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, stephen@networkplumber.org To: souvikdey33 Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 349A06CCF for ; Wed, 7 Sep 2016 05:42:24 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20160907032156.34492-1-sodey@sonusnet.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Sep 06, 2016 at 11:21:56PM -0400, souvikdey33 wrote: > +static int > +virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) > +{ > + struct virtio_hw *hw = dev->data->dev_private; > + if (mtu < VIRTIO_MIN_RX_BUFSIZE || mtu > VIRTIO_MAX_RX_PKTLEN) { > + PMD_INIT_LOG(ERR, "Mtu should be between 64 and 9728\n"); I forgot to mention in last email, that you should not use the number (64 and 9728) directly, use the MACRO instead. --yliu