From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BDFCA0C41; Wed, 15 Sep 2021 16:52:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35C334118E; Wed, 15 Sep 2021 16:52:10 +0200 (CEST) Received: from FRA01-MR2-obe.outbound.protection.outlook.com (mail-eopbgr90114.outbound.protection.outlook.com [40.107.9.114]) by mails.dpdk.org (Postfix) with ESMTP id 339324118D for ; Wed, 15 Sep 2021 16:52:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bIgMeGxqmOldIfEeMxEwRAhdV5paOK1xZGkTS7AhTLFV54SxeaV/2AP/mQrhjkrUfGGph/vdJUOFm86wbiRaiNSYB5IhbUMihLdvpSS1TI/6NtbCoN2m+oWe8oqLFv3hCtelfnoiEs2YTPTVsHdlS+qcHb7cFXMg4eqbpUYfkfnMKWHR8xLHUmv53ACziqkyemT/UnRJatSJTMMkxgJvrCQwqM+ofBWX7x3JCqB6oZdV9GiQ55tGLrr+60AwGhiBPlt/vEEgTXhQjhGzW9CrMNSK4VXgAEnbIKMrOvDHwj2nBJ4fFJAPq7O2N7Y3/lqnxDzJIOKQiivmR6A+BwWwlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+joD0F6k31fjr/Rr12rz/VpoZSDKRACPnSco/ly1FVY=; b=VDMBzTBjiwD22Iij6GO2sAlJ1+RMM7Rl9WgL2DZFBXKPQjw7ZKjZBESuuolQvZxGs4y5WKUcO0Fo3J+wiDKER4idGmg8metK4h1KPWxtFhPIIPYMHEH7vSV7ynw7cRBocHMO0qvCDX2/Y8P/1mbwcgwKY59I5xLeO68sAi9ObvIMDU5uHQQ93mbEveVODZ4B9VVp/h8kow4R3Lnqb9HBtlT0wM+fD5x29Unggb6I3IcxlFUvsMs22E2/kS3ds5nDQLQCad19WyRaPm+CKskk71fBoHkLkE96jBrCK9MlFq/IEzfGRj6qXblz7F5akTQ9KE72etG3q+GB1URgEBaNKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ekinops.com; dmarc=pass action=none header.from=ekinops.com; dkim=pass header.d=ekinops.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ekinops.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+joD0F6k31fjr/Rr12rz/VpoZSDKRACPnSco/ly1FVY=; b=MBCq7FaRbn/tcASIPWRYmppuxkNwIhjmIfNUbUVzN8LfJLAZZ5By4WwJMzYamKueqBzB3F78dQLT6X+MzuwN8T1IHwW0MH4tUrWuPCT2ebRsce6QvdWzrCpye51XI2SBrTPqIb64WCkIt0wJKAXVwZY2CG+ISlL63I5mDmhGupY= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=ekinops.com; Received: from MRZP264MB2442.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:7::10) by MRXP264MB0855.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:25::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Wed, 15 Sep 2021 14:52:07 +0000 Received: from MRZP264MB2442.FRAP264.PROD.OUTLOOK.COM ([fe80::3d14:d199:58af:5008]) by MRZP264MB2442.FRAP264.PROD.OUTLOOK.COM ([fe80::3d14:d199:58af:5008%6]) with mapi id 15.20.4523.014; Wed, 15 Sep 2021 14:52:07 +0000 From: Renata Saiakhova To: Haiyue Wang Cc: dev@dpdk.org, Renata Saiakhova Date: Wed, 15 Sep 2021 16:51:52 +0200 Message-Id: <20210915145152.17600-2-Renata.Saiakhova@ekinops.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20210915145152.17600-1-Renata.Saiakhova@ekinops.com> References: <20210915145152.17600-1-Renata.Saiakhova@ekinops.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PR3P189CA0045.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:53::20) To MRZP264MB2442.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:7::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from renataOAB.oneaccess.intra (91.183.184.98) by PR3P189CA0045.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:53::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Wed, 15 Sep 2021 14:52:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab65e7f6-c365-4a49-e268-08d97858638d X-MS-TrafficTypeDiagnostic: MRXP264MB0855: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WF2I5/CgTAuARFCV8456VrCCr5jAMij1OBHfzXIYegr2J0G71PUo7yqeqO/id7YLex5sgK8d8qNw7/kNwQMSLA8+2aOj0qtdsVIR6z7GAI36pUfCjyyPYJSuIbSH+rHlPX4jMUg5NiumTSJGKDVi6J50jceB2/Nr9/uKxXnL+pFwFBIy/5JjtX3C+6FGPB2Kk+ocFRIyazAnaZe2Bkru+K26TpHagn9IwLGDdP78js0Ndx7uovcAWR3eGoRs94GEdNEmaDqTPmbppWRXW4CyO81pHiP2sgUXFIBlfltoAgBPdMtcP3fNGPc0F42vXiphd+90XnBLMYf9BhSzYENVP7lFolTuSi1RCjBW1vdUUDZYwE5I1DDOnTQcETDrwDtLZd2IHai8UB747AYoDIJwVH2lT0LSIUfIhlUUeFu/3YOjHOpUDSO6jnhUQo6oKZ5om50btIdsF9dwNWdFv6vOqn1WCmLKeCcS6tpMdHI9klqTjz85PAvzt2cKO2jasht1T/qjrElS3HU3HCIn90dSP7WzTfZdS6a+oIW6Oa/dS+qvG06F4NYkXFHZgFBs21ZHYBeW0GLdqFlXxyQocTBVHXafTZOxxYVtmgU+hpwq/mfrpop1aX+9u062qL/nNKkCvYJB1sUBckyr+aiM7aKT2tJs96QhCl0RmHF5pCywvyPutVx1YowX3E9vF3lfZCmlI3rCHjkb9XPMfIaSvhmcng== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MRZP264MB2442.FRAP264.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(346002)(39850400004)(366004)(136003)(376002)(396003)(5660300002)(86362001)(8936002)(4326008)(6666004)(6506007)(8676002)(956004)(66946007)(316002)(66476007)(66556008)(2616005)(52116002)(38100700002)(6486002)(36756003)(38350700002)(26005)(6916009)(2906002)(1076003)(6512007)(107886003)(186003)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ajVuNUtaRHVteDN4a1pNK0R1dmNWNUlOeW53akVKeHF5aVB4Y2VtNklycUYw?= =?utf-8?B?NmJaTzFwbHMrMmNnckpMZUp4Z3AvSW9tbVNOTHd1YWtSRXdNSWEybFRkSU1p?= =?utf-8?B?OUhPRTk0czdnTE1vVHFEYWRVZHNoRHVMenMzZGdOZHVXNVc2QTdPdXBqM1B1?= =?utf-8?B?bXo1M2p6VldLa3BnOGMxWkIvU2ZMN0pJb0h3YURkZUhFNmZaNFZUc2ovb1dZ?= =?utf-8?B?K1YrSnlENjJpWU8yNjhycWxLMithRkdHVVhtelNPREU2cUZKUWMxSD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zMkxpblB4dDMw?= =?utf-8?B?aStEeEF3QU1uVFordlk0TmNHaXZKcERFMFYwenQ1Zm5SeW5BN0NPdHpvRUha?= =?utf-8?B?ajUrZWdhUTZ1bndVMzh3ZnJGRExwTlRBNGY1VGw2UTlsQktDeCt3b1FoZENQ?= =?utf-8?B?cW80bVhoREhZRUozdUpQLzhpa3F2UU5zUUZRTTQyeHh6UEdKck5Kc3pJeDcx?= =?utf-8?B?R1dEWmREMXhnTjVUWm8yOUl6NlRsZS8zcTNBTEl0aU1Kam9rU1hEVzJyQUVx?= =?utf-8?B?eDhxZFIrT1dsbWdzT1ZUdkMrR3Z1OVpNWXA5YVVURUQxM2tSNjduYWlYa2ZS?= =?utf-8?B?MjhlaEF3TWZLYUV4NDl5WFlLYlg2QnhDdFd6ZFZFdFkwQjJFUmtoemtveVVT?= =?utf-8?B?ZVJMNmpvcVFKZ2R3VDArVHdITnlWYWFnejQyeFNlenZ2QnkybTdzcVBBWER0?= =?utf-8?B?bmVqSjZkUFRuczhzWlAwRUFtN0l1R05ZVGpNV3ZrK3gyUWhSOG4zYi9QOHRF?= =?utf-8?B?aFFvNCtDQVNsWkR5V2xsVWhKWVE5WUZ6bXhJbXQxSktNaGdHNGFjeWRtRi9l?= =?utf-8?Q?C8Er0glPNjBxmNqdHpg0nXEhwaxf8l/wfj0gyHe?= X-OriginatorOrg: ekinops.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab65e7f6-c365-4a49-e268-08d97858638d X-MS-Exchange-CrossTenant-AuthSource: MRZP264MB2442.FRAP264.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2021 14:52:07.3508 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f57b78a6-c654-4771-a72f-837275f46179 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LfqglKmNcsvh1MdZ7UBw7nduMKa0JOHZiULjK6YgTLEy0v0N3aPvuhn2aOZg5q8D0EgJYZit7m2ZRD+0Hll5ibhd2NihFpNFtAv0bUdwyyo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MRXP264MB0855 Subject: [dpdk-dev] [PATCH v2 1/1] net/e1000: igbvf VLAN offload implementation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" igbvf_vlan_offload_config and igbvf_vlan_offload_set primal implementation, setting vlan filter mask at igbvf_dev_start time. Without the above a vlan filter for igbvf is not functional. Signed-off-by: Renata Saiakhova --- drivers/net/e1000/igb_ethdev.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 10ee0f3341..4c8478427c 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -171,6 +171,8 @@ static int eth_igbvf_xstats_get_names(struct rte_eth_dev *dev, static int eth_igbvf_stats_reset(struct rte_eth_dev *dev); static int igbvf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on); +static int igbvf_vlan_offload_config(struct rte_eth_dev *dev, int mask); +static int igbvf_vlan_offload_set(struct rte_eth_dev *dev, int mask); static int igbvf_set_vfta(struct e1000_hw *hw, uint16_t vid, bool on); static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on); static int igbvf_default_mac_addr_set(struct rte_eth_dev *dev, @@ -410,6 +412,7 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .xstats_get_names = eth_igbvf_xstats_get_names, .stats_reset = eth_igbvf_stats_reset, .xstats_reset = eth_igbvf_stats_reset, + .vlan_offload_set = igbvf_vlan_offload_set, .vlan_filter_set = igbvf_vlan_filter_set, .dev_infos_get = eth_igbvf_infos_get, .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, @@ -3304,6 +3307,8 @@ igbvf_dev_start(struct rte_eth_dev *dev) struct rte_intr_handle *intr_handle = &pci_dev->intr_handle; int ret; uint32_t intr_vector = 0; + int mask; + int err; PMD_INIT_FUNC_TRACE(); @@ -3313,6 +3318,14 @@ igbvf_dev_start(struct rte_eth_dev *dev) /* Set all vfta */ igbvf_set_vfta_all(dev,1); + /* Set vlan filter mask */ + mask = ETH_VLAN_FILTER_MASK; + err = igbvf_vlan_offload_config(dev, mask); + if (err) { + PMD_INIT_LOG(ERR, "Unable to set VLAN offload (%d)", err); + return err; + } + eth_igbvf_tx_init(dev); /* This can fail when allocating mbufs for descriptor rings */ @@ -3531,6 +3544,21 @@ static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on) } +static int +igbvf_vlan_offload_config(__rte_unused struct rte_eth_dev *dev, int mask) +{ + if (mask & ETH_VLAN_STRIP_MASK) + return -ENOTSUP; + return 0; +} + +static int +igbvf_vlan_offload_set(struct rte_eth_dev *dev, int mask) +{ + igbvf_vlan_offload_config(dev, mask); + return 0; +} + static int igbvf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on) { -- 2.17.2