From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f181.google.com (mail-it1-f181.google.com [209.85.166.181]) by dpdk.org (Postfix) with ESMTP id 0DC961B72B for ; Mon, 17 Dec 2018 16:48:02 +0100 (CET) Received: by mail-it1-f181.google.com with SMTP id z7so19219821iti.0 for ; Mon, 17 Dec 2018 07:48:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=HrJW1nkiCvtlivP3ajmGIdm0v7YG8UPERoCyu1ujPnw=; b=P+g3yunlRNBfeDk+7DqajH7tMlXM2dCRK+HE3xdQfJl4me1JpHUsIuAakxoKJk5mau y93MvwuKcXLy4E0erTbkAbN61S0BuE6Jayy47eWu+2sUt6anTGj1DNSTpDWDL14Q2S0Q 1vn+2qoUJpjwaUmpZZRvafHGzQV/s7zhP3Zi5A6OsxVqeEdvIurvX6aUEXxTv8nJgrXI pW170LecXd6EOuZ+jnnBxNyDEoDB4fPC/RC0bHsML6JOPXk+APSjNpMB9Hdaqh+B8WA/ SNe/S78VvE/iaTgXvLt1bCVoC9HftTG1CybjbosDqC77fOEhuFGHb+Sy2/yJLS1SGCCb gMTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=HrJW1nkiCvtlivP3ajmGIdm0v7YG8UPERoCyu1ujPnw=; b=j9TFbWeqFel1jbOConKIhykUVB3MbcL3aS60GV0AbEsiG4lp794+9fIovaVtjqGNqQ Il39Jx7UIcaZwFz7WZGD7dHa5H/20fpgezz7ZU3sjAjBZ4ynj30FCODedv+ASMAEnJBd gTQFnpikgT+ezkC/WH1jCyTi0p78L0Zvk4IxLqtq4TcCKjoOMivODBa2ivgHwEag1I4R PYXzbqGJWHacH7N18p+WyZTiB8ir9I6e/XYItCHtO1bKOTne8ZW+08EbPVo1eP0qi7bm wSTh72txhuyCmR6+onwopEUcchZAozsiSMiMV5bh2DbiqLE6D023tH4uOQ6Cw/mDLK/2 LH3Q== X-Gm-Message-State: AA+aEWZ5tuduTnlsmMEvM6aqLCv5UHY7OWB7LGs/PqplwiALFmk6XNMm u4QokMWNl7KD3Xwm23r6xpjJXfSAGooXnaHXwrcqIg== X-Google-Smtp-Source: AFSGD/WwtkjMQH2ckQ25XQA6TtNu5Ot3eePq/oxiN5e3KN5DL5E+d0tvdpXgrlFZW3FjFY+OUbrOgo4J2W1nRHcoKks= X-Received: by 2002:a02:4511:: with SMTP id y17mr12057192jaa.56.1545061681139; Mon, 17 Dec 2018 07:48:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Min Tang Date: Mon, 17 Dec 2018 10:47:49 -0500 Message-ID: To: dev@dpdk.org, qi.z.zhang@intel.com, beilei.xing@intel.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] net/i40e: VF with vlan ID set from host does not work X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2018 15:48:02 -0000 More information: the i40e driver on host (ubuntu16.04) was 2.2.4, but I tried the latest 2.7.26 i40e driver and it had the same problem. DPDK 17.05 was running in a linux VM, but I don't think the latest DPDK has solved the problem. It's easy to reproduce. On Fri, Dec 14, 2018 at 4:28 PM Min Tang wrote: > Hi All: > > When vlan ID was set on a VF from host by "ip link set vf vlan > ", other VF with the same ID could not ping it. Packet capturing > showed that it could receive packets but it failed to send packet. There > was no such issue with linux driver. I understand that it needs vlan > stripping/insertion to work: PF strips vlan tag when sending packet to VF > and insert vlan tag for packets received from VF. It looked like that vlan > insertion did not work although vlan stripping worked fine. > > The problem was caused by vlan stripping enabling in i40evf_init_vlan. It > worked after I made the following change. To make port vlan work, we have > to enable vlan stripping, but I don't know why enabling vlan stripping > makes vlan insertion fail. The ixgbe driver does not have the issue. > > Index: git/drivers/net/i40e/i40e_ethdev_vf.c > =================================================================== > --- git.orig/drivers/net/i40e/i40e_ethdev_vf.c > +++ git/drivers/net/i40e/i40e_ethdev_vf.c > > @@ -1633,9 +1632,6 @@ i40evf_init_vlan(struct rte_eth_dev *dev > struct rte_eth_dev_data *data = dev->data; > int ret; > > - /* Apply vlan offload setting */ > - i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK); > - > /* Apply pvid setting */ > ret = i40evf_vlan_pvid_set(dev, data->dev_conf.txmode.pvid, > data->dev_conf.txmode.hw_vlan_insert_pvid); > >