DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers"
@ 2014-06-25 12:22 Thomas Monjalon
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver Thomas Monjalon
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Thomas Monjalon @ 2014-06-25 12:22 UTC (permalink / raw)
  To: dev

There were discussions about how to fix/workaround bugs in Intel code which
we don't want to modify. And it raised wording issue to clarify things.
I modify my patch and accept others. So I resend them in order to have a
final acknowledgement.

Please comment and/or acknowledge.
Thanks

Thomas Monjalon (1):
  i40e: explicit shared code naming as base driver
Chen Jing D(Mark) (1):
  i40e/base: ignore warning
Pablo de Lara (1):
  ixgbe: rework fix of media type for bypass device

 lib/librte_pmd_i40e/Makefile              | 34 +++++++++++++++----------------
 lib/librte_pmd_i40e/i40e_ethdev.c         | 12 +++++------
 lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c  |  3 ---
 lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c | 34 +++++++++++++++++++------------
 4 files changed, 44 insertions(+), 39 deletions(-)

-- 
2.0.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver
  2014-06-25 12:22 [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Thomas Monjalon
@ 2014-06-25 12:22 ` Thomas Monjalon
  2014-06-25 14:43   ` Chen, Jing D
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 2/3] i40e/base: ignore warning Thomas Monjalon
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2014-06-25 12:22 UTC (permalink / raw)
  To: dev

The PMD is built on top of the base driver which is provided by Intel
and shouldn't be modified to allow easy batch upgrade from Intel.

The base driver is a "shared code" between many projects. But in DPDK,
the "base driver" naming makes more sense.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_pmd_i40e/Makefile      | 33 ++++++++++++++++-----------------
 lib/librte_pmd_i40e/i40e_ethdev.c | 12 ++++++------
 2 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
index 09f2087..77d08fb 100644
--- a/lib/librte_pmd_i40e/Makefile
+++ b/lib/librte_pmd_i40e/Makefile
@@ -39,26 +39,25 @@ LIB = librte_pmd_i40e.a
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
-ifeq ($(CC), icc)
-CFLAGS_SHARED_DRIVERS = -wd593
-else
-CFLAGS_SHARED_DRIVERS =  -Wno-unused-but-set-variable
-CFLAGS_SHARED_DRIVERS += -Wno-sign-compare
-CFLAGS_SHARED_DRIVERS += -Wno-unused-value
-CFLAGS_SHARED_DRIVERS += -Wno-unused-parameter
-CFLAGS_SHARED_DRIVERS += -Wno-strict-aliasing
-CFLAGS_SHARED_DRIVERS += -Wno-format
-CFLAGS_SHARED_DRIVERS += -Wno-missing-field-initializers
-CFLAGS_SHARED_DRIVERS += -Wno-pointer-to-int-cast
-CFLAGS_SHARED_DRIVERS += -Wno-format-nonliteral
-CFLAGS_SHARED_DRIVERS += -Wno-format-security
-endif
-
 #
 # Add extra flags for ND source files to disable warnings
 #
