netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Michael Chan <mchan@broadcom.com>,
	davem@davemloft.net, netdev@vger.kernel.org, barak@broadcom.com,
	eilong@broadcom.com
Subject: Re: [PATCH net-next] bnx2x: Fix compile errors if CONFIG_CNIC is not set
Date: Tue, 06 Dec 2011 13:25:34 -0800	[thread overview]
Message-ID: <1323206734.1762.8.camel@joe2Laptop> (raw)
In-Reply-To: <1323205383.2690.25.camel@edumazet-laptop>

On Tue, 2011-12-06 at 22:03 +0100, Eric Dumazet wrote:
> Le mardi 06 décembre 2011 à 12:58 -0800, Michael Chan a écrit :
> > Don't provide FCoE and iSCSI statistics to management firmware if
> > CONFIG_CNIC is not set.  Some needed structure fields are not defined
> > without CONFIG_CNIC.
> Thanks for the fast answer, and yes, no more build error :)

That works, but is that the best solution?

Another option is for bnx2x_handle_drv_info_req
to return DRV_MSG_CODE_DRV_INFO_NACK

Maybe like:

	switch (op_code) {
	case ETH_STATS_OPCODE:
		bnx2x_drv_info_ether_stat(bp);
		break;
#ifdef BCM_CNIC
	case FCOE_STATS_OPCODE:
		bnx2x_drv_info_fcoe_stat(bp);
		break;
	case ISCSI_STATS_OPCODE:
		bnx2x_drv_info_iscsi_stat(bp);
		break;
#endif
	default:
		/* if op code isn't supported - send NACK */
		bnx2x_fw_command(bp, DRV_MSG_CODE_DRV_INFO_NACK, 0);
		return;
	}

  reply	other threads:[~2011-12-06 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 20:58 [PATCH net-next] bnx2x: Fix compile errors if CONFIG_CNIC is not set Michael Chan
2011-12-06 21:03 ` Eric Dumazet
2011-12-06 21:25   ` Joe Perches [this message]
2011-12-06 21:42     ` Michael Chan
2011-12-06 22:16       ` Eilon Greenstein
2011-12-07 13:53         ` Eilon Greenstein
2011-12-06 21:43   ` 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=1323206734.1762.8.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=barak@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=eric.dumazet@gmail.com \
    --cc=mchan@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;
as well as URLs for NNTP newsgroup(s).