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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D03BC3A5A2 for ; Sun, 22 Sep 2019 05:09:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4407F20830 for ; Sun, 22 Sep 2019 05:09:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727477AbfIVFJN (ORCPT ); Sun, 22 Sep 2019 01:09:13 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:49778 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726528AbfIVFJM (ORCPT ); Sun, 22 Sep 2019 01:09:12 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6BD0CFC1606C4BAC71CC; Sun, 22 Sep 2019 13:09:09 +0800 (CST) Received: from [127.0.0.1] (10.177.96.96) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Sun, 22 Sep 2019 13:09:06 +0800 Subject: Re: [PATCH net] net: ena: Add dependency for ENA_ETHERNET To: Jakub Kicinski CC: , , , , , , , =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= References: <20190920084405.140750-1-maowenan@huawei.com> <20190921200741.1c3289e8@cakuba.netronome.com> From: maowenan Message-ID: <256c3d2c-e900-8182-48e4-fb1cfcb53a74@huawei.com> Date: Sun, 22 Sep 2019 13:08:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <20190921200741.1c3289e8@cakuba.netronome.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.96] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019/9/22 11:07, Jakub Kicinski wrote: > On Fri, 20 Sep 2019 16:44:05 +0800, Mao Wenan wrote: >> If CONFIG_ENA_ETHERNET=y and CONFIG_DIMLIB=n, >> below erros can be found: >> drivers/net/ethernet/amazon/ena/ena_netdev.o: In function `ena_dim_work': >> ena_netdev.c:(.text+0x21cc): undefined reference to `net_dim_get_rx_moderation' >> ena_netdev.c:(.text+0x21cc): relocation truncated to >> fit: R_AARCH64_CALL26 against undefined symbol `net_dim_get_rx_moderation' >> drivers/net/ethernet/amazon/ena/ena_netdev.o: In function `ena_io_poll': >> ena_netdev.c:(.text+0x7bd4): undefined reference to `net_dim' >> ena_netdev.c:(.text+0x7bd4): relocation truncated to fit: >> R_AARCH64_CALL26 against undefined symbol `net_dim' >> >> After commit 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive >> interrupt moderation"), it introduces dim algorithm, which configured by CONFIG_DIMLIB. >> >> Fixes: 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation") >> Signed-off-by: Mao Wenan > > Thank you Mao, shortly after you posted your patch Uwe proposed to make > DIMLIB a hidden symbol: > > https://lore.kernel.org/netdev/a85be675-ce56-f7ba-29e9-b749073aab6c@kleine-koenig.org/T/#t > > That patch will likely be applied soon, could you please rework your > patch to use the "select" keyword instead of "depends". That's what > other users do. Ok, I will send v2. > >> diff --git a/drivers/net/ethernet/amazon/Kconfig b/drivers/net/ethernet/amazon/Kconfig >> index 69ca99d..fe46df4 100644 >> --- a/drivers/net/ethernet/amazon/Kconfig >> +++ b/drivers/net/ethernet/amazon/Kconfig >> @@ -18,7 +18,7 @@ if NET_VENDOR_AMAZON >> >> config ENA_ETHERNET >> tristate "Elastic Network Adapter (ENA) support" >> - depends on PCI_MSI && !CPU_BIG_ENDIAN >> + depends on PCI_MSI && !CPU_BIG_ENDIAN && DIMLIB >> ---help--- >> This driver supports Elastic Network Adapter (ENA)" >> > > > . >