From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v6] net/virtio: add set_mtu in virtio Date: Thu, 22 Sep 2016 08:57:59 -0700 Message-ID: <20160922085759.5f7dea04@xeon-e3> References: <20160921231147.26820-1-sodey@sonusnet.com> <20160921162213.4b79d1ce@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "mark.b.kavanagh@intel.com" , "yuanhan.liu@linux.intel.com" , "dev@dpdk.org" To: "Dey, Souvik" Return-path: Received: from mail-pf0-f177.google.com (mail-pf0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id 561ED5585 for ; Thu, 22 Sep 2016 17:57:51 +0200 (CEST) Received: by mail-pf0-f177.google.com with SMTP id q2so31870710pfj.3 for ; Thu, 22 Sep 2016 08:57:51 -0700 (PDT) In-Reply-To: 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 Thu, 22 Sep 2016 00:08:38 +0000 "Dey, Souvik" wrote: > I am fine with the general idea of this patch but: > 1. Calling virtio_dev_info_get is needlessly wasteful when all you want > is to access the max packet length. Since max_rx_pktlen is always > VIRTIO_MAX_RX_PKTLEN, please just use that. > [Dey, Souvik] I am using the virtio_dev_info_get as in future can/may support the max_rx_pktlen as a variable to be set by the application. This will keep the changes future proof. As we need to support till 65535 instead of 9728 as the linux does. Future proof is a myth. Don't add code based on planned future functionality http://www.extremeprogramming.org/rules/early.html