From patchwork Mon Jun 3 22:36:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariel Levkovich X-Patchwork-Id: 1109543 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="SwCJwaFR"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45Hqfy1DXyz9s5c for ; Tue, 4 Jun 2019 08:36:58 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbfFCWg4 (ORCPT ); Mon, 3 Jun 2019 18:36:56 -0400 Received: from mail-eopbgr70070.outbound.protection.outlook.com ([40.107.7.70]:6068 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726463AbfFCWgy (ORCPT ); Mon, 3 Jun 2019 18:36:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vHTpNX/9HtwuZ2OPp+C+3MdRhI8Sb79JfX2p81AA7t0=; b=SwCJwaFR1HTk3wia2bmU/iO4zb+NT/byWTlzxhe48rmaGHnf+f6xLgYhQjzZW43DpvZsGaTQ90WQ7YGTBlrtj5i95fyXfycFNw5Yq4oROOY6JRBB1tl+lpJYTbsTM7DcI/woAM9uK7CPch4oqaQ6mv3EYZKbl3vQ+5bKimyOTgs= Received: from AM4PR05MB3313.eurprd05.prod.outlook.com (10.171.189.29) by AM4PR05MB3250.eurprd05.prod.outlook.com (10.170.126.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.18; Mon, 3 Jun 2019 22:36:47 +0000 Received: from AM4PR05MB3313.eurprd05.prod.outlook.com ([fe80::55c3:8aaf:20f6:5899]) by AM4PR05MB3313.eurprd05.prod.outlook.com ([fe80::55c3:8aaf:20f6:5899%5]) with mapi id 15.20.1922.021; Mon, 3 Jun 2019 22:36:47 +0000 From: Ariel Levkovich To: "netdev@vger.kernel.org" CC: Ariel Levkovich Subject: [PATCH net-next 2/2] net: vlan: Inherit MPLS features from parent device Thread-Topic: [PATCH net-next 2/2] net: vlan: Inherit MPLS features from parent device Thread-Index: AQHVGlzT2OnZmiBtIk6HdG4jK+ELag== Date: Mon, 3 Jun 2019 22:36:47 +0000 Message-ID: <1559601394-5363-3-git-send-email-lariel@mellanox.com> References: <1559601394-5363-1-git-send-email-lariel@mellanox.com> In-Reply-To: <1559601394-5363-1-git-send-email-lariel@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [141.226.120.58] x-mailer: git-send-email 1.8.3.1 x-clientproxiedby: LO2P265CA0106.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::22) To AM4PR05MB3313.eurprd05.prod.outlook.com (2603:10a6:205:9::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=lariel@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7233167b-378c-4533-56b5-08d6e873f62d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM4PR05MB3250; x-ms-traffictypediagnostic: AM4PR05MB3250: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0057EE387C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(39860400002)(346002)(376002)(189003)(199004)(14454004)(86362001)(3846002)(256004)(186003)(6116002)(2501003)(4720700003)(99286004)(4326008)(107886003)(2351001)(25786009)(66476007)(26005)(386003)(6506007)(11346002)(6916009)(52116002)(36756003)(446003)(71200400001)(76176011)(71190400001)(316002)(305945005)(508600001)(66066001)(486006)(5640700003)(14444005)(2616005)(68736007)(476003)(81166006)(73956011)(8676002)(1730700003)(81156014)(6512007)(8936002)(2906002)(7736002)(5660300002)(66446008)(64756008)(66556008)(6436002)(50226002)(66946007)(102836004)(53936002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3250; H:AM4PR05MB3313.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: knH1+inQn6LRkX7UMzuvIt5gGfXrEg+RuqSsLNiv579For3V3JJNo7D8MGfysGsNQF0Y6FCV763Yw3lrzMxhSEXL3xYQwn76Z+ez1bl3PS2Ry5AZtFZo2xhZS+EuThSY5DkeZsX2mQ9jOyOPngcA5yPBo0GXDYyd1wN+6vGxTR5WEZ+Y/IqyMYY7kO0RPRaQE0+fcqhyeH5kB8O7R8f1CMcBgiF43hpRwLHVCI2qNFKr6hUAb1ZZZIsTQaq3L4+4NlBDbj1u4i+yOQCfNwKzB8inxwsWMlFgkVYCs+pqwgw0VEOYGb7v9OpiQp5kYRLGBSLUNJVio+N/ZIU5FTMq8qyAwLzn8c2kffOoer92pW1WHIxnxFvCvZg+qo5fTDp+0CqGhnafUAa5iYbIj5Hr8Nttgv3P90un4ZH3EdCDy4E= MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7233167b-378c-4533-56b5-08d6e873f62d X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2019 22:36:47.2291 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lariel@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3250 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org During the creation of the VLAN interface net device, the various device features and offloads are being set based on the parent device's features. The code initiates the basic, vlan and encapsulation features but doesn't address the MPLS features set and they remain blank. As a result, all device offloads that have significant performance effect are disabled for MPLS traffic going via this VLAN device such as checksumming and TSO. This patch makes sure that MPLS features are also set for the VLAN device based on the parent which will allow HW offloads of checksumming and TSO to be performed on MPLS tagged packets. Signed-off-by: Ariel Levkovich --- net/8021q/vlan_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index f044ae5..585e73d 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -582,6 +582,7 @@ static int vlan_dev_init(struct net_device *dev) dev->vlan_features = real_dev->vlan_features & ~NETIF_F_ALL_FCOE; dev->hw_enc_features = vlan_tnl_features(real_dev); + dev->mpls_features = real_dev->mpls_features; /* ipv6 shared card related stuff */ dev->dev_id = real_dev->dev_id;