Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751837AbbKVLRV (ORCPT ); Sun, 22 Nov 2015 06:17:21 -0500 Received: from mail-bn1on0144.outbound.protection.outlook.com ([157.56.110.144]:16224 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751229AbbKVLRT convert rfc822-to-8bit (ORCPT ); Sun, 22 Nov 2015 06:17:19 -0500 From: Yuval Mintz To: Salil Mehta , David Miller , "robh+dt@kernel.org" , "pawel.moll@arm.com" , "mark.rutland@arm.com" , "paul.gortmaker@windriver.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "arnd@arndb.de" , "liguozhu@hisilicon.com" , "yisen.zhuang@huawei.com" , "dingtianhong@huawei.com" , "zhangfei.gao@linaro.org" , "huangdaode@hisilicon.com" , "kenneth-lee-2012@foxmail.com" , "mehta.salil.lnk@gmail.com" , "xuwei5@hisilicon.com" , "lisheng011@huawei.com" , "devicetree@vger.kernel.org" , linux-kernel , "linux-arm-kernel@lists.infradead.org" , netdev , "linuxarm@huawei.com" Subject: RE: [PATCH V4 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS Thread-Topic: [PATCH V4 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS Thread-Index: AQHRI8q+/86f2jNjOEOKhpIJ6D1V/J6n5lJQ Date: Sun, 22 Nov 2015 11:17:13 +0000 Message-ID: References: <1448048952-146714-1-git-send-email-salil.mehta@huawei.com> <1448048952-146714-5-git-send-email-salil.mehta@huawei.com> In-Reply-To: <1448048952-146714-5-git-send-email-salil.mehta@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuval.Mintz@qlogic.com; x-originating-ip: [31.168.140.228] x-microsoft-exchange-diagnostics: 1;CO2PR11MB0088;5:8i5YEZZTaQKb9DrowPVcMjl6RD/QUbzktP1GoyDrRQOVqSqWiSBCdr1w7X9Pk7r6sfy1S9FxfpCuI0akqVIjVCDJpxvwTB9GMqtw+pYRtTS6TRMu60mAk9qS16cnv8dBzb1qj74ENB8DiIyeVVMuBw==;24:GFB8MVwVeiGWXZUFvR8WPOEEoFIhbt9Qgb1oC/fioZ+Z5x8COHaoeNef+fwVO8+wWsimxWuK5sSxYmNYeZhOFwnzhUdU8Qz3FKk6eH3j7Rk=;20:U99RvpEVRukp/5u0NHkBhwvk0jo6FntQyu6PeNaKYCVAaB1wDBJiLRCc25zRd9QBPm0W+4pzq/oE0Ovt/IgNaCZEiNl0ASOuSOMbZzIoObpW9lHZ3bG23YVbrkoP3GKSuVFPiHmepPApgWoKDOjKrYDlGG4OLiGM0q9VCITDnEI= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR11MB0088; x-ld-processed: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001);SRVR:CO2PR11MB0088;BCL:0;PCL:0;RULEID:;SRVR:CO2PR11MB0088; x-forefront-prvs: 076804FE30 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(199003)(189002)(586003)(5007970100001)(74316001)(77096005)(92566002)(2950100001)(2900100001)(11100500001)(66066001)(6116002)(3846002)(40100003)(102836003)(76576001)(5008740100001)(87936001)(10400500002)(5004730100002)(2501003)(189998001)(122556002)(50986999)(81156007)(5001960100002)(5001770100001)(101416001)(105586002)(106116001)(99286002)(76176999)(107886002)(86362001)(54356999)(5003600100002)(2201001)(97736004)(106356001)(5002640100001)(5001920100001)(33656002)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:CO2PR11MB0088;H:CO2PR11MB0088.namprd11.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: qlogic.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2015 11:17:13.1274 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR11MB0088 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 812 Lines: 24 > +static netdev_features_t hns_nic_fix_features( > + struct net_device *netdev, netdev_features_t features) { > + struct hns_nic_priv *priv = netdev_priv(netdev); > + > + switch (priv->enet_ver) { > + case AE_VERSION_1: > + features &= ~(NETIF_F_TSO | NETIF_F_TSO6 | > + NETIF_F_HW_VLAN_CTAG_FILTER); > + break; > + default: > + break; > + } > + return features; > +} > + Isn't AE_VERSION_1 something fixed once you publish your features? If it can't be changed, why not simply remove the features from `hw_features' instead of having to implement this ndo? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/