Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kubakici@wp.pl>
To: Yunsheng Lin <linyunsheng@huawei.com>
Cc: Michael Chan <michael.chan@broadcom.com>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] bnxt_en: Fix randconfig build errors.
Date: Fri, 27 Oct 2017 23:15:15 -0700	[thread overview]
Message-ID: <20171027231515.1816951e@cakuba.netronome.com> (raw)
In-Reply-To: <427d0d07-2bb6-da88-d562-05f1a7f5f6f3@huawei.com>

On Sat, 28 Oct 2017 14:05:04 +0800, Yunsheng Lin wrote:
> Hi, Michael
> 
> On 2017/10/28 13:56, Michael Chan wrote:
> > Fix undefined symbols when CONFIG_VLAN_8021Q or CONFIG_INET is not set.
> > 
> > Fixes: 8c95f773b4a3 ("bnxt_en: add support for Flower based vxlan encap/decap offload")
> > Reported-by: Jakub Kicinski <kubakici@wp.pl>
> > Signed-off-by: Michael Chan <michael.chan@broadcom.com>
> > ---
> >  drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> > index 798d139..d5031f4 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
> > @@ -904,6 +904,7 @@ static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp,
> >  				       struct bnxt_tc_l2_key *l2_info,
> >  				       struct net_device *real_dst_dev)
> >  {
> > +#ifdef CONFIG_INET  
> 
> Can we use #if IS_ENABLED(CONFIG_INET) here too?
> 
> I am not familiar with IS_ENABLED, just thought it would be
> good to be constistent because you are using IS_ENABLED below.

It's OK, CONFIG_INET can't be a module.

> >  	struct flowi4 flow = { {0} };
> >  	struct net_device *dst_dev;
> >  	struct neighbour *nbr;
> > @@ -925,6 +926,7 @@ static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp,
> >  	 */
> >  	dst_dev = rt->dst.dev;
> >  	if (is_vlan_dev(dst_dev)) {
> > +#if IS_ENABLED(CONFIG_VLAN_8021Q)

But here you should perhaps use IS_REACHABLE() otherwise when bnxt is
built in and 8021q is a module there could be trouble, no?

  reply	other threads:[~2017-10-28  6:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28  5:56 [PATCH net-next] bnxt_en: Fix randconfig build errors Michael Chan
2017-10-28  6:05 ` Yunsheng Lin
2017-10-28  6:15   ` Jakub Kicinski [this message]
2017-10-28  6:41     ` Michael Chan
2017-10-28  9:24 ` David Miller

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=20171027231515.1816951e@cakuba.netronome.com \
    --to=kubakici@wp.pl \
    --cc=davem@davemloft.net \
    --cc=linyunsheng@huawei.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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