DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mlx: fix icc compilation error
@ 2016-06-14  9:51 Ferruh Yigit
  2016-06-14 10:03 ` Bruce Richardson
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2016-06-14  9:51 UTC (permalink / raw)
  To: dev; +Cc: Adrien Mazarguil, Ferruh Yigit

Compilation errors:
mlx4:
  CC mlx4.o
  .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
  mixed with another type
          priv->intr_handle.type = 0;
                                 ^

mlx5:
  CC em_rxtx.o
.../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
error #188: enumerated type mixed with another type
        enum hash_rxq_type type = 0;
                                  ^

.../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
error #188: enumerated type mixed with another type
                if (!priv_allow_flow_type(priv, i)) {
                                                ^

.../dpdk/drivers/net/mlx5/mlx5_rxq.c(623):
error #188: enumerated type mixed with another type
                        priv_special_flow_disable(priv, i);
                                                        ^

.../dpdk/drivers/net/mlx5/mlx5_rxq.c(625):
error #188: enumerated type mixed with another type
                        int ret = priv_special_flow_enable(priv, i);
                                                                 ^

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/mlx4/Makefile | 4 ++++
 drivers/net/mlx5/Makefile | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
index d2f5692..e46c85b 100644
--- a/drivers/net/mlx4/Makefile
+++ b/drivers/net/mlx4/Makefile
@@ -58,6 +58,10 @@ CFLAGS += -Wno-error=cast-qual
 EXPORT_MAP := rte_pmd_mlx4_version.map
 LIBABIVER := 1
 
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+CFLAGS += -wd188 #188: enumerated type mixed with another type
+endif
+
 # DEBUG which is usually provided on the command-line may enable
 # CONFIG_RTE_LIBRTE_MLX4_DEBUG.
 ifeq ($(DEBUG),1)
diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 92bfa07..dd8c425 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -70,6 +70,10 @@ CFLAGS += -Wno-error=cast-qual
 EXPORT_MAP := rte_pmd_mlx5_version.map
 LIBABIVER := 1
 
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+CFLAGS += -wd188 #188: enumerated type mixed with another type
+endif
+
 # DEBUG which is usually provided on the command-line may enable
 # CONFIG_RTE_LIBRTE_MLX5_DEBUG.
 ifeq ($(DEBUG),1)
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH] mlx: fix icc compilation error
  2016-06-14  9:51 [dpdk-dev] [PATCH] mlx: fix icc compilation error Ferruh Yigit
@ 2016-06-14 10:03 ` Bruce Richardson
  2016-06-14 15:22   ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  0 siblings, 1 reply; 10+ messages in thread
From: Bruce Richardson @ 2016-06-14 10:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Adrien Mazarguil

