dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Chas Williams <3chas3@gmail.com>, dev@dpdk.org
Cc: harish.patil@qlogic.com
Subject: Re: [PATCH v2 05/10] bnx2x: Restrict RX mask flags sent to the PF
Date: Fri, 30 Sep 2016 11:45:23 +0100	[thread overview]
Message-ID: <8ee01f60-b3ac-bcb2-c7c5-af66e84cc647@intel.com> (raw)
In-Reply-To: <1475144449-22176-5-git-send-email-3chas3@gmail.com>

On 9/29/2016 11:20 AM, Chas Williams wrote:
> Don't use bnx2x_fill_accept_flags() to fill the RX mask in the VF
> since the PF only handles a subset of the existing flags.  now,
> bnx2x_fill_accept_flags() can be static.
> 
> Fixes: 540a211084a7 ("bnx2x: driver core")
> 
> Signed-off-by: Chas Williams <3chas3@gmail.com>

<...>

> diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
> index 1c895f8..ecd4a7d 100644
> --- a/drivers/net/bnx2x/bnx2x_vfpf.c
> +++ b/drivers/net/bnx2x/bnx2x_vfpf.c
> @@ -576,7 +576,6 @@ bnx2x_vf_set_rx_mode(struct bnx2x_softc *sc)
>  {
>  	struct vf_set_q_filters_tlv *query;
>  	struct vf_common_reply_tlv *reply = &sc->vf2pf_mbox->resp.common_reply;
> -	unsigned long tx_mask;
>  
>  	query = &sc->vf2pf_mbox->query[0].set_q_filters;
>  	bnx2x_init_first_tlv(sc, &query->first_tlv, BNX2X_VF_TLV_SET_Q_FILTERS,
> @@ -585,7 +584,27 @@ bnx2x_vf_set_rx_mode(struct bnx2x_softc *sc)
>  	query->vf_qid = 0;
>  	query->flags = BNX2X_VF_RX_MASK_CHANGED;
>  
> -	if (bnx2x_fill_accept_flags(sc, sc->rx_mode, &query->rx_mask, &tx_mask)) {
> +	switch (sc->rx_mode) {
> +	case BNX2X_RX_MODE_NONE: /* no Rx */
> +		query->rx_mask = VFPF_RX_MASK_ACCEPT_NONE;
> +		break;
> +	case BNX2X_RX_MODE_NORMAL:
> +		query->rx_mask = VFPF_RX_MASK_ACCEPT_MATCHED_MULTICAST;
> +		query->rx_mask |= VFPF_RX_MASK_ACCEPT_MATCHED_UNICAST;
> +		query->rx_mask |= VFPF_RX_MASK_ACCEPT_BROADCAST;
> +		break;
> +	case BNX2X_RX_MODE_ALLMULTI:
> +		query->rx_mask = VFPF_RX_MASK_ACCEPT_ALL_MULTICAST;
> +		query->rx_mask |= VFPF_RX_MASK_ACCEPT_MATCHED_UNICAST;
> +		query->rx_mask |= VFPF_RX_MASK_ACCEPT_BROADCAST;
> +		break;
> +	case BNX2X_RX_MODE_PROMISC:
> +		query->rx_mask = VFPF_RX_MASK_ACCEPT_ALL_UNICAST;
> +		query->rx_mask |= VFPF_RX_MASK_ACCEPT_ALL_MULTICAST;
> +		query->rx_mask |= VFPF_RX_MASK_ACCEPT_BROADCAST;
> +		break;
> +	default:
> +		PMD_DRV_LOG(ERR, "BAD rx mode (%d)", mode);

"mode" is not defined in this function, enabling debug log is giving
following compilation error:

.../drivers/net/bnx2x/bnx2x_vfpf.c:657:40:
    error: ‘mode’ undeclared (first use in this function)
        PMD_DRV_LOG(ERR, "BAD rx mode (%d)", mode);
                                             ^

  reply	other threads:[~2016-09-30 10:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 10:20 [PATCH v2 01/10] bnx2x: Set cache line based on build configuration Chas Williams
2016-09-29 10:20 ` [PATCH v2 02/10] bnx2x: Remove unused preprocessor symbols and code Chas Williams
2016-09-29 10:20 ` [PATCH v2 03/10] bnx2x: Remove delay during device startup Chas Williams
2016-09-29 10:20 ` [PATCH v2 04/10] bnx2x: Remove unused RX queue code Chas Williams
2016-09-29 10:20 ` [PATCH v2 05/10] bnx2x: Restrict RX mask flags sent to the PF Chas Williams
2016-09-30 10:45   ` Ferruh Yigit [this message]
2016-09-29 10:20 ` [PATCH v2 06/10] bnx2x: Replace macro with static function Chas Williams
2016-09-29 10:20 ` [PATCH v2 07/10] bnx2x: Serialize access to pf2vf mailbox Chas Williams
2016-09-30 10:45   ` Ferruh Yigit
2016-09-29 10:20 ` [PATCH v2 08/10] bnx2x: Check return codes during VF mailbox operation Chas Williams
2016-09-29 10:20 ` [PATCH v2 09/10] bnx2x: Don't return structs Chas Williams
2016-09-29 10:20 ` [PATCH v2 10/10] bnx2x: Merge debug register operations into headers Chas Williams
2016-09-30 18:16   ` Harish Patil
2016-09-30 10:53 ` [PATCH v2 01/10] bnx2x: Set cache line based on build configuration Ferruh Yigit

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=8ee01f60-b3ac-bcb2-c7c5-af66e84cc647@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=3chas3@gmail.com \
    --cc=dev@dpdk.org \
    --cc=harish.patil@qlogic.com \
    /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).