From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v3 4/9] vhost: Add API to get MTU value Date: Thu, 16 Mar 2017 16:00:59 +0800 Message-ID: <20170316080059.GT18844@yliu-dev.sh.intel.com> References: <20170213142820.8964-1-maxime.coquelin@redhat.com> <20170312163406.17714-1-maxime.coquelin@redhat.com> <20170312163406.17714-5-maxime.coquelin@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: aconole@redhat.com, sodey@sonusnet.com, jianfeng.tan@intel.com, thomas.monjalon@6wind.com, dev@dpdk.org To: Maxime Coquelin Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 159B01396 for ; Thu, 16 Mar 2017 09:02:44 +0100 (CET) Content-Disposition: inline In-Reply-To: <20170312163406.17714-5-maxime.coquelin@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, Mar 12, 2017 at 05:34:01PM +0100, Maxime Coquelin wrote: > This patch implements the function for the application to > get the MTU value. I'm thinking the other way. As we are making vhost being generic, it doesn't make too much sense now to store a net specific value at vhost layer. I'm thinking we may could introduce a vhost-user request handler, something like: rte_vhost_driver_register_msg_handler(socket, handler); All vhost-user message then will goto the driver's sepcific handler. if it's handlered, do nothing in vhost lib. Otherwise, we handle it in vhost lib. In this way, you could handle the mtu message inside vhost-pmd; thus, there is no need to introduce one more (net specific) API. Thoughts? --yliu