From patchwork Fri May 24 22:27:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ariel Levkovich X-Patchwork-Id: 1105190 X-Patchwork-Delegate: davem@davemloft.net 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="o1G/iLPf"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 459gwn3S1qz9s3l for ; Sat, 25 May 2019 08:27:37 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404463AbfEXW1g (ORCPT ); Fri, 24 May 2019 18:27:36 -0400 Received: from mail-eopbgr10071.outbound.protection.outlook.com ([40.107.1.71]:32916 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404421AbfEXW1b (ORCPT ); Fri, 24 May 2019 18:27:31 -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=o1G/iLPfwl82BHhTWEXvf0RC4z5TtIgvZEA6dyKjgO+xYVRnclS7YQ0mlSVbWFHp4xynfqxUmvmneqCTbQdacJnOfCs9yBhoEz6CT/VRRGQVUbrhTVnPWog0giS0hXciNyzMfJXWsAxdqoGtvdLPEqJuWqLEywbbQthQaq69PLM= Received: from VI1PR05MB3328.eurprd05.prod.outlook.com (10.170.238.141) by VI1PR05MB5039.eurprd05.prod.outlook.com (20.177.52.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.16; Fri, 24 May 2019 22:27:24 +0000 Received: from VI1PR05MB3328.eurprd05.prod.outlook.com ([fe80::d054:c1d5:5865:9092]) by VI1PR05MB3328.eurprd05.prod.outlook.com ([fe80::d054:c1d5:5865:9092%4]) with mapi id 15.20.1922.019; Fri, 24 May 2019 22:27:24 +0000 From: Ariel Levkovich To: "netdev@vger.kernel.org" CC: Ariel Levkovich Subject: [PATCH RFC 2/2] net: vlan: Inherit MPLS features from parent device Thread-Topic: [PATCH RFC 2/2] net: vlan: Inherit MPLS features from parent device Thread-Index: AQHVEn/cEOSSiGcu60GqnjvwcH/Kwg== Date: Fri, 24 May 2019 22:27:24 +0000 Message-ID: <1558736809-23258-3-git-send-email-lariel@mellanox.com> References: <1558736809-23258-1-git-send-email-lariel@mellanox.com> In-Reply-To: <1558736809-23258-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: LO2P265CA0457.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::13) To VI1PR05MB3328.eurprd05.prod.outlook.com (2603:10a6:802:1d::13) 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: 6f50d136-479c-4148-b4b9-08d6e096fe8d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600147)(711020)(4605104)(1401326)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR05MB5039; x-ms-traffictypediagnostic: VI1PR05MB5039: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0047BC5ADE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(136003)(366004)(396003)(346002)(199004)(189003)(66556008)(66946007)(66476007)(305945005)(4326008)(76176011)(64756008)(107886003)(66446008)(2501003)(25786009)(4720700003)(5660300002)(86362001)(81156014)(478600001)(8676002)(81166006)(386003)(102836004)(1730700003)(186003)(2906002)(14444005)(26005)(50226002)(316002)(6506007)(14454004)(8936002)(256004)(6486002)(6436002)(476003)(36756003)(53936002)(7736002)(2616005)(71190400001)(73956011)(5640700003)(71200400001)(99286004)(446003)(11346002)(3846002)(68736007)(6512007)(6116002)(6916009)(2351001)(486006)(66066001)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB5039; H:VI1PR05MB3328.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: q3huX3PBe/PhscEPE3y+L0QilIseyZZzohdeEG6LaCjLQic5i8mq2HvWwEjrYQyWwyxcQkLR+LhxV+woyzjUpe0sSJir0lbw/jpjxdQEYxQg0sWM+vcWRb3X9kljwY6/lhwxe+sICHe8THHA34IGG9CNJL1Jnig8aX5nJ56G5ZV5s7KPzRHIKWclKwLduR59200/ng4ISNIV2W3bk5q/4946/U7iwe1EfMGDpOuq2+NZiq/uMmpzQDVda8kmhNr526pQxbOeJf+ura2U7mECZ5r1PWEVJdhYi8zo5ANhWssJfU4Qciwc6q2DY+IjTR6ugbUf8tiCXR85v+czRMrl9n/uNHAhxf5BD+gyITBjJBeRMIOnJnuLeNSQ0QkfTF/XssW1QkAVaBTCSZ1yamKg+FlyTYq5mzcVJdnpNvTs8S8= MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f50d136-479c-4148-b4b9-08d6e096fe8d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2019 22:27:24.3677 (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: VI1PR05MB5039 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;