DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Helin Zhang <helin.zhang@intel.com>
Cc: dev@dpdk.org, steven.j.murray@intel.com, chiu-pi.shih@intel.com,
	monica.kenguva@intel.com
Subject: Re: [dpdk-dev] [PATCH 11/18] i40e: support of building both PF and VF driver together
Date: Mon, 27 Apr 2015 19:25:16 +0200	[thread overview]
Message-ID: <1673322.EHLn9aXppT@xps13> (raw)
In-Reply-To: <1429518150-28098-12-git-send-email-helin.zhang@intel.com>

2015-04-20 16:22, Helin Zhang:
> Macros of PF_DRIVER, VF_DRIVER and INTEGRATED_VF were defined to
> support building both PF and VF driver together. PF_DRIVER needs
> to be defined if a build is for PF only, while VF_DRIVER for VF
> only. PF_DRIVER, VF_DRIVER and INTEGRATED_VF are all needed for
> building PF and VF driver together.
> 
> Signed-off-by: Helin Zhang <helin.zhang@intel.com>

As this patch is mostly reversing the logic #îfndef to #ifdef, it
seems the title is not accurate. Is it really adding a new support
or is it only changing the compilation logic?

About title, please use i40e/base: to distinguish patches on the base driver
from the specific PMD ones.

