netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, davem@davemloft.net
Cc: Greg Bowers <gregory.j.bowers@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com
Subject: Re: [net-next 06/17] i40e: Convert CEE App TLV selector to IEEE selector
Date: Tue, 13 Oct 2015 16:42:56 +0300	[thread overview]
Message-ID: <561D0A60.6030605@cogentembedded.com> (raw)
In-Reply-To: <1444715598-20970-7-git-send-email-jeffrey.t.kirsher@intel.com>

Hello.

On 10/13/2015 8:53 AM, Jeff Kirsher wrote:

> From: Greg Bowers <gregory.j.bowers@intel.com>
>
> Changes the parsing of CEE App TLVs to fill in the App selector in struct
> i40e_dcbx_config with the IEEE App selector so the caller doesn't have to
> consider whether the App came from a CEE or IEEE DCBX negotiation.
>
> Change-ID: Ia7d9d664cde04d2ebcc9822fd22e4929c6edab3a
> Signed-off-by: Greg Bowers <gregory.j.bowers@intel.com>
> Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_dcb.c  | 16 ++++++++++++----
>   drivers/net/ethernet/intel/i40e/i40e_type.h |  2 ++
>   2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
> index 251a841..2691277 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
[...]
> @@ -397,9 +397,17 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv,
>   				break;
>   		}
>   		dcbcfg->app[i].priority = up;
> -		/* Get Selector from lower 2 bits */
> -		dcbcfg->app[i].selector = (app->upper_oui_sel &
> -					   I40E_CEE_APP_SELECTOR_MASK);
> +
> +		/* Get Selector from lower 2 bits, and convert to IEEE */
> +		selector = (app->upper_oui_sel & I40E_CEE_APP_SELECTOR_MASK);
> +		if (selector == I40E_CEE_APP_SEL_ETHTYPE)
> +			dcbcfg->app[i].selector = I40E_APP_SEL_ETHTYPE;
> +		else if (selector == I40E_CEE_APP_SEL_TCPIP)
> +			dcbcfg->app[i].selector = I40E_APP_SEL_TCPIP;
> +		else
> +			/* Keep selector as it is for unknown types */
> +			dcbcfg->app[i].selector = selector;

    The above is asking to be a *switch* statement.

[...]

MBR, Sergei

  reply	other threads:[~2015-10-13 13:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13  5:53 [net-next 00/17][pull request] Intel Wired LAN Driver Updates 2015-10-12 Jeff Kirsher
2015-10-13  5:53 ` [net-next 01/17] i40e/i40evf: Add new link status defines Jeff Kirsher
2015-10-13  5:53 ` [net-next 02/17] i40e: Make it clear a parameter is never used Jeff Kirsher
2015-10-13  5:53 ` [net-next 03/17] i40e: Use BIT() macro for priority map parsing Jeff Kirsher
2015-10-13  5:53 ` [net-next 04/17] i40evf: properly handle ndo_set_mac_address calls Jeff Kirsher
2015-10-13  5:53 ` [net-next 05/17] i40e/i40evf: Add info to nvm info struct for OEM version data Jeff Kirsher
2015-10-13  5:53 ` [net-next 06/17] i40e: Convert CEE App TLV selector to IEEE selector Jeff Kirsher
2015-10-13 13:42   ` Sergei Shtylyov [this message]
2015-10-13  5:53 ` [net-next 07/17] i40e: remove redundant call Jeff Kirsher
2015-10-13  5:53 ` [net-next 08/17] i40e: don't panic on VSI allocation failure Jeff Kirsher
2015-10-13  5:53 ` [net-next 09/17] i40e: update fw version text string per previous product formats Jeff Kirsher
2015-10-13  5:53 ` [net-next 10/17] i40e/i40evf: split device ids into a separate file Jeff Kirsher
2015-10-13  5:53 ` [net-next 11/17] i40e: Add promiscuous on VLAN support Jeff Kirsher
2015-10-13 11:14   ` David Miller
2015-10-20 15:31     ` Rose, Gregory V
2015-10-20 15:46       ` Or Gerlitz
2015-10-20 20:54         ` Rose, Gregory V
2015-10-13  5:53 ` [net-next 12/17] i40e/i40evf: Add module_types and update_link_info Jeff Kirsher
2015-10-13  5:53 ` [net-next 13/17] i40e/i40evf: Refactor PHY structure and add phy_capabilities enum Jeff Kirsher
2015-10-13  5:53 ` [net-next 14/17] i40e/i40evf: Bump i40e version to 1.3.25 and i40evf to 1.3.17 Jeff Kirsher
2015-10-13  5:53 ` [net-next 15/17] ixgbe: add flow control ethertype to the anti-spoofing filter Jeff Kirsher
2015-10-13  5:53 ` [net-next 16/17] fm10k: use snprintf() instead of sprintf() to avoid buffer overflow Jeff Kirsher
2015-10-13  5:53 ` [net-next 17/17] fm10k: do not use enum as boolean Jeff Kirsher

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=561D0A60.6030605@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=gregory.j.bowers@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.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).