On Tue, Jun 14, 2016 at 10:51:37AM +0100, Ferruh Yigit wrote:
> Compilation errors:
> mlx4:
>   CC mlx4.o
>   .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
>   mixed with another type
>           priv->intr_handle.type = 0;
>                                  ^
> 
> mlx5:
>   CC em_rxtx.o
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
> error #188: enumerated type mixed with another type
>         enum hash_rxq_type type = 0;
>                                   ^
> 
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
> error #188: enumerated type mixed with another type
>                 if (!priv_allow_flow_type(priv, i)) {
>                                                 ^
> 
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(623):
> error #188: enumerated type mixed with another type
>                         priv_special_flow_disable(priv, i);
>                                                         ^
> 
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(625):
> error #188: enumerated type mixed with another type
>                         int ret = priv_special_flow_enable(priv, i);
>                                                                  ^
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  drivers/net/mlx4/Makefile | 4 ++++
>  drivers/net/mlx5/Makefile | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
> index d2f5692..e46c85b 100644
> --- a/drivers/net/mlx4/Makefile
> +++ b/drivers/net/mlx4/Makefile
> @@ -58,6 +58,10 @@ CFLAGS += -Wno-error=cast-qual
>  EXPORT_MAP := rte_pmd_mlx4_version.map
>  LIBABIVER := 1
>  
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
> +CFLAGS += -wd188 #188: enumerated type mixed with another type
> +endif
> +
>  # DEBUG which is usually provided on the command-line may enable
>  # CONFIG_RTE_LIBRTE_MLX4_DEBUG.
>  ifeq ($(DEBUG),1)
> diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
> index 92bfa07..dd8c425 100644
> --- a/drivers/net/mlx5/Makefile
> +++ b/drivers/net/mlx5/Makefile
> @@ -70,6 +70,10 @@ CFLAGS += -Wno-error=cast-qual
>  EXPORT_MAP := rte_pmd_mlx5_version.map
>  LIBABIVER := 1
>  
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
> +CFLAGS += -wd188 #188: enumerated type mixed with another type
> +endif
> +
>  # DEBUG which is usually provided on the command-line may enable
>  # CONFIG_RTE_LIBRTE_MLX5_DEBUG.
>  ifeq ($(DEBUG),1)

Is disabling this warning the best way to deal with this error. Since the values
are enums, not ints, should they not be assigned to enum values. 

/Bruce

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

* [dpdk-dev] [PATCH v2] mlx: fix icc compilation error
  2016-06-14 10:03 ` Bruce Richardson
@ 2016-06-14 15:22   ` Ferruh Yigit
  2016-06-14 15:31     ` Adrien Mazarguil
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ferruh Yigit @ 2016-06-14 15:22 UTC (permalink / raw)
  To: dev; +Cc: Adrien Mazarguil, Ferruh Yigit

Compilation errors:
mlx4:
  CC mlx4.o
  .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
  mixed with another type
          priv->intr_handle.type = 0;
                                 ^

mlx5:
  CC em_rxtx.o
.../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
error #188: enumerated type mixed with another type
        enum hash_rxq_type type = 0;
                                  ^

.../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
error #188: enumerated type mixed with another type
                if (!priv_allow_flow_type(priv, i)) {
                                                ^
more same type of error

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/mlx4/mlx4.c        | 2 +-
 drivers/net/mlx5/mlx5_ethdev.c | 2 +-
 drivers/net/mlx5/mlx5_rxmode.c | 6 ++++--
 drivers/net/mlx5/mlx5_rxq.c    | 7 ++++---
 4 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 9ed1491..8c9e713 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5406,7 +5406,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
 		rte_eal_alarm_cancel(mlx4_dev_link_status_handler, dev);
 	priv->pending_alarm = 0;
 	priv->intr_handle.fd = 0;
-	priv->intr_handle.type = 0;
+	priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 36b369e..6f5ece9 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1012,7 +1012,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
 		rte_eal_alarm_cancel(mlx5_dev_link_status_handler, dev);
 	priv->pending_alarm = 0;
 	priv->intr_handle.fd = 0;
-	priv->intr_handle.type = 0;
+	priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c
index 3a55f63..5abfef6 100644
--- a/drivers/net/mlx5/mlx5_rxmode.c
+++ b/drivers/net/mlx5/mlx5_rxmode.c
@@ -355,7 +355,8 @@ priv_special_flow_enable_all(struct priv *priv)
 {
 	enum hash_rxq_flow_type flow_type;
 
-	for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) {
+	for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC;
+			flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) {
 		int ret;
 
 		ret = priv_special_flow_enable(priv, flow_type);
@@ -380,7 +381,8 @@ priv_special_flow_disable_all(struct priv *priv)
 {
 	enum hash_rxq_flow_type flow_type;
 
-	for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type)
+	for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC;
+			flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type)
 		priv_special_flow_disable(priv, flow_type);
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index cbb017b..9928a26 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -279,7 +279,7 @@ priv_flow_attr(struct priv *priv, struct ibv_exp_flow_attr *flow_attr,
 static enum hash_rxq_type
 hash_rxq_type_from_pos(const struct ind_table_init *table, unsigned int pos)
 {
-	enum hash_rxq_type type = 0;
+	enum hash_rxq_type type = HASH_RXQ_TCPV4;
 
 	assert(pos < table->hash_types_n);
 	do {
@@ -616,9 +616,10 @@ priv_allow_flow_type(struct priv *priv, enum hash_rxq_flow_type type)
 int
 priv_rehash_flows(struct priv *priv)
 {
-	unsigned int i;
+	enum hash_rxq_flow_type i;
 
-	for (i = 0; (i != RTE_DIM((*priv->hash_rxqs)[0].special_flow)); ++i)
+	for (i = HASH_RXQ_FLOW_TYPE_PROMISC;
+			i != RTE_DIM((*priv->hash_rxqs)[0].special_flow); ++i)
 		if (!priv_allow_flow_type(priv, i)) {
 			priv_special_flow_disable(priv, i);
 		} else {
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v2] mlx: fix icc compilation error
  2016-06-14 15:22   ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
@ 2016-06-14 15:31     ` Adrien Mazarguil
  2016-06-14 15:39     ` Thomas Monjalon
  2016-06-14 16:17     ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
  2 siblings, 0 replies; 10+ messages in thread
From: Adrien Mazarguil @ 2016-06-14 15:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Tue, Jun 14, 2016 at 04:22:10PM +0100, Ferruh Yigit wrote:
> Compilation errors:
> mlx4:
>   CC mlx4.o
>   .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
>   mixed with another type
>           priv->intr_handle.type = 0;
>                                  ^
> 
> mlx5:
>   CC em_rxtx.o
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
> error #188: enumerated type mixed with another type
>         enum hash_rxq_type type = 0;
>                                   ^
> 
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
> error #188: enumerated type mixed with another type
>                 if (!priv_allow_flow_type(priv, i)) {
>                                                 ^
> more same type of error
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  drivers/net/mlx4/mlx4.c        | 2 +-
>  drivers/net/mlx5/mlx5_ethdev.c | 2 +-
>  drivers/net/mlx5/mlx5_rxmode.c | 6 ++++--
>  drivers/net/mlx5/mlx5_rxq.c    | 7 ++++---
>  4 files changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
> index 9ed1491..8c9e713 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -5406,7 +5406,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
>  		rte_eal_alarm_cancel(mlx4_dev_link_status_handler, dev);
>  	priv->pending_alarm = 0;
>  	priv->intr_handle.fd = 0;
> -	priv->intr_handle.type = 0;
> +	priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
>  }
>  
>  /**
> diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
> index 36b369e..6f5ece9 100644
> --- a/drivers/net/mlx5/mlx5_ethdev.c
> +++ b/drivers/net/mlx5/mlx5_ethdev.c
> @@ -1012,7 +1012,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
>  		rte_eal_alarm_cancel(mlx5_dev_link_status_handler, dev);
>  	priv->pending_alarm = 0;
>  	priv->intr_handle.fd = 0;
> -	priv->intr_handle.type = 0;
> +	priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
>  }
>  
>  /**
> diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c
> index 3a55f63..5abfef6 100644
> --- a/drivers/net/mlx5/mlx5_rxmode.c
> +++ b/drivers/net/mlx5/mlx5_rxmode.c
> @@ -355,7 +355,8 @@ priv_special_flow_enable_all(struct priv *priv)
>  {
>  	enum hash_rxq_flow_type flow_type;
>  
> -	for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) {
> +	for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC;
> +			flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) {
>  		int ret;

OK, only a small complaint about indentation, considering the width of that
for statement I suggest one expression per line with all lines indented
similarly for clarity:

 for (a;
      b;
      c) {
    ...
 }

>  
>  		ret = priv_special_flow_enable(priv, flow_type);
> @@ -380,7 +381,8 @@ priv_special_flow_disable_all(struct priv *priv)
>  {
>  	enum hash_rxq_flow_type flow_type;
>  
> -	for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type)
> +	for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC;
> +			flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type)
>  		priv_special_flow_disable(priv, flow_type);
>  }

Same here.

> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index cbb017b..9928a26 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -279,7 +279,7 @@ priv_flow_attr(struct priv *priv, struct ibv_exp_flow_attr *flow_attr,
>  static enum hash_rxq_type
>  hash_rxq_type_from_pos(const struct ind_table_init *table, unsigned int pos)
>  {
> -	enum hash_rxq_type type = 0;
> +	enum hash_rxq_type type = HASH_RXQ_TCPV4;
>  
>  	assert(pos < table->hash_types_n);
>  	do {
> @@ -616,9 +616,10 @@ priv_allow_flow_type(struct priv *priv, enum hash_rxq_flow_type type)
>  int
>  priv_rehash_flows(struct priv *priv)
>  {
> -	unsigned int i;
> +	enum hash_rxq_flow_type i;
>  
> -	for (i = 0; (i != RTE_DIM((*priv->hash_rxqs)[0].special_flow)); ++i)
> +	for (i = HASH_RXQ_FLOW_TYPE_PROMISC;
> +			i != RTE_DIM((*priv->hash_rxqs)[0].special_flow); ++i)

Here also.

>  		if (!priv_allow_flow_type(priv, i)) {
>  			priv_special_flow_disable(priv, i);
>  		} else {
> -- 
> 2.5.5
> 

Otherwise that fix looks fine, thanks.

-- 
Adrien Mazarguil
6WIND

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

* Re: [dpdk-dev] [PATCH v2] mlx: fix icc compilation error
  2016-06-14 15:22   ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  2016-06-14 15:31     ` Adrien Mazarguil
@ 2016-06-14 15:39     ` Thomas Monjalon
  2016-06-14 16:02       ` Ferruh Yigit
  2016-06-14 16:17     ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2016-06-14 15:39 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Adrien Mazarguil

2016-06-14 16:22, Ferruh Yigit:
> Compilation errors:
> mlx4:
>   CC mlx4.o
>   .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
>   mixed with another type
>           priv->intr_handle.type = 0;
>                                  ^
> 
> mlx5:
>   CC em_rxtx.o
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
> error #188: enumerated type mixed with another type
>         enum hash_rxq_type type = 0;
>                                   ^
> 
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
> error #188: enumerated type mixed with another type
>                 if (!priv_allow_flow_type(priv, i)) {
>                                                 ^
> more same type of error
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Please add a Fixes line.
We need to think about the stable branch maintainer's task ;)

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

* Re: [dpdk-dev] [PATCH v2] mlx: fix icc compilation error
  2016-06-14 15:39     ` Thomas Monjalon
@ 2016-06-14 16:02       ` Ferruh Yigit
  2016-06-14 16:18         ` Thomas Monjalon
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2016-06-14 16:02 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Adrien Mazarguil

On 6/14/2016 4:39 PM, Thomas Monjalon wrote:
> 2016-06-14 16:22, Ferruh Yigit:
>> Compilation errors:
>> mlx4:
>>   CC mlx4.o
>>   .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
>>   mixed with another type
>>           priv->intr_handle.type = 0;
>>                                  ^
>>
>> mlx5:
>>   CC em_rxtx.o
>> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
>> error #188: enumerated type mixed with another type
>>         enum hash_rxq_type type = 0;
>>                                   ^
>>
>> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
>> error #188: enumerated type mixed with another type
>>                 if (!priv_allow_flow_type(priv, i)) {
>>                                                 ^
>> more same type of error
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Please add a Fixes line.
> We need to think about the stable branch maintainer's task ;)
> 
I wasn't sure to add Fixes line for this patch, because it is not so
useful reference since patch doesn't really fixes the code, just
compilation error and touches a few different location that is scope of
different commits:

Fixes: c4da6caa426d ("mlx4: handle link status interrupts")
Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
Fixes: 0d2186743d62 ("mlx5: manage all special flow types at once")
Fixes: 612ad38209f7 ("mlx5: fix hash Rx queue type in RSS mode")
Fixes: 083c2dd31776 ("mlx5: refactor special flows handling")

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

* [dpdk-dev] [PATCH v3] mlx: fix icc compilation error
  2016-06-14 15:22   ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  2016-06-14 15:31     ` Adrien Mazarguil
  2016-06-14 15:39     ` Thomas Monjalon
@ 2016-06-14 16:17     ` Ferruh Yigit
  2016-06-16  7:58       ` Adrien Mazarguil
  2 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2016-06-14 16:17 UTC (permalink / raw)
  To: dev; +Cc: Adrien Mazarguil, Ferruh Yigit

Compilation errors:
mlx4:
  CC mlx4.o
  .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
  mixed with another type
          priv->intr_handle.type = 0;
                                 ^

mlx5:
  CC em_rxtx.o
.../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
error #188: enumerated type mixed with another type
        enum hash_rxq_type type = 0;
                                  ^

.../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
error #188: enumerated type mixed with another type
                if (!priv_allow_flow_type(priv, i)) {
                                                ^
more same type of error

Fixes: c4da6caa426d ("mlx4: handle link status interrupts")
Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
Fixes: 0d2186743d62 ("mlx5: manage all special flow types at once")
Fixes: 612ad38209f7 ("mlx5: fix hash Rx queue type in RSS mode")
Fixes: 083c2dd31776 ("mlx5: refactor special flows handling")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/mlx4/mlx4.c        | 2 +-
 drivers/net/mlx5/mlx5_ethdev.c | 2 +-
 drivers/net/mlx5/mlx5_rxmode.c | 8 ++++++--
 drivers/net/mlx5/mlx5_rxq.c    | 8 +++++---
 4 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 9ed1491..8c9e713 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5406,7 +5406,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
 		rte_eal_alarm_cancel(mlx4_dev_link_status_handler, dev);
 	priv->pending_alarm = 0;
 	priv->intr_handle.fd = 0;
-	priv->intr_handle.type = 0;
+	priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 36b369e..6f5ece9 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1012,7 +1012,7 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
 		rte_eal_alarm_cancel(mlx5_dev_link_status_handler, dev);
 	priv->pending_alarm = 0;
 	priv->intr_handle.fd = 0;
-	priv->intr_handle.type = 0;
+	priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_rxmode.c b/drivers/net/mlx5/mlx5_rxmode.c
index 3a55f63..3e779be 100644
--- a/drivers/net/mlx5/mlx5_rxmode.c
+++ b/drivers/net/mlx5/mlx5_rxmode.c
@@ -355,7 +355,9 @@ priv_special_flow_enable_all(struct priv *priv)
 {
 	enum hash_rxq_flow_type flow_type;
 
-	for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type) {
+	for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC;
+			flow_type != HASH_RXQ_FLOW_TYPE_MAC;
+			++flow_type) {
 		int ret;
 
 		ret = priv_special_flow_enable(priv, flow_type);
@@ -380,7 +382,9 @@ priv_special_flow_disable_all(struct priv *priv)
 {
 	enum hash_rxq_flow_type flow_type;
 
-	for (flow_type = 0; flow_type != HASH_RXQ_FLOW_TYPE_MAC; ++flow_type)
+	for (flow_type = HASH_RXQ_FLOW_TYPE_PROMISC;
+			flow_type != HASH_RXQ_FLOW_TYPE_MAC;
+			++flow_type)
 		priv_special_flow_disable(priv, flow_type);
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index cbb017b..f09ea8f 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -279,7 +279,7 @@ priv_flow_attr(struct priv *priv, struct ibv_exp_flow_attr *flow_attr,
 static enum hash_rxq_type
 hash_rxq_type_from_pos(const struct ind_table_init *table, unsigned int pos)
 {
-	enum hash_rxq_type type = 0;
+	enum hash_rxq_type type = HASH_RXQ_TCPV4;
 
 	assert(pos < table->hash_types_n);
 	do {
@@ -616,9 +616,11 @@ priv_allow_flow_type(struct priv *priv, enum hash_rxq_flow_type type)
 int
 priv_rehash_flows(struct priv *priv)
 {
-	unsigned int i;
+	enum hash_rxq_flow_type i;
 
-	for (i = 0; (i != RTE_DIM((*priv->hash_rxqs)[0].special_flow)); ++i)
+	for (i = HASH_RXQ_FLOW_TYPE_PROMISC;
+			i != RTE_DIM((*priv->hash_rxqs)[0].special_flow);
+			++i)
 		if (!priv_allow_flow_type(priv, i)) {
 			priv_special_flow_disable(priv, i);
 		} else {
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v2] mlx: fix icc compilation error
  2016-06-14 16:02       ` Ferruh Yigit
@ 2016-06-14 16:18         ` Thomas Monjalon
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Monjalon @ 2016-06-14 16:18 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Adrien Mazarguil

2016-06-14 17:02, Ferruh Yigit:
> On 6/14/2016 4:39 PM, Thomas Monjalon wrote:
> > 2016-06-14 16:22, Ferruh Yigit:
> >> Compilation errors:
> >> mlx4:
> >>   CC mlx4.o
> >>   .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
> >>   mixed with another type
> >>           priv->intr_handle.type = 0;
> >>                                  ^
> >>
> >> mlx5:
> >>   CC em_rxtx.o
> >> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
> >> error #188: enumerated type mixed with another type
> >>         enum hash_rxq_type type = 0;
> >>                                   ^
> >>
> >> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
> >> error #188: enumerated type mixed with another type
> >>                 if (!priv_allow_flow_type(priv, i)) {
> >>                                                 ^
> >> more same type of error
> >>
> >> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > 
> > Please add a Fixes line.
> > We need to think about the stable branch maintainer's task ;)
> > 
> I wasn't sure to add Fixes line for this patch, because it is not so
> useful reference since patch doesn't really fixes the code, just
> compilation error and touches a few different location that is scope of
> different commits:
> 
> Fixes: c4da6caa426d ("mlx4: handle link status interrupts")
> Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
> Fixes: 0d2186743d62 ("mlx5: manage all special flow types at once")
> Fixes: 612ad38209f7 ("mlx5: fix hash Rx queue type in RSS mode")
> Fixes: 083c2dd31776 ("mlx5: refactor special flows handling")

Indeed.
Another way to help the maintenance is to give a tag where it was working,
e.g. it has been broken after the release v2.5...

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

* Re: [dpdk-dev] [PATCH v3] mlx: fix icc compilation error
  2016-06-14 16:17     ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
@ 2016-06-16  7:58       ` Adrien Mazarguil
  2016-06-28 10:08         ` Bruce Richardson
  0 siblings, 1 reply; 10+ messages in thread
From: Adrien Mazarguil @ 2016-06-16  7:58 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Tue, Jun 14, 2016 at 05:17:24PM +0100, Ferruh Yigit wrote:
> Compilation errors:
> mlx4:
>   CC mlx4.o
>   .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
>   mixed with another type
>           priv->intr_handle.type = 0;
>                                  ^
> 
> mlx5:
>   CC em_rxtx.o
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
> error #188: enumerated type mixed with another type
>         enum hash_rxq_type type = 0;
>                                   ^
> 
> .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
> error #188: enumerated type mixed with another type
>                 if (!priv_allow_flow_type(priv, i)) {
>                                                 ^
> more same type of error
> 
> Fixes: c4da6caa426d ("mlx4: handle link status interrupts")
> Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
> Fixes: 0d2186743d62 ("mlx5: manage all special flow types at once")
> Fixes: 612ad38209f7 ("mlx5: fix hash Rx queue type in RSS mode")
> Fixes: 083c2dd31776 ("mlx5: refactor special flows handling")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

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

* Re: [dpdk-dev] [PATCH v3] mlx: fix icc compilation error
  2016-06-16  7:58       ` Adrien Mazarguil
@ 2016-06-28 10:08         ` Bruce Richardson
  0 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2016-06-28 10:08 UTC (permalink / raw)
  To: Ferruh Yigit, dev

On Thu, Jun 16, 2016 at 09:58:23AM +0200, Adrien Mazarguil wrote:
> On Tue, Jun 14, 2016 at 05:17:24PM +0100, Ferruh Yigit wrote:
> > Compilation errors:
> > mlx4:
> >   CC mlx4.o
> >   .../dpdk/drivers/net/mlx4/mlx4.c(5409): error #188: enumerated type
> >   mixed with another type
> >           priv->intr_handle.type = 0;
> >                                  ^
> > 
> > mlx5:
> >   CC em_rxtx.o
> > .../dpdk/drivers/net/mlx5/mlx5_rxq.c(282):
> > error #188: enumerated type mixed with another type
> >         enum hash_rxq_type type = 0;
> >                                   ^
> > 
> > .../dpdk/drivers/net/mlx5/mlx5_rxq.c(622):
> > error #188: enumerated type mixed with another type
> >                 if (!priv_allow_flow_type(priv, i)) {
> >                                                 ^
> > more same type of error
> > 
> > Fixes: c4da6caa426d ("mlx4: handle link status interrupts")
> > Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
> > Fixes: 0d2186743d62 ("mlx5: manage all special flow types at once")
> > Fixes: 612ad38209f7 ("mlx5: fix hash Rx queue type in RSS mode")
> > Fixes: 083c2dd31776 ("mlx5: refactor special flows handling")
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> 
> -- 
> Adrien Mazarguil
> 6WIND

Applied to dpdk-next-net/rel_16_07

/Bruce

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

end of thread, other threads:[~2016-06-28 10:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14  9:51 [dpdk-dev] [PATCH] mlx: fix icc compilation error Ferruh Yigit
2016-06-14 10:03 ` Bruce Richardson
2016-06-14 15:22   ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2016-06-14 15:31     ` Adrien Mazarguil
2016-06-14 15:39     ` Thomas Monjalon
2016-06-14 16:02       ` Ferruh Yigit
2016-06-14 16:18         ` Thomas Monjalon
2016-06-14 16:17     ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2016-06-16  7:58       ` Adrien Mazarguil
2016-06-28 10:08         ` Bruce Richardson

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).