Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756231AbbLAN4L (ORCPT ); Tue, 1 Dec 2015 08:56:11 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35194 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754336AbbLAN4J (ORCPT ); Tue, 1 Dec 2015 08:56:09 -0500 Subject: Re: [PATCH V4 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS To: Yuval Mintz , 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" , "xuwei5@hisilicon.com" , "lisheng011@huawei.com" , "devicetree@vger.kernel.org" , linux-kernel , "linux-arm-kernel@lists.infradead.org" , netdev , "linuxarm@huawei.com" References: <1448048952-146714-1-git-send-email-salil.mehta@huawei.com> <1448048952-146714-5-git-send-email-salil.mehta@huawei.com> From: Salil Mehta Message-ID: <565DA6F5.7040804@gmail.com> Date: Tue, 1 Dec 2015 13:56:05 +0000 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1406 Lines: 41 On 22/11/15 11:17, Yuval Mintz wrote: >> +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? Hi Yuval, I some how missed to reply this, though I worked on your suggestions in the already floated V5 patch earlier. Sorry for this! There could be a case where the feature is supported by the SoC and therefore it is already part of the 'hw_features' but it has been say DISABLED or ENABLED by ethtool. In such a case, we need to make sure we strike off that feature from the 'features' flag. Therefore, we need this leg I suppose. Let me know If I am missing something here or there is a gap in my understanding. Thanks Salil -- 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/