[dpdk-dev,2/2] virtio: allow running w/o vlan filtering

Message ID 1425602726-26538-3-git-send-email-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Yuanhan Liu
Headers

Commit Message

Stephen Hemminger March 6, 2015, 12:45 a.m. UTC
  Vlan filtering is an option, and not a requirement.
If host does not support filtering then it can be done in software.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_pmd_virtio/virtio_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ouyang Changchun March 6, 2015, 3:39 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen
> Hemminger
> Sent: Friday, March 6, 2015 8:45 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 2/2] virtio: allow running w/o vlan filtering
> 
> 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? 

Thanks
Changchun
  
Stephen Hemminger March 6, 2015, 4:24 p.m. UTC | #2
On Fri, 6 Mar 2015 03:39:47 +0000
"Ouyang, Changchun" <changchun.ouyang@intel.com> wrote:

> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen
> > Hemminger
> > Sent: Friday, March 6, 2015 8:45 AM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH 2/2] virtio: allow running w/o vlan filtering
> > 
> > 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? 
> 
> Thanks
> Changchun
> 
> 

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"
  

Patch

diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index e2600de..5e43411 100644
--- 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;
 	}
 
 	if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)