From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 2/2] virtio: allow running w/o vlan filtering Date: Wed, 29 Jul 2015 14:56:45 +0200 Message-ID: <205454145.ebl7zG6qks@xps13> References: <1425602726-26538-1-git-send-email-stephen@networkplumber.org> <20150306082436.43415409@urahara> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Ouyang, Changchun" Return-path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id 90358CF9 for ; Wed, 29 Jul 2015 14:58:00 +0200 (CEST) Received: by wicgb10 with SMTP id gb10so199443152wic.1 for ; Wed, 29 Jul 2015 05:58:00 -0700 (PDT) In-Reply-To: <20150306082436.43415409@urahara> 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" Back on this old patch, it seems justified but nobody agreed. --- a/lib/librte_pmd_virtio/virtio_ethdev.c +++ b/lib/librte_pmd_virtio/virtio_ethdev.c @@ -1288,7 +1288,6 @@ virtio_dev_configure(struct rte_eth_dev *dev) && !vtpci_with_feature(hw, VIRTIO_NET_F_CTRL_VLAN)) { PMD_DRV_LOG(NOTICE, "vlan filtering not available on this host"); - return -ENOTSUP; } 2015-03-06 08:24, Stephen Hemminger: > "Ouyang, Changchun" wrote: > > > From: Stephen Hemminger > > > Vlan filtering is an option, and not a requirement. > > > If host does not support filtering then it can be done in software. > > > > The question is that guest only send command, no real action to do the vlan filter. > > So if both host and guest have no real action for vlan filter, who will do it? > > The virtio driver has features. > Guest can not send commands to host where feature bit not enabled. > Application can call filter_set and check if filter worked or not. > > Our code already had to do MAC and VLAN validation of incoming packets > therefore if hardware can't do vlan match, there is no problem. > I would expect other applications would do the same thing. > > Failing during configuration is bad. DPDK API should never force > application to play "guess the working configuration" with the device > driver or do string match on "which device is this anyway"