All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Shannon Nelson <snelson@pensando.io>, Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, drivers@pensando.io,
	Allen Hubbe <allenbh@pensando.io>
Subject: Re: [PATCH v3 net] ionic: fix ptp support config breakage
Date: Thu, 6 May 2021 18:16:49 -0700	[thread overview]
Message-ID: <4f3f61ad-08dd-0bba-bd8e-8cb16b466012@infradead.org> (raw)
In-Reply-To: <4e831e77-0688-f3a9-1202-76f88230c7a8@infradead.org>

On 5/6/21 6:12 PM, Randy Dunlap wrote:
> On 5/6/21 5:48 PM, Shannon Nelson wrote:
>> On 5/6/21 5:21 PM, Randy Dunlap wrote:
>>> On 5/6/21 5:15 PM, Jakub Kicinski wrote:
>>>> On Wed,  5 May 2021 21:18:46 -0700 Shannon Nelson wrote:
>>>>> Driver link failed with undefined references in some
>>>>> kernel config variations.
>>>> This is really vague and the patch is not very obvious.
>>>>
>>>>>   ionic-y := ionic_main.o ionic_bus_pci.o ionic_devlink.o ionic_dev.o \
>>>>>          ionic_debugfs.o ionic_lif.o ionic_rx_filter.o ionic_ethtool.o \
>>>>> -       ionic_txrx.o ionic_stats.o ionic_fw.o
>>>>> -ionic-$(CONFIG_PTP_1588_CLOCK) += ionic_phc.o
>>>>> +       ionic_txrx.o ionic_stats.o ionic_fw.o ionic_phc.o
>>>> So we'd replace a build dependency..
>>>>
>>>>> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_phc.c b/drivers/net/ethernet/pensando/ionic/ionic_phc.c
>>>>> index a87c87e86aef..30c78808c45a 100644
>>>>> --- a/drivers/net/ethernet/pensando/ionic/ionic_phc.c
>>>>> +++ b/drivers/net/ethernet/pensando/ionic/ionic_phc.c
>>>>> @@ -1,6 +1,8 @@
>>>>>   // SPDX-License-Identifier: GPL-2.0
>>>>>   /* Copyright(c) 2017 - 2021 Pensando Systems, Inc */
>>>>>   +#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
>>>>> +
>>>>>   #include <linux/netdevice.h>
>>>>>   #include <linux/etherdevice.h>
>>>>>   @@ -613,3 +615,4 @@ void ionic_lif_free_phc(struct ionic_lif *lif)
>>>>>       devm_kfree(lif->ionic->dev, lif->phc);
>>>>>       lif->phc = NULL;
>>>>>   }
>>>>> +#endif /* IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
>>>> .. with an ifdef around an entire file? Does not feel very clean.
>>>>
>>>> The construct of using:
>>>>
>>>>     drv-$(CONFIG_PTP_1588_CLOCK) += ptp.o
>>>>
>>>> seems relatively common, why does it now work here?
>>>>
>>>> Maybe the config in question has PTP as a module and ionic built in?
>>>> Then you should add depends on PTP_1588_CLOCK || !PTP_1588_CLOCK.
>>>>
>>>> Maybe somehow the "ionic-y" confuses kbuild and it should be ionic-objs?
>>>>
>>>> At the very least we need a better explanation in the commit message.
>>>>
>>> I'll take a look if someone can point me to the .config file.
>>>
>>
>> These are the notes I got from kernel test robot:
>> https://lore.kernel.org/lkml/202105041020.efEaBOYC-lkp@intel.com/
>> https://lore.kernel.org/lkml/202105041154.GrLZmjGh-lkp@intel.com/
>> https://lore.kernel.org/lkml/202105041634.paURyDp0-lkp@intel.com/
>> https://lore.kernel.org/lkml/202105050636.UXXDl7m2-lkp@intel.com/
> 
> At first glance it looks like Jakub's suggestion of
>>>> Maybe the config in question has PTP as a module and ionic built in?
>>>> Then you should add depends on PTP_1588_CLOCK || !PTP_1588_CLOCK.
> 
> is what is needed, but I'm still doing build testing ATM.

Nope, eat my words. These build issues are not about PTP.
I'm still looking.

-- 
~Randy


  reply	other threads:[~2021-05-07  1:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06  4:18 [PATCH v3 net] ionic: fix ptp support config breakage Shannon Nelson
2021-05-07  0:15 ` Jakub Kicinski
2021-05-07  0:21   ` Randy Dunlap
2021-05-07  0:48     ` Shannon Nelson
2021-05-07  1:12       ` Randy Dunlap
2021-05-07  1:16         ` Randy Dunlap [this message]
2021-05-07  1:30           ` Randy Dunlap
2021-05-07  3:26             ` Shannon Nelson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f3f61ad-08dd-0bba-bd8e-8cb16b466012@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=allenbh@pensando.io \
    --cc=davem@davemloft.net \
    --cc=drivers@pensando.io \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=snelson@pensando.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.