-SHARED_DRIVERS_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))
-$(foreach obj, $(SHARED_DRIVERS_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_SHARED_DRIVERS)))
+ifeq ($(CC), icc)
+CFLAGS_BASE_DRIVER = -wd593
+else
+CFLAGS_BASE_DRIVER  = -Wno-unused-but-set-variable
+CFLAGS_BASE_DRIVER += -Wno-sign-compare
+CFLAGS_BASE_DRIVER += -Wno-unused-value
+CFLAGS_BASE_DRIVER += -Wno-unused-parameter
+CFLAGS_BASE_DRIVER += -Wno-strict-aliasing
+CFLAGS_BASE_DRIVER += -Wno-format
+CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
+CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
+CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
+CFLAGS_BASE_DRIVER += -Wno-format-security
+endif
+OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))
+$(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
 
 VPATH += $(RTE_SDK)/lib/librte_pmd_i40e/i40e
 
diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 3311d73..6bc3998 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -387,10 +387,10 @@ eth_i40e_dev_init(__rte_unused struct eth_driver *eth_drv,
 		return ret;
 	}
 
-	/* Initialize the shared code */
+	/* Initialize the shared code (base driver) */
 	ret = i40e_init_shared_code(hw);
 	if (ret) {
-		PMD_INIT_LOG(ERR, "Failed to init shared code: %d", ret);
+		PMD_INIT_LOG(ERR, "Failed to init shared code (base driver): %d", ret);
 		return ret;
 	}
 
@@ -1497,7 +1497,7 @@ i40e_dev_rss_reta_query(struct rte_eth_dev *dev,
 }
 
 /**
- * i40e_allocate_dma_mem_d - specific memory alloc for shared code
+ * i40e_allocate_dma_mem_d - specific memory alloc for shared code (base driver)
  * @hw:   pointer to the HW structure
  * @mem:  pointer to mem struct to fill out
  * @size: size of memory requested
@@ -1531,7 +1531,7 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
 }
 
 /**
- * i40e_free_dma_mem_d - specific memory free for shared code
+ * i40e_free_dma_mem_d - specific memory free for shared code (base driver)
  * @hw:   pointer to the HW structure
  * @mem:  ptr to mem struct to free
  **/
@@ -1549,7 +1549,7 @@ i40e_free_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
 }
 
 /**
- * i40e_allocate_virt_mem_d - specific memory alloc for shared code
+ * i40e_allocate_virt_mem_d - specific memory alloc for shared code (base driver)
  * @hw:   pointer to the HW structure
  * @mem:  pointer to mem struct to fill out
  * @size: size of memory requested
@@ -1572,7 +1572,7 @@ i40e_allocate_virt_mem_d(__attribute__((unused)) struct i40e_hw *hw,
 }
 
 /**
- * i40e_free_virt_mem_d - specific memory free for shared code
+ * i40e_free_virt_mem_d - specific memory free for shared code (base driver)
  * @hw:   pointer to the HW structure
  * @mem:  pointer to mem struct to free
  **/
-- 
2.0.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 2/3] i40e/base: ignore warning
  2014-06-25 12:22 [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Thomas Monjalon
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver Thomas Monjalon
@ 2014-06-25 12:22 ` Thomas Monjalon
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 3/3] ixgbe: rework fix of media type for bypass device Thomas Monjalon
  2014-06-25 16:07 ` [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Richardson, Bruce
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2014-06-25 12:22 UTC (permalink / raw)
  To: dev

From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>

There is a warning in base driver (shared code) on 32-bits RHEL6.3/6.5:
	lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c:917:
	error: integer constant is too large for ‘long’ type

As we don't modify base driver, this warning must be ignored.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
 lib/librte_pmd_i40e/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
index 77d08fb..9dbf69b 100644
--- a/lib/librte_pmd_i40e/Makefile
+++ b/lib/librte_pmd_i40e/Makefile
@@ -55,6 +55,7 @@ CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
 CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
 CFLAGS_BASE_DRIVER += -Wno-format-security
+CFLAGS_i40e_lan_hmc.o += -Wno-error
 endif
 OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))
 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
-- 
2.0.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 3/3] ixgbe: rework fix of media type for bypass device
  2014-06-25 12:22 [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Thomas Monjalon
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver Thomas Monjalon
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 2/3] i40e/base: ignore warning Thomas Monjalon
@ 2014-06-25 12:22 ` Thomas Monjalon
  2014-06-25 16:07 ` [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Richardson, Bruce
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2014-06-25 12:22 UTC (permalink / raw)
  To: dev

From: Pablo de Lara <pablo.de.lara.guarch@intel.com>

This was previously solved in commit 60a70d4e042350ca
(fix link status interrupt of bypass device),
but this alternative fix reverts the previous one and solves the
same issue without modifying the base driver (also named "shared code").

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c  |  3 ---
 lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c | 34 +++++++++++++++++++------------
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
index 93c4e35..ed97ad9 100644
--- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
+++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
@@ -537,9 +537,6 @@ enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
 	case IXGBE_DEV_ID_82599_SFP_SF2:
 	case IXGBE_DEV_ID_82599_SFP_SF_QP:
 	case IXGBE_DEV_ID_82599EN_SFP:
-#ifdef RTE_NIC_BYPASS 
-	case IXGBE_DEV_ID_82599_BYPASS:
-#endif
 		media_type = ixgbe_media_type_fiber;
 		break;
 	case IXGBE_DEV_ID_82599_CX4:
diff --git a/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c b/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c
index 27a5f70..0f0000c 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c
@@ -256,19 +256,6 @@ out:
 	return status;
 }
 
-/*
- * Wrapper around ND functions to support BYPASS nic.
- */
-s32
-ixgbe_bypass_init_shared_code(struct ixgbe_hw *hw)
-{
-	if (hw->device_id == IXGBE_DEV_ID_82599_BYPASS) {
-		hw->mac.type = ixgbe_mac_82599EB;
-	}
-
-	return (ixgbe_init_shared_code(hw));
-}
-
 static enum ixgbe_media_type
 ixgbe_bypass_get_media_type(struct ixgbe_hw *hw)
 {
@@ -284,6 +271,27 @@ ixgbe_bypass_get_media_type(struct ixgbe_hw *hw)
 	return (media_type);
 }
 
