Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	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 17:35:23 +0200
Message-ID: <f2700b07-df9b-94ce-0323-a4fece236838@ti.com> (raw)
In-Reply-To: <58aebf62-54f8-9084-147b-801ea65327bb@infradead.org>



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

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.

-- 
Best regards,
grygorii

  reply index

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 [this message]
2019-12-04 16:11     ` Randy Dunlap

Reply instructions:

You may reply publically 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=f2700b07-df9b-94ce-0323-a4fece236838@ti.com \
    --to=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=rdunlap@infradead.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

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git