From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87A3FC433F5 for ; Tue, 15 Mar 2022 03:27:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238787AbiCOD2N (ORCPT ); Mon, 14 Mar 2022 23:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344706AbiCOD1w (ORCPT ); Mon, 14 Mar 2022 23:27:52 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78F9048E4C for ; Mon, 14 Mar 2022 20:26:39 -0700 (PDT) Received: from kwepemi100023.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KHdyL1Nz7z9sgR; Tue, 15 Mar 2022 11:22:50 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by kwepemi100023.china.huawei.com (7.221.188.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 15 Mar 2022 11:26:37 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 15 Mar 2022 11:26:36 +0800 From: Jie Wang To: , , , CC: , , , , , , , , Subject: [RFC net-next 0/2] add ethtool ops support for fresh device features Date: Tue, 15 Mar 2022 11:21:06 +0800 Message-ID: <20220315032108.57228-1-wangjie125@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600017.china.huawei.com (7.193.23.234) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org As Jakub Kicinski comment in patch: https://lore.kernel.org/netdev/20220125195508.585b0c40@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net/ , there are no ethtool command similar to ethtool -k for features contained entirely to the driver. Fresh device features such as tx push need this kind of command to set/get feature attributes. So this patch adds new ethtool command support for new features belongs to the driver. The second patch adds hns3 support for this new command to configure tx push feature. This command can be easily reused by other features. Comments are welcomed and i'm still testing this command. Jie Wang (2): net: ethtool: add ethtool ability to set/get fresh device features net: hns3: add ethtool set/get device features support for hns3 driver drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + .../ethernet/hisilicon/hns3/hns3_ethtool.c | 77 +++++++++++++++++++ include/linux/ethtool.h | 4 + include/uapi/linux/ethtool.h | 27 +++++++ net/ethtool/ioctl.c | 43 +++++++++++ 5 files changed, 152 insertions(+) -- 2.33.0