+/*
+ * Wrapper around shared code (base driver) to support BYPASS nic.
+ */
+s32
+ixgbe_bypass_init_shared_code(struct ixgbe_hw *hw)
+{
+	s32 ret_val;
+
+	if (hw->device_id == IXGBE_DEV_ID_82599_BYPASS) {
+		hw->mac.type = ixgbe_mac_82599EB;
+	}
+
+	ret_val = ixgbe_init_shared_code(hw);
+	if (hw->device_id == IXGBE_DEV_ID_82599_BYPASS) {
+		hw->mac.ops.get_media_type = &ixgbe_bypass_get_media_type;
+		ixgbe_init_mac_link_ops_82599(hw);
+	}
+
+	return ret_val;
+}
+
 s32
 ixgbe_bypass_init_hw(struct ixgbe_hw *hw)
 {
-- 
2.0.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver Thomas Monjalon
@ 2014-06-25 14:43   ` Chen, Jing D
  2014-06-25 14:47     ` Chen, Jing D
  0 siblings, 1 reply; 8+ messages in thread
From: Chen, Jing D @ 2014-06-25 14:43 UTC (permalink / raw)
  To: Thomas Monjalon, dev

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, June 25, 2014 8:22 PM
> To: dev@dpdk.org
> Cc: Chen, Jing D; Zhang, Helin; Ananyev, Konstantin; De Lara Guarch, Pablo
> Subject: [PATCH 1/3] i40e: explicit shared code naming as base driver
> 
> The PMD is built on top of the base driver which is provided by Intel and
> shouldn't be modified to allow easy batch upgrade from Intel.
> 
> The base driver is a "shared code" between many projects. But in DPDK, the
> "base driver" naming makes more sense.
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  lib/librte_pmd_i40e/Makefile      | 33 ++++++++++++++++-----------------
>  lib/librte_pmd_i40e/i40e_ethdev.c | 12 ++++++------
>  2 files changed, 22 insertions(+), 23 deletions(-)
> 
> diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
> index 09f2087..77d08fb 100644
> --- a/lib/librte_pmd_i40e/Makefile
> +++ b/lib/librte_pmd_i40e/Makefile
> @@ -39,26 +39,25 @@ LIB = librte_pmd_i40e.a  CFLAGS += -O3  CFLAGS
> += $(WERROR_FLAGS)
> 
> -ifeq ($(CC), icc)
> -CFLAGS_SHARED_DRIVERS = -wd593
> -else
> -CFLAGS_SHARED_DRIVERS =  -Wno-unused-but-set-variable
> -CFLAGS_SHARED_DRIVERS += -Wno-sign-compare
> -CFLAGS_SHARED_DRIVERS += -Wno-unused-value
> -CFLAGS_SHARED_DRIVERS += -Wno-unused-parameter
> -CFLAGS_SHARED_DRIVERS += -Wno-strict-aliasing
> -CFLAGS_SHARED_DRIVERS += -Wno-format -CFLAGS_SHARED_DRIVERS +=
> -Wno-missing-field-initializers -CFLAGS_SHARED_DRIVERS +=
> -Wno-pointer-to-int-cast -CFLAGS_SHARED_DRIVERS +=
> -Wno-format-nonliteral -CFLAGS_SHARED_DRIVERS +=
> -Wno-format-security -endif
> -
>  #
>  # Add extra flags for ND source files to disable warnings  #
> -SHARED_DRIVERS_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard
> $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))
> -$(foreach obj, $(SHARED_DRIVERS_OBJS), $(eval
> CFLAGS_$(obj)+=$(CFLAGS_SHARED_DRIVERS)))
> +ifeq ($(CC), icc)
> +CFLAGS_BASE_DRIVER = -wd593
> +else
> +CFLAGS_BASE_DRIVER  = -Wno-unused-but-set-variable
> CFLAGS_BASE_DRIVER
> ++= -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value
> +CFLAGS_BASE_DRIVER += -Wno-unused-parameter CFLAGS_BASE_DRIVER
> +=
> +-Wno-strict-aliasing CFLAGS_BASE_DRIVER += -Wno-format
> +CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
> +CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast CFLAGS_BASE_DRIVER
> +=
> +-Wno-format-nonliteral CFLAGS_BASE_DRIVER += -Wno-format-security
> endif
> +OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard
> +$(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))
> +$(foreach obj, $(OBJS_BASE_DRIVER), $(eval
> +CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
> 
>  VPATH += $(RTE_SDK)/lib/librte_pmd_i40e/i40e
> 
> diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c
> b/lib/librte_pmd_i40e/i40e_ethdev.c
> index 3311d73..6bc3998 100644
> --- a/lib/librte_pmd_i40e/i40e_ethdev.c
> +++ b/lib/librte_pmd_i40e/i40e_ethdev.c
> @@ -387,10 +387,10 @@ eth_i40e_dev_init(__rte_unused struct eth_driver
> *eth_drv,
>  		return ret;
>  	}
> 
> -	/* Initialize the shared code */
> +	/* Initialize the shared code (base driver) */
>  	ret = i40e_init_shared_code(hw);
>  	if (ret) {
> -		PMD_INIT_LOG(ERR, "Failed to init shared code: %d", ret);
> +		PMD_INIT_LOG(ERR, "Failed to init shared code (base driver): %d",
> +ret);
>  		return ret;
>  	}
> 
> @@ -1497,7 +1497,7 @@ i40e_dev_rss_reta_query(struct rte_eth_dev
> *dev,  }
> 
>  /**
> - * i40e_allocate_dma_mem_d - specific memory alloc for shared code
> + * i40e_allocate_dma_mem_d - specific memory alloc for shared code
> + (base driver)
>   * @hw:   pointer to the HW structure
>   * @mem:  pointer to mem struct to fill out
>   * @size: size of memory requested
> @@ -1531,7 +1531,7 @@
> i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,  }
> 
>  /**
> - * i40e_free_dma_mem_d - specific memory free for shared code
> + * i40e_free_dma_mem_d - specific memory free for shared code (base
> + driver)
>   * @hw:   pointer to the HW structure
>   * @mem:  ptr to mem struct to free
>   **/
> @@ -1549,7 +1549,7 @@ i40e_free_dma_mem_d(__attribute__((unused))
> struct i40e_hw *hw,  }
> 
>  /**
> - * i40e_allocate_virt_mem_d - specific memory alloc for shared code
> + * i40e_allocate_virt_mem_d - specific memory alloc for shared code
> + (base driver)
>   * @hw:   pointer to the HW structure
>   * @mem:  pointer to mem struct to fill out
>   * @size: size of memory requested
> @@ -1572,7 +1572,7 @@
> i40e_allocate_virt_mem_d(__attribute__((unused)) struct i40e_hw *hw,  }
> 
>  /**
> - * i40e_free_virt_mem_d - specific memory free for shared code
> + * i40e_free_virt_mem_d - specific memory free for shared code (base
> + driver)
>   * @hw:   pointer to the HW structure
>   * @mem:  pointer to mem struct to free
>   **/
> --
> 2.0.0


I don't object the name change. But I don't see anything good. As some of the API indicates (i40e_init_shared_code), we can call it shared code as what we've done in old PMD drivers. 
BTW, won't this patch overwrite previous one that fix GCC 32bits warning?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver
  2014-06-25 14:43   ` Chen, Jing D
@ 2014-06-25 14:47     ` Chen, Jing D
  0 siblings, 0 replies; 8+ messages in thread
From: Chen, Jing D @ 2014-06-25 14:47 UTC (permalink / raw)
  To: Chen, Jing D, Thomas Monjalon, dev

My bad. Please ignore " BTW, won't this patch overwrite previous one that fix GCC 32bits warning?"

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chen, Jing D
> Sent: Wednesday, June 25, 2014 10:44 PM
> To: Thomas Monjalon; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as
> base driver
> 
> Hi Thomas,
> 
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > Sent: Wednesday, June 25, 2014 8:22 PM
> > To: dev@dpdk.org
> > Cc: Chen, Jing D; Zhang, Helin; Ananyev, Konstantin; De Lara Guarch,
> > Pablo
> > Subject: [PATCH 1/3] i40e: explicit shared code naming as base driver
> >
> > The PMD is built on top of the base driver which is provided by Intel
> > and shouldn't be modified to allow easy batch upgrade from Intel.
> >
> > The base driver is a "shared code" between many projects. But in DPDK,
> > the "base driver" naming makes more sense.
> >
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > ---
> >  lib/librte_pmd_i40e/Makefile      | 33
> ++++++++++++++++-----------------
> >  lib/librte_pmd_i40e/i40e_ethdev.c | 12 ++++++------
> >  2 files changed, 22 insertions(+), 23 deletions(-)
> >
> > diff --git a/lib/librte_pmd_i40e/Makefile
> > b/lib/librte_pmd_i40e/Makefile index 09f2087..77d08fb 100644
> > --- a/lib/librte_pmd_i40e/Makefile
> > +++ b/lib/librte_pmd_i40e/Makefile
> > @@ -39,26 +39,25 @@ LIB = librte_pmd_i40e.a  CFLAGS += -O3
> CFLAGS
> > += $(WERROR_FLAGS)
> >
> > -ifeq ($(CC), icc)
> > -CFLAGS_SHARED_DRIVERS = -wd593
> > -else
> > -CFLAGS_SHARED_DRIVERS =  -Wno-unused-but-set-variable
> > -CFLAGS_SHARED_DRIVERS += -Wno-sign-compare
> -CFLAGS_SHARED_DRIVERS +=
> > -Wno-unused-value -CFLAGS_SHARED_DRIVERS +=
> -Wno-unused-parameter
> > -CFLAGS_SHARED_DRIVERS += -Wno-strict-aliasing
> -CFLAGS_SHARED_DRIVERS
> > += -Wno-format -CFLAGS_SHARED_DRIVERS +=
> > -Wno-missing-field-initializers -CFLAGS_SHARED_DRIVERS +=
> > -Wno-pointer-to-int-cast -CFLAGS_SHARED_DRIVERS +=
> > -Wno-format-nonliteral -CFLAGS_SHARED_DRIVERS +=
> -Wno-format-security
> > -endif
> > -
> >  #
> >  # Add extra flags for ND source files to disable warnings  #
> > -SHARED_DRIVERS_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard
> > $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))
> > -$(foreach obj, $(SHARED_DRIVERS_OBJS), $(eval
> > CFLAGS_$(obj)+=$(CFLAGS_SHARED_DRIVERS)))
> > +ifeq ($(CC), icc)
> > +CFLAGS_BASE_DRIVER = -wd593
> > +else
> > +CFLAGS_BASE_DRIVER  = -Wno-unused-but-set-variable
> > CFLAGS_BASE_DRIVER
> > ++= -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value
> > +CFLAGS_BASE_DRIVER += -Wno-unused-parameter
> CFLAGS_BASE_DRIVER =
> > +-Wno-strict-aliasing CFLAGS_BASE_DRIVER += -Wno-format
> > +CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
> > +CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
> CFLAGS_BASE_DRIVER =
> > +-Wno-format-nonliteral CFLAGS_BASE_DRIVER += -Wno-format-security
> > endif
> > +OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard
> > +$(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c)))
> > +$(foreach obj, $(OBJS_BASE_DRIVER), $(eval
> > +CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
> >
> >  VPATH += $(RTE_SDK)/lib/librte_pmd_i40e/i40e
> >
> > diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c
> > b/lib/librte_pmd_i40e/i40e_ethdev.c
> > index 3311d73..6bc3998 100644
> > --- a/lib/librte_pmd_i40e/i40e_ethdev.c
> > +++ b/lib/librte_pmd_i40e/i40e_ethdev.c
> > @@ -387,10 +387,10 @@ eth_i40e_dev_init(__rte_unused struct
> eth_driver
> > *eth_drv,
> >  		return ret;
> >  	}
> >
> > -	/* Initialize the shared code */
> > +	/* Initialize the shared code (base driver) */
> >  	ret = i40e_init_shared_code(hw);
> >  	if (ret) {
> > -		PMD_INIT_LOG(ERR, "Failed to init shared code: %d", ret);
> > +		PMD_INIT_LOG(ERR, "Failed to init shared code (base driver): %d",
> > +ret);
> >  		return ret;
> >  	}
> >
> > @@ -1497,7 +1497,7 @@ i40e_dev_rss_reta_query(struct rte_eth_dev
> *dev,
> > }
> >
> >  /**
> > - * i40e_allocate_dma_mem_d - specific memory alloc for shared code
> > + * i40e_allocate_dma_mem_d - specific memory alloc for shared code
> > + (base driver)
> >   * @hw:   pointer to the HW structure
> >   * @mem:  pointer to mem struct to fill out
> >   * @size: size of memory requested
> > @@ -1531,7 +1531,7 @@
> > i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw
> *hw,  }
> >
> >  /**
> > - * i40e_free_dma_mem_d - specific memory free for shared code
> > + * i40e_free_dma_mem_d - specific memory free for shared code (base
> > + driver)
> >   * @hw:   pointer to the HW structure
> >   * @mem:  ptr to mem struct to free
> >   **/
> > @@ -1549,7 +1549,7 @@ i40e_free_dma_mem_d(__attribute__((unused))
> > struct i40e_hw *hw,  }
> >
> >  /**
> > - * i40e_allocate_virt_mem_d - specific memory alloc for shared code
> > + * i40e_allocate_virt_mem_d - specific memory alloc for shared code
> > + (base driver)
> >   * @hw:   pointer to the HW structure
> >   * @mem:  pointer to mem struct to fill out
> >   * @size: size of memory requested
> > @@ -1572,7 +1572,7 @@
> > i40e_allocate_virt_mem_d(__attribute__((unused)) struct i40e_hw *hw,
> > }
> >
> >  /**
> > - * i40e_free_virt_mem_d - specific memory free for shared code
> > + * i40e_free_virt_mem_d - specific memory free for shared code (base
> > + driver)
> >   * @hw:   pointer to the HW structure
> >   * @mem:  pointer to mem struct to free
> >   **/
> > --
> > 2.0.0
> 
> 
> I don't object the name change. But I don't see anything good. As some of
> the API indicates (i40e_init_shared_code), we can call it shared code as what
> we've done in old PMD drivers.
> BTW, won't this patch overwrite previous one that fix GCC 32bits warning?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers"
  2014-06-25 12:22 [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Thomas Monjalon
                   ` (2 preceding siblings ...)
  2014-06-25 12:22 ` [dpdk-dev] [PATCH 3/3] ixgbe: rework fix of media type for bypass device Thomas Monjalon
@ 2014-06-25 16:07 ` Richardson, Bruce
  2014-06-26 12:16   ` Thomas Monjalon
  3 siblings, 1 reply; 8+ messages in thread
From: Richardson, Bruce @ 2014-06-25 16:07 UTC (permalink / raw)
  To: Thomas Monjalon, dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Wednesday, June 25, 2014 5:22 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base
> drivers"
> 
> There were discussions about how to fix/workaround bugs in Intel code which
> we don't want to modify. And it raised wording issue to clarify things.
> I modify my patch and accept others. So I resend them in order to have a
> final acknowledgement.
> 
> Please comment and/or acknowledge.
> Thanks
> 
> Thomas Monjalon (1):
>   i40e: explicit shared code naming as base driver
> Chen Jing D(Mark) (1):
>   i40e/base: ignore warning
> Pablo de Lara (1):
>   ixgbe: rework fix of media type for bypass device
> 
>  lib/librte_pmd_i40e/Makefile              | 34 +++++++++++++++----------------
>  lib/librte_pmd_i40e/i40e_ethdev.c         | 12 +++++------
>  lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c  |  3 ---
>  lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c | 34 +++++++++++++++++++--------
> ----
>  4 files changed, 44 insertions(+), 39 deletions(-)
> 
> --
> 2.0.0

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers"
  2014-06-25 16:07 ` [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Richardson, Bruce
@ 2014-06-26 12:16   ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2014-06-26 12:16 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev

2014-06-25 16:07, Richardson, Bruce:
> > Thomas Monjalon (1):
> >   i40e: explicit shared code naming as base driver
> > Chen Jing D(Mark) (1):
> >   i40e/base: ignore warning
> > Pablo de Lara (1):
> >   ixgbe: rework fix of media type for bypass device
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

I've done same kind of minor modifications to e1000 and ixgbe:
	http://dpdk.org/browse/dpdk/commit/?id=2c8e687c549f08522ee

All 3 patches are applied for version 1.7.0.

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-26 12:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 12:22 [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Thomas Monjalon
2014-06-25 12:22 ` [dpdk-dev] [PATCH 1/3] i40e: explicit shared code naming as base driver Thomas Monjalon
2014-06-25 14:43   ` Chen, Jing D
2014-06-25 14:47     ` Chen, Jing D
2014-06-25 12:22 ` [dpdk-dev] [PATCH 2/3] i40e/base: ignore warning Thomas Monjalon
2014-06-25 12:22 ` [dpdk-dev] [PATCH 3/3] ixgbe: rework fix of media type for bypass device Thomas Monjalon
2014-06-25 16:07 ` [dpdk-dev] [PATCH 0/3] previous patches about "shared code"/"base drivers" Richardson, Bruce
2014-06-26 12:16   ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git