> ---
>  lib/librte_pmd_i40e/Makefile              |  2 +-
>  lib/librte_pmd_i40e/i40e/i40e_adminq.c    | 14 +++++++-------
>  lib/librte_pmd_i40e/i40e/i40e_common.c    |  6 ++++--
>  lib/librte_pmd_i40e/i40e/i40e_prototype.h |  4 ++--
>  4 files changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
> index a921bf1..22f0716 100644
> --- a/lib/librte_pmd_i40e/Makefile
> +++ b/lib/librte_pmd_i40e/Makefile
> @@ -37,7 +37,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  LIB = librte_pmd_i40e.a
>  
>  CFLAGS += -O3
> -CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += $(WERROR_FLAGS) -DPF_DRIVER -DVF_DRIVER -DINTEGRATED_VF
>  
>  EXPORT_MAP := rte_pmd_i40e_version.map
>  
> diff --git a/lib/librte_pmd_i40e/i40e/i40e_adminq.c b/lib/librte_pmd_i40e/i40e/i40e_adminq.c
> index 91b3568..8f9e870 100644
> --- a/lib/librte_pmd_i40e/i40e/i40e_adminq.c
> +++ b/lib/librte_pmd_i40e/i40e/i40e_adminq.c
> @@ -37,7 +37,7 @@ POSSIBILITY OF SUCH DAMAGE.
>  #include "i40e_adminq.h"
>  #include "i40e_prototype.h"
>  
> -#ifndef VF_DRIVER
> +#ifdef PF_DRIVER
>  /**
>   * i40e_is_nvm_update_op - return true if this is an NVM update operation
>   * @desc: API request descriptor
> @@ -48,7 +48,7 @@ STATIC INLINE bool i40e_is_nvm_update_op(struct i40e_aq_desc *desc)
>  		desc->opcode == CPU_TO_LE16(i40e_aqc_opc_nvm_update));
>  }
>  
> -#endif /* VF_DRIVER */
> +#endif /* PF_DRIVER */
>  /**
>   *  i40e_adminq_init_regs - Initialize AdminQ registers
>   *  @hw: pointer to the hardware structure
> @@ -559,7 +559,7 @@ enum i40e_status_code i40e_shutdown_arq(struct i40e_hw *hw)
>  enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
>  {
>  	enum i40e_status_code ret_code;
> -#ifndef VF_DRIVER
> +#ifdef PF_DRIVER
>  	u16 eetrack_lo, eetrack_hi;
>  	int retry = 0;
>  #endif
> @@ -592,7 +592,7 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
>  	if (ret_code != I40E_SUCCESS)
>  		goto init_adminq_free_asq;
>  
> -#ifndef VF_DRIVER
> +#ifdef PF_DRIVER
>  #ifdef INTEGRATED_VF
>  	/* VF has no need of firmware */
>  	if (i40e_is_vf(hw))
> @@ -640,13 +640,13 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
>  						    I40E_HMC_PROFILE_DEFAULT,
>  						    0,
>  						    NULL);
> +#endif /* PF_DRIVER */
>  	ret_code = I40E_SUCCESS;
>  
> -#endif /* VF_DRIVER */
>  	/* success! */
>  	goto init_adminq_exit;
>  
> -#ifndef VF_DRIVER
> +#ifdef PF_DRIVER
>  init_adminq_free_arq:
>  	i40e_shutdown_arq(hw);
>  #endif
> @@ -1044,7 +1044,7 @@ clean_arq_element_out:
>  		*pending = (ntc > ntu ? hw->aq.arq.count : 0) + (ntu - ntc);
>  	i40e_release_spinlock(&hw->aq.arq_spinlock);
>  
> -#ifndef VF_DRIVER
> +#ifdef PF_DRIVER
>  	if (i40e_is_nvm_update_op(&e->desc)) {
>  		if (hw->aq.nvm_release_on_done) {
>  			i40e_release_nvm(hw);
> diff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c b/lib/librte_pmd_i40e/i40e/i40e_common.c
> index 3dd8f04..7a322f1 100644
> --- a/lib/librte_pmd_i40e/i40e/i40e_common.c
> +++ b/lib/librte_pmd_i40e/i40e/i40e_common.c
> @@ -44,7 +44,7 @@ POSSIBILITY OF SUCH DAMAGE.
>   * This function sets the mac type of the adapter based on the
>   * vendor ID and device ID stored in the hw structure.
>   **/
> -#ifdef VF_DRIVER
> +#if defined(INTEGRATED_VF) || defined(VF_DRIVER)
>  enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
>  #else
>  STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
> @@ -564,7 +564,7 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = {
>  	I40E_PTT_UNUSED_ENTRY(255)
>  };
>  
> -#ifndef VF_DRIVER
> +#ifdef PF_DRIVER
>  
>  /**
>   * i40e_init_shared_code - Initialize the shared code
> @@ -4771,6 +4771,8 @@ enum i40e_status_code i40e_aq_configure_partition_bw(struct i40e_hw *hw,
>  
>  	return status;
>  }
> +#endif /* PF_DRIVER */
> +#ifdef VF_DRIVER
>  
>  /**
>   * i40e_aq_send_msg_to_pf
> diff --git a/lib/librte_pmd_i40e/i40e/i40e_prototype.h b/lib/librte_pmd_i40e/i40e/i40e_prototype.h
> index 79f4e38..d143183 100644
> --- a/lib/librte_pmd_i40e/i40e/i40e_prototype.h
> +++ b/lib/librte_pmd_i40e/i40e/i40e_prototype.h
> @@ -77,7 +77,7 @@ void i40e_resume_aq(struct i40e_hw *hw);
>  bool i40e_check_asq_alive(struct i40e_hw *hw);
>  enum i40e_status_code i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading);
>  
> -#ifndef VF_DRIVER
> +#ifdef PF_DRIVER
>  
>  u32 i40e_led_get(struct i40e_hw *hw);
>  void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink);
> @@ -401,7 +401,7 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,
>  					  struct i40e_nvm_access *cmd,
>  					  u8 *bytes, int *);
>  void i40e_set_pci_config_data(struct i40e_hw *hw, u16 link_status);
> -#endif /* VF_DRIVER */
> +#endif /* PF_DRIVER */
>  
>  #if defined(I40E_QV) || defined(VF_DRIVER)
>  enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw);
> 

  reply	other threads:[~2015-04-27 17:25 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20  8:22 [dpdk-dev] [PATCH 00/18] i40e base driver update Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 01/18] i40e: copyright update Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 02/18] i40e: disable setting phy configuration Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 03/18] i40e: adjustment of register definitions and relevant Helin Zhang
2015-04-27 17:16   ` Thomas Monjalon
2015-04-28  2:29     ` Zhang, Helin
2015-04-20  8:22 ` [dpdk-dev] [PATCH 04/18] i40e: support of CEE DCBX on recent firmware versions Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 05/18] i40e: rework of 'i40e_hmc_get_object_va' Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 06/18] i40e: support of Fortpark device IDs and mac types Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 07/18] i40e: rename 'err' to 'perrno' Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 08/18] i40e: support NVM read on Fortpark, with minor enhancements Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 09/18] i40e: adminq enhancements Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 10/18] i40e: support of firmware build number Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 11/18] i40e: support of building both PF and VF driver together Helin Zhang
2015-04-27 17:25   ` Thomas Monjalon [this message]
2015-04-28  2:33     ` Zhang, Helin
2015-04-20  8:22 ` [dpdk-dev] [PATCH 12/18] i40e: enhancements of AQ commands and common interfaces Helin Zhang
2015-04-27 17:26   ` Thomas Monjalon
2015-04-28  2:34     ` Zhang, Helin
2015-04-20  8:22 ` [dpdk-dev] [PATCH 13/18] i40e: replacement of 'i40e_debug_read_register()' Helin Zhang
2015-04-27 17:28   ` Thomas Monjalon
2015-04-28  2:34     ` Zhang, Helin
2015-04-20  8:22 ` [dpdk-dev] [PATCH 14/18] i40e: add new interfaces of AQ commands and relevant Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 15/18] i40e: support of Fortpark FPGA Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 16/18] i40e: add more virtual channel operations Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 17/18] i40e: support of structure and command length check Helin Zhang
2015-04-20  8:22 ` [dpdk-dev] [PATCH 18/18] i40e: Minor enhancements in i40e_type.h Helin Zhang
2015-04-22  7:26 ` [dpdk-dev] [PATCH 00/18] i40e base driver update Cao, Min
2015-04-30 15:03 ` [dpdk-dev] [PATCH v2 00/33] " Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 01/33] i40e: copyright update Helin Zhang
2015-05-08  3:22     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 02/33] i40e: disable setting of phy configuration Helin Zhang
2015-05-08  3:22     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 03/33] i40e: adjustment of register definitions and relevant Helin Zhang
2015-05-08  3:21     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 04/33] i40e/base: rename 'err' to 'perrno' Helin Zhang
2015-05-08  3:20     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 05/33] i40e/base: support of building both PF and VF driver together Helin Zhang
2015-05-08  3:25     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 06/33] i40e/base: support of CEE DCBX on recent firmware versions Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 07/33] i40e: replacement of 'i40e_debug_read_register()' Helin Zhang
2015-05-08  3:23     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 08/33] i40e/base: rework of 'i40e_hmc_get_object_va' Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 09/33] i40e/base: update of shadow RAM read/write functions Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 10/33] i40e/base: catch NVM write semaphore timeout and retry Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 11/33] i40e/base: check for AQ timeout in aq_rc decode Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 12/33] i40e/base: fix up NVM update sm error handling Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 13/33] i40e/base: enhancement of polling NVM semaphore Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 14/33] i40e/base: enhancements of NVM checksum calculation Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 15/33] i40e/base: replacement of DEBUGOUT() with i40e_debug() Helin Zhang
2015-05-08  3:24     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 16/33] i40e/base: add fw build info to AQ data Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 17/33] i40e/base: define and use i40e_is_vf() Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 18/33] i40e/base: grab NVM devstarter version not image version Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 19/33] i40e/base: enhancements on adminq init and sending asq command Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 20/33] i40e/base: i40e_aq_get_link_info() should be used directly Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 21/33] i40e/base: add new interfaces for future use Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 22/33] i40e/base: update of get/set LED functions Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 23/33] i40e/base: clean up sparse complaint in i40e_debug_aq Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 24/33] i40e/base: get pf_id from HW rather than PCI function Helin Zhang
2015-05-08  3:20     ` Wu, Jingjing
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 25/33] i40e/base: find partition_id in npar mode, and disable FCOE by default Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 26/33] i40e/base: Reassign incorrect PHY type as a workaround for a FW issue Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 27/33] i40e/base: add AOC phy types to case statement in get_media_type Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 28/33] i40e/base: support for iSCSI capability Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 29/33] i40e/base: set FLAG_RD when sending driver version to FW Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 30/33] i40e/base: future proof some sizeof calls Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 31/33] i40e/base: add more virtual channel operations for future use Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 32/33] i40e/base: rework of structures and macros " Helin Zhang
2015-04-30 15:03   ` [dpdk-dev] [PATCH v2 33/33] i40e/base: modifications " Helin Zhang
2015-05-07  1:17   ` [dpdk-dev] [PATCH v2 00/33] i40e base driver update Cao, Min
2015-05-08  5:54   ` Liu, Jijiang

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=1673322.EHLn9aXppT@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=chiu-pi.shih@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=monica.kenguva@intel.com \
    --cc=steven.j.murray@intel.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).