linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jiri Pirko <jiri@resnulli.us>, Ivan Vecera <ivecera@redhat.com>,
	linux-omap@vger.kernel.org
Subject: Re: linux-next: Tree for Dec 3 (switchdev & TI_CPSW_SWITCHDEV)
Date: Wed, 4 Dec 2019 08:11:11 -0800	[thread overview]
Message-ID: <af707faa-7f95-0d6f-3f72-1746161e09a8@infradead.org> (raw)
In-Reply-To: <f2700b07-df9b-94ce-0323-a4fece236838@ti.com>

On 12/4/19 7:35 AM, Grygorii Strashko wrote:
> 
> 
> On 04/12/2019 01:43, Randy Dunlap wrote:
>> On 12/2/19 8:54 PM, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Please do not add any material for v5.6 to your linux-next included
>>> trees until after v5.5-rc1 has been released.
>>>
>>> Changes since 20191202:
>>
>> I am seeing this (happens to be on i386; I doubt that it matters):
>> CONFIG_COMPILE_TEST=y
>>
>>
>> WARNING: unmet direct dependencies detected for NET_SWITCHDEV
>>    Depends on [n]: NET [=y] && INET [=n]
>>    Selected by [y]:
>>    - TI_CPSW_SWITCHDEV [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_TI [=y] && (ARCH_DAVINCI || ARCH_OMAP2PLUS || COMPILE_TEST [=y])
>>
>> because TI_CPSW_SWITCHDEV blindly selects NET_SWITCHDEV even though
>> INET is not set/enabled, while NET_SWITCHDEV depends on INET.
>>
>> However, the build succeeds, including net/switchdev/*.
>>
>> So why does NET_SWITCHDEV depend on INET?
>>
>> It looks like TI_CPSW_SWITCHDEV should depend on INET (based on the
>> Kconfig rules), but in practice it doesn't seem to matter to the build.
>>
> 
> Thanks for reporting this. I'd like to ask for some advice of how to proceed?
> a) change it to "depends on NET_SWITCHDEV" (as it's done in other drivers),
> but this will require to add NET_SWITCHDEV in defconfig

IMO TI_CPSW_SWITCHDEV should depend on NET_SWITCHDEV, as other drivers do that.

That will require to add NET_SWITCHDEV in what defconfig?
To me, it just means that whoever is doing the kernel config must enable/set
NET_SWITCHDEV first, same as other drivers that depend on NET_SWITCHDEV.

> b) change it to "imply NET_SWITCHDEV", but then NET_SWITCHDEV can be switched off
> manually or by random build and cause build failure of cpsw_new.
> To fix build below diff can be used, but TI_CPSW_SWITCHDEV will not be functional
> 
> ---
> diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c
> index 71215db7934b..22e8fc548d48 100644
> --- a/drivers/net/ethernet/ti/cpsw_new.c
> +++ b/drivers/net/ethernet/ti/cpsw_new.c
> @@ -368,8 +368,9 @@ static void cpsw_rx_handler(void *token, int len, int status)
>                 page_pool_recycle_direct(pool, page);
>                 goto requeue;
>         }
> -
> +#ifdef CONFIG_NET_SWITCHDEV
>         skb->offload_fwd_mark = priv->offload_fwd_mark;
> +#endif
>         skb_reserve(skb, headroom);
>         skb_put(skb, len);
>         skb->dev = ndev;
> 
> Thank you.
> 


-- 
~Randy
Reported-by: Randy Dunlap <rdunlap@infradead.org>

      reply	other threads:[~2019-12-04 16:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  4:54 linux-next: Tree for Dec 3 Stephen Rothwell
2019-12-03 16:33 ` linux-next: Tree for Dec 3 (pinctrl-equilibrium) Randy Dunlap
2019-12-04  9:36   ` Tanwar, Rahul
2019-12-04 16:04     ` Randy Dunlap
2019-12-04 23:36     ` Linus Walleij
2019-12-03 16:52 ` linux-next: Tree for Dec 3 (drivers/ptp/ptp_clockmatrix) Randy Dunlap
2019-12-03 23:43 ` linux-next: Tree for Dec 3 (switchdev & TI_CPSW_SWITCHDEV) Randy Dunlap
2019-12-04 15:35   ` Grygorii Strashko
2019-12-04 16:11     ` Randy Dunlap [this message]

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=af707faa-7f95-0d6f-3f72-1746161e09a8@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=grygorii.strashko@ti.com \
    --cc=ivecera@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).