DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] fix big endian build
@ 2019-04-09 19:49 Thomas Monjalon
  2019-04-09 19:49 ` Thomas Monjalon
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 19:49 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu, ajit.khaparde, somnath.kotur; +Cc: ferruh.yigit, dev

There are at least 4 issues when compiling with a big endian toolchain.
2 of them are fixed in this patchset.
The remaining ones are in ice and bnxt PMDs.

About ice, the error is:
    drivers/net/ice/base/ice_flex_pipe.c:302:8: error:
    ‘state.entry_idx’ may be used uninitialized in this function
It is not obvious to fix, there may be few places where
a struct should be initialized. Please fix it soon.

About bnxt, the issue looks like a mistake reproduced several times:
    drivers/net/bnxt/bnxt_ethdev.c:2652:19: error:
    invalid use of void expression
    rte_cpu_to_le_32(rte_write32(reg_base, (uint8_t *)bp->bar0 + win_off));
The pattern "rte_cpu_to_le_32(rte_write32(" can be seen 4 times.
The result of the endian conversion is never used.
Please fix it soon.


Thomas Monjalon (2):
  mbuf: fix big endian build
  net/enetc: fix big endian build

 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 lib/librte_mbuf/rte_mbuf.h     | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
2.21.0

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

* [dpdk-dev] [PATCH 0/2] fix big endian build
  2019-04-09 19:49 [dpdk-dev] [PATCH 0/2] fix big endian build Thomas Monjalon
@ 2019-04-09 19:49 ` Thomas Monjalon
  2019-04-09 19:49 ` [dpdk-dev] [PATCH 1/2] mbuf: " Thomas Monjalon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 19:49 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu, ajit.khaparde, somnath.kotur; +Cc: ferruh.yigit, dev

There are at least 4 issues when compiling with a big endian toolchain.
2 of them are fixed in this patchset.
The remaining ones are in ice and bnxt PMDs.

About ice, the error is:
    drivers/net/ice/base/ice_flex_pipe.c:302:8: error:
    ‘state.entry_idx’ may be used uninitialized in this function
It is not obvious to fix, there may be few places where
a struct should be initialized. Please fix it soon.

About bnxt, the issue looks like a mistake reproduced several times:
    drivers/net/bnxt/bnxt_ethdev.c:2652:19: error:
    invalid use of void expression
    rte_cpu_to_le_32(rte_write32(reg_base, (uint8_t *)bp->bar0 + win_off));
The pattern "rte_cpu_to_le_32(rte_write32(" can be seen 4 times.
The result of the endian conversion is never used.
Please fix it soon.


Thomas Monjalon (2):
  mbuf: fix big endian build
  net/enetc: fix big endian build

 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 lib/librte_mbuf/rte_mbuf.h     | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
2.21.0


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

* [dpdk-dev] [PATCH 1/2] mbuf: fix big endian build
  2019-04-09 19:49 [dpdk-dev] [PATCH 0/2] fix big endian build Thomas Monjalon
  2019-04-09 19:49 ` Thomas Monjalon
@ 2019-04-09 19:49 ` Thomas Monjalon
  2019-04-09 19:49   ` Thomas Monjalon
  2019-04-09 19:49 ` [dpdk-dev] [PATCH 2/2] net/enetc: " Thomas Monjalon
  2019-04-09 20:06 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
  3 siblings, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 19:49 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu, ajit.khaparde, somnath.kotur, Olivier Matz
  Cc: ferruh.yigit, dev, konstantin.ananyev

Compilation was failing when using a big endian toolchain:

rte_mbuf.h:504:2: error: expected ‘,’ or ‘}’ before ‘RTE_MBUF_L3_LEN_OFS’

Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
Cc: konstantin.ananyev@intel.com

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_mbuf/rte_mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index f7886dcb3..7dd2e7fb3 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -500,7 +500,7 @@ enum {
 		RTE_MBUF_OUTL2_LEN_BITS,
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
 	RTE_MBUF_L2_LEN_OFS =
-		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
+		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
 	RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
 	RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
 	RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
-- 
2.21.0

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

* [dpdk-dev] [PATCH 1/2] mbuf: fix big endian build
  2019-04-09 19:49 ` [dpdk-dev] [PATCH 1/2] mbuf: " Thomas Monjalon
@ 2019-04-09 19:49   ` Thomas Monjalon
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 19:49 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu, ajit.khaparde, somnath.kotur, Olivier Matz
  Cc: ferruh.yigit, dev, konstantin.ananyev

Compilation was failing when using a big endian toolchain:

rte_mbuf.h:504:2: error: expected ‘,’ or ‘}’ before ‘RTE_MBUF_L3_LEN_OFS’

Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
Cc: konstantin.ananyev@intel.com

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_mbuf/rte_mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index f7886dcb3..7dd2e7fb3 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -500,7 +500,7 @@ enum {
 		RTE_MBUF_OUTL2_LEN_BITS,
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
 	RTE_MBUF_L2_LEN_OFS =
-		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
+		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
 	RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
 	RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
 	RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
-- 
2.21.0


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

* [dpdk-dev] [PATCH 2/2] net/enetc: fix big endian build
  2019-04-09 19:49 [dpdk-dev] [PATCH 0/2] fix big endian build Thomas Monjalon
  2019-04-09 19:49 ` Thomas Monjalon
  2019-04-09 19:49 ` [dpdk-dev] [PATCH 1/2] mbuf: " Thomas Monjalon
@ 2019-04-09 19:49 ` Thomas Monjalon
  2019-04-09 19:49   ` Thomas Monjalon
  2019-04-09 20:06 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
  3 siblings, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 19:49 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu, ajit.khaparde, somnath.kotur,
	Gagandeep Singh, Pankaj Chauhan
  Cc: ferruh.yigit, dev, stable

Compilation was failing when using a big endian toolchain:

drivers/net/enetc/enetc_rxtx.c:92:21: error:
	passing argument 1 of ‘rte_constant_bswap64’
	makes integer from pointer without a cast

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
Cc: g.singh@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index 631e2430d..2a7362add 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -88,8 +88,9 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int buff_cnt)
 	rx_swbd = &rx_ring->q_swbd[i];
 	rxbd = ENETC_RXBD(*rx_ring, i);
 	for (j = 0; j < buff_cnt; j++) {
-		rx_swbd->buffer_addr =
-			rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
+		rx_swbd->buffer_addr = (void*)(uintptr_t)
+			rte_cpu_to_le_64((uint64_t)(uintptr_t)
+			                 rte_mbuf_raw_alloc(rx_ring->mb_pool));
 		rxbd->w.addr = (uint64_t)(uintptr_t)
 			       rx_swbd->buffer_addr->buf_addr +
 			       rx_swbd->buffer_addr->data_off;
-- 
2.21.0

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

* [dpdk-dev] [PATCH 2/2] net/enetc: fix big endian build
  2019-04-09 19:49 ` [dpdk-dev] [PATCH 2/2] net/enetc: " Thomas Monjalon
@ 2019-04-09 19:49   ` Thomas Monjalon
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 19:49 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu, ajit.khaparde, somnath.kotur,
	Gagandeep Singh, Pankaj Chauhan
  Cc: ferruh.yigit, dev, stable

Compilation was failing when using a big endian toolchain:

drivers/net/enetc/enetc_rxtx.c:92:21: error:
	passing argument 1 of ‘rte_constant_bswap64’
	makes integer from pointer without a cast

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
Cc: g.singh@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index 631e2430d..2a7362add 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -88,8 +88,9 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int buff_cnt)
 	rx_swbd = &rx_ring->q_swbd[i];
 	rxbd = ENETC_RXBD(*rx_ring, i);
 	for (j = 0; j < buff_cnt; j++) {
-		rx_swbd->buffer_addr =
-			rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
+		rx_swbd->buffer_addr = (void*)(uintptr_t)
+			rte_cpu_to_le_64((uint64_t)(uintptr_t)
+			                 rte_mbuf_raw_alloc(rx_ring->mb_pool));
 		rxbd->w.addr = (uint64_t)(uintptr_t)
 			       rx_swbd->buffer_addr->buf_addr +
 			       rx_swbd->buffer_addr->data_off;
-- 
2.21.0


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

* [dpdk-dev] [PATCH v2 0/2] fix big endian build
  2019-04-09 19:49 [dpdk-dev] [PATCH 0/2] fix big endian build Thomas Monjalon
                   ` (2 preceding siblings ...)
  2019-04-09 19:49 ` [dpdk-dev] [PATCH 2/2] net/enetc: " Thomas Monjalon
@ 2019-04-09 20:06 ` Thomas Monjalon
  2019-04-09 20:06   ` Thomas Monjalon
                     ` (2 more replies)
  3 siblings, 3 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 20:06 UTC (permalink / raw)
  Cc: dev

There are at least 4 issues when compiling with a big endian toolchain.
2 of them are fixed in this patchset.
The remaining ones are in ice and bnxt PMDs.

About ice, the error is:
    drivers/net/ice/base/ice_flex_pipe.c:302:8: error:
    ‘state.entry_idx’ may be used uninitialized in this function
It is not obvious to fix, there may be few places where
a struct should be initialized. Please fix it soon.

About bnxt, the issue looks like a mistake reproduced several times:
    drivers/net/bnxt/bnxt_ethdev.c:2652:19: error:
    invalid use of void expression
    rte_cpu_to_le_32(rte_write32(reg_base, (uint8_t *)bp->bar0 + win_off));
The pattern "rte_cpu_to_le_32(rte_write32(" can be seen 4 times.
The result of the endian conversion is never used.
Please fix it soon.


Thomas Monjalon (2):
  mbuf: fix big endian build
  net/enetc: fix big endian build


v2 for checkpatch


 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 lib/librte_mbuf/rte_mbuf.h     | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
2.21.0

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

* [dpdk-dev] [PATCH v2 0/2] fix big endian build
  2019-04-09 20:06 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
@ 2019-04-09 20:06   ` Thomas Monjalon
  2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 1/2] mbuf: " Thomas Monjalon
  2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 2/2] net/enetc: " Thomas Monjalon
  2 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 20:06 UTC (permalink / raw)
  Cc: dev

There are at least 4 issues when compiling with a big endian toolchain.
2 of them are fixed in this patchset.
The remaining ones are in ice and bnxt PMDs.

About ice, the error is:
    drivers/net/ice/base/ice_flex_pipe.c:302:8: error:
    ‘state.entry_idx’ may be used uninitialized in this function
It is not obvious to fix, there may be few places where
a struct should be initialized. Please fix it soon.

About bnxt, the issue looks like a mistake reproduced several times:
    drivers/net/bnxt/bnxt_ethdev.c:2652:19: error:
    invalid use of void expression
    rte_cpu_to_le_32(rte_write32(reg_base, (uint8_t *)bp->bar0 + win_off));
The pattern "rte_cpu_to_le_32(rte_write32(" can be seen 4 times.
The result of the endian conversion is never used.
Please fix it soon.


Thomas Monjalon (2):
  mbuf: fix big endian build
  net/enetc: fix big endian build


v2 for checkpatch


 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 lib/librte_mbuf/rte_mbuf.h     | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
2.21.0


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

* [dpdk-dev] [PATCH v2 1/2] mbuf: fix big endian build
  2019-04-09 20:06 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
  2019-04-09 20:06   ` Thomas Monjalon
@ 2019-04-09 20:06   ` Thomas Monjalon
  2019-04-09 20:06     ` Thomas Monjalon
  2019-04-09 22:55     ` Ananyev, Konstantin
  2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 2/2] net/enetc: " Thomas Monjalon
  2 siblings, 2 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 20:06 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, konstantin.ananyev

Compilation was failing when using a big endian toolchain:

rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS'

Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
Cc: konstantin.ananyev@intel.com

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_mbuf/rte_mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index f7886dcb3..7dd2e7fb3 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -500,7 +500,7 @@ enum {
 		RTE_MBUF_OUTL2_LEN_BITS,
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
 	RTE_MBUF_L2_LEN_OFS =
-		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
+		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
 	RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
 	RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
 	RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
-- 
2.21.0

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

* [dpdk-dev] [PATCH v2 1/2] mbuf: fix big endian build
  2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 1/2] mbuf: " Thomas Monjalon
@ 2019-04-09 20:06     ` Thomas Monjalon
  2019-04-09 22:55     ` Ananyev, Konstantin
  1 sibling, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 20:06 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, konstantin.ananyev

Compilation was failing when using a big endian toolchain:

rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS'

Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
Cc: konstantin.ananyev@intel.com

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_mbuf/rte_mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index f7886dcb3..7dd2e7fb3 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -500,7 +500,7 @@ enum {
 		RTE_MBUF_OUTL2_LEN_BITS,
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
 	RTE_MBUF_L2_LEN_OFS =
-		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
+		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
 	RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
 	RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
 	RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
-- 
2.21.0


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

* [dpdk-dev] [PATCH v2 2/2] net/enetc: fix big endian build
  2019-04-09 20:06 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
  2019-04-09 20:06   ` Thomas Monjalon
  2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 1/2] mbuf: " Thomas Monjalon
@ 2019-04-09 20:06   ` Thomas Monjalon
  2019-04-09 20:06     ` Thomas Monjalon
  2 siblings, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 20:06 UTC (permalink / raw)
  To: Gagandeep Singh, Pankaj Chauhan; +Cc: dev, stable

Compilation was failing when using a big endian toolchain:

drivers/net/enetc/enetc_rxtx.c:92:21: error:
	passing argument 1 of 'rte_constant_bswap64'
	makes integer from pointer without a cast

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
Cc: g.singh@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index 631e2430d..ef0d7919f 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -88,8 +88,9 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int buff_cnt)
 	rx_swbd = &rx_ring->q_swbd[i];
 	rxbd = ENETC_RXBD(*rx_ring, i);
 	for (j = 0; j < buff_cnt; j++) {
-		rx_swbd->buffer_addr =
-			rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
+		rx_swbd->buffer_addr = (void *)(uintptr_t)
+			rte_cpu_to_le_64((uint64_t)(uintptr_t)
+					rte_mbuf_raw_alloc(rx_ring->mb_pool));
 		rxbd->w.addr = (uint64_t)(uintptr_t)
 			       rx_swbd->buffer_addr->buf_addr +
 			       rx_swbd->buffer_addr->data_off;
-- 
2.21.0

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

* [dpdk-dev] [PATCH v2 2/2] net/enetc: fix big endian build
  2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 2/2] net/enetc: " Thomas Monjalon
@ 2019-04-09 20:06     ` Thomas Monjalon
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-09 20:06 UTC (permalink / raw)
  To: Gagandeep Singh, Pankaj Chauhan; +Cc: dev, stable

Compilation was failing when using a big endian toolchain:

drivers/net/enetc/enetc_rxtx.c:92:21: error:
	passing argument 1 of 'rte_constant_bswap64'
	makes integer from pointer without a cast

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
Cc: g.singh@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index 631e2430d..ef0d7919f 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -88,8 +88,9 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int buff_cnt)
 	rx_swbd = &rx_ring->q_swbd[i];
 	rxbd = ENETC_RXBD(*rx_ring, i);
 	for (j = 0; j < buff_cnt; j++) {
-		rx_swbd->buffer_addr =
-			rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
+		rx_swbd->buffer_addr = (void *)(uintptr_t)
+			rte_cpu_to_le_64((uint64_t)(uintptr_t)
+					rte_mbuf_raw_alloc(rx_ring->mb_pool));
 		rxbd->w.addr = (uint64_t)(uintptr_t)
 			       rx_swbd->buffer_addr->buf_addr +
 			       rx_swbd->buffer_addr->data_off;
-- 
2.21.0


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

* Re: [dpdk-dev] [PATCH v2 1/2] mbuf: fix big endian build
  2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 1/2] mbuf: " Thomas Monjalon
  2019-04-09 20:06     ` Thomas Monjalon
@ 2019-04-09 22:55     ` Ananyev, Konstantin
  2019-04-09 22:55       ` Ananyev, Konstantin
  2019-04-22 13:28       ` Thomas Monjalon
  1 sibling, 2 replies; 20+ messages in thread
From: Ananyev, Konstantin @ 2019-04-09 22:55 UTC (permalink / raw)
  To: Thomas Monjalon, Olivier Matz; +Cc: dev



> 
> Compilation was failing when using a big endian toolchain:
> 
> rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS'
> 
> Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
> Cc: konstantin.ananyev@intel.com
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  lib/librte_mbuf/rte_mbuf.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index f7886dcb3..7dd2e7fb3 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -500,7 +500,7 @@ enum {
>  		RTE_MBUF_OUTL2_LEN_BITS,
>  #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
>  	RTE_MBUF_L2_LEN_OFS =
> -		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
> +		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
>  	RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
>  	RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
>  	RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
> --

Thanks for fixing
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.21.0

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

* Re: [dpdk-dev] [PATCH v2 1/2] mbuf: fix big endian build
  2019-04-09 22:55     ` Ananyev, Konstantin
@ 2019-04-09 22:55       ` Ananyev, Konstantin
  2019-04-22 13:28       ` Thomas Monjalon
  1 sibling, 0 replies; 20+ messages in thread
From: Ananyev, Konstantin @ 2019-04-09 22:55 UTC (permalink / raw)
  To: Thomas Monjalon, Olivier Matz; +Cc: dev



> 
> Compilation was failing when using a big endian toolchain:
> 
> rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS'
> 
> Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
> Cc: konstantin.ananyev@intel.com
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  lib/librte_mbuf/rte_mbuf.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> index f7886dcb3..7dd2e7fb3 100644
> --- a/lib/librte_mbuf/rte_mbuf.h
> +++ b/lib/librte_mbuf/rte_mbuf.h
> @@ -500,7 +500,7 @@ enum {
>  		RTE_MBUF_OUTL2_LEN_BITS,
>  #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
>  	RTE_MBUF_L2_LEN_OFS =
> -		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS
> +		sizeof(uint64_t) * CHAR_BIT - RTE_MBUF_L2_LEN_BITS,
>  	RTE_MBUF_L3_LEN_OFS = RTE_MBUF_L2_LEN_OFS - RTE_MBUF_L3_LEN_BITS,
>  	RTE_MBUF_L4_LEN_OFS = RTE_MBUF_L3_LEN_OFS - RTE_MBUF_L4_LEN_BITS,
>  	RTE_MBUF_TSO_SEGSZ_OFS = RTE_MBUF_L4_LEN_OFS - RTE_MBUF_TSO_SEGSZ_BITS,
> --

Thanks for fixing
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.21.0


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

* Re: [dpdk-dev] [PATCH v2 1/2] mbuf: fix big endian build
  2019-04-09 22:55     ` Ananyev, Konstantin
  2019-04-09 22:55       ` Ananyev, Konstantin
@ 2019-04-22 13:28       ` Thomas Monjalon
  2019-04-22 13:28         ` Thomas Monjalon
  1 sibling, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-22 13:28 UTC (permalink / raw)
  To: dev; +Cc: Ananyev, Konstantin, Olivier Matz

> > Compilation was failing when using a big endian toolchain:
> > 
> > rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS'
> > 
> > Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
> > Cc: konstantin.ananyev@intel.com
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Thanks for fixing
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied alone because patch 2 has been integrated in another patchset.

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

* Re: [dpdk-dev] [PATCH v2 1/2] mbuf: fix big endian build
  2019-04-22 13:28       ` Thomas Monjalon
@ 2019-04-22 13:28         ` Thomas Monjalon
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-22 13:28 UTC (permalink / raw)
  To: dev; +Cc: Ananyev, Konstantin, Olivier Matz

> > Compilation was failing when using a big endian toolchain:
> > 
> > rte_mbuf.h:504:2: error: expected ',' or '}' before 'RTE_MBUF_L3_LEN_OFS'
> > 
> > Fixes: 8d9c2c3a1f01 ("mbuf: add function to generate raw Tx offload value")
> > Cc: konstantin.ananyev@intel.com
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Thanks for fixing
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied alone because patch 2 has been integrated in another patchset.




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

* Re: [dpdk-dev] [PATCH v2 2/2] net/enetc: fix big endian build
  2019-04-10 11:27 Gagandeep Singh
  2019-04-10 11:27 ` Gagandeep Singh
@ 2019-04-10 11:43 ` Thomas Monjalon
  2019-04-10 11:43   ` Thomas Monjalon
  1 sibling, 1 reply; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-10 11:43 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Pankaj Chauhan, dev, stable, ferruh.yigit

10/04/2019 13:27, Gagandeep Singh:
> I have sent a patch-set for ENETC driver having some changes in "enetc_refill_rx_ring".
> Is it ok for you if I can merge your changes with my patch-set and push them in v2?
> 
> https://patches.dpdk.org/project/dpdk/list/?series=4173 

Yes, no problem, at the condition it is integrated in 19.05-rc2.

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

* Re: [dpdk-dev] [PATCH v2 2/2] net/enetc: fix big endian build
  2019-04-10 11:43 ` Thomas Monjalon
@ 2019-04-10 11:43   ` Thomas Monjalon
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Monjalon @ 2019-04-10 11:43 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Pankaj Chauhan, dev, stable, ferruh.yigit

10/04/2019 13:27, Gagandeep Singh:
> I have sent a patch-set for ENETC driver having some changes in "enetc_refill_rx_ring".
> Is it ok for you if I can merge your changes with my patch-set and push them in v2?
> 
> https://patches.dpdk.org/project/dpdk/list/?series=4173 

Yes, no problem, at the condition it is integrated in 19.05-rc2.



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

* Re: [dpdk-dev] [PATCH v2 2/2] net/enetc: fix big endian build
@ 2019-04-10 11:27 Gagandeep Singh
  2019-04-10 11:27 ` Gagandeep Singh
  2019-04-10 11:43 ` Thomas Monjalon
  0 siblings, 2 replies; 20+ messages in thread
From: Gagandeep Singh @ 2019-04-10 11:27 UTC (permalink / raw)
  To: Thomas Monjalon, Pankaj Chauhan; +Cc: dev, stable



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, April 10, 2019 1:37 AM
> To: Gagandeep Singh <G.Singh@nxp.com>; Pankaj Chauhan
> <pankaj.chauhan@nxp.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [EXT] [PATCH v2 2/2] net/enetc: fix big endian build
> 
> WARNING: This email was created outside of NXP. DO NOT CLICK links or
> attachments unless you recognize the sender and know the content is safe.
> 
> 
> 
> Compilation was failing when using a big endian toolchain:
> 
> drivers/net/enetc/enetc_rxtx.c:92:21: error:
>         passing argument 1 of 'rte_constant_bswap64'
>         makes integer from pointer without a cast
> 
> Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
> Cc: g.singh@nxp.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  drivers/net/enetc/enetc_rxtx.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
> index 631e2430d..ef0d7919f 100644
> --- a/drivers/net/enetc/enetc_rxtx.c
> +++ b/drivers/net/enetc/enetc_rxtx.c
> @@ -88,8 +88,9 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int
> buff_cnt)
>         rx_swbd = &rx_ring->q_swbd[i];
>         rxbd = ENETC_RXBD(*rx_ring, i);
>         for (j = 0; j < buff_cnt; j++) {
> -               rx_swbd->buffer_addr =
> -                       rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
> +               rx_swbd->buffer_addr = (void *)(uintptr_t)
> +                       rte_cpu_to_le_64((uint64_t)(uintptr_t)
> +                                       rte_mbuf_raw_alloc(rx_ring->mb_pool));
>                 rxbd->w.addr = (uint64_t)(uintptr_t)
>                                rx_swbd->buffer_addr->buf_addr +
>                                rx_swbd->buffer_addr->data_off;
> --
> 2.21.0

Hi Thomas,

I have sent a patch-set for ENETC driver having some changes in "enetc_refill_rx_ring".
Is it ok for you if I can merge your changes with my patch-set and push them in v2?

https://patches.dpdk.org/project/dpdk/list/?series=4173 

Thanks,
Gagan

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

* Re: [dpdk-dev] [PATCH v2 2/2] net/enetc: fix big endian build
  2019-04-10 11:27 Gagandeep Singh
@ 2019-04-10 11:27 ` Gagandeep Singh
  2019-04-10 11:43 ` Thomas Monjalon
  1 sibling, 0 replies; 20+ messages in thread
From: Gagandeep Singh @ 2019-04-10 11:27 UTC (permalink / raw)
  To: Thomas Monjalon, Pankaj Chauhan; +Cc: dev, stable



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, April 10, 2019 1:37 AM
> To: Gagandeep Singh <G.Singh@nxp.com>; Pankaj Chauhan
> <pankaj.chauhan@nxp.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [EXT] [PATCH v2 2/2] net/enetc: fix big endian build
> 
> WARNING: This email was created outside of NXP. DO NOT CLICK links or
> attachments unless you recognize the sender and know the content is safe.
> 
> 
> 
> Compilation was failing when using a big endian toolchain:
> 
> drivers/net/enetc/enetc_rxtx.c:92:21: error:
>         passing argument 1 of 'rte_constant_bswap64'
>         makes integer from pointer without a cast
> 
> Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
> Cc: g.singh@nxp.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  drivers/net/enetc/enetc_rxtx.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
> index 631e2430d..ef0d7919f 100644
> --- a/drivers/net/enetc/enetc_rxtx.c
> +++ b/drivers/net/enetc/enetc_rxtx.c
> @@ -88,8 +88,9 @@ enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int
> buff_cnt)
>         rx_swbd = &rx_ring->q_swbd[i];
>         rxbd = ENETC_RXBD(*rx_ring, i);
>         for (j = 0; j < buff_cnt; j++) {
> -               rx_swbd->buffer_addr =
> -                       rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
> +               rx_swbd->buffer_addr = (void *)(uintptr_t)
> +                       rte_cpu_to_le_64((uint64_t)(uintptr_t)
> +                                       rte_mbuf_raw_alloc(rx_ring->mb_pool));
>                 rxbd->w.addr = (uint64_t)(uintptr_t)
>                                rx_swbd->buffer_addr->buf_addr +
>                                rx_swbd->buffer_addr->data_off;
> --
> 2.21.0

Hi Thomas,

I have sent a patch-set for ENETC driver having some changes in "enetc_refill_rx_ring".
Is it ok for you if I can merge your changes with my patch-set and push them in v2?

https://patches.dpdk.org/project/dpdk/list/?series=4173 

Thanks,
Gagan


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

end of thread, other threads:[~2019-04-22 13:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 19:49 [dpdk-dev] [PATCH 0/2] fix big endian build Thomas Monjalon
2019-04-09 19:49 ` Thomas Monjalon
2019-04-09 19:49 ` [dpdk-dev] [PATCH 1/2] mbuf: " Thomas Monjalon
2019-04-09 19:49   ` Thomas Monjalon
2019-04-09 19:49 ` [dpdk-dev] [PATCH 2/2] net/enetc: " Thomas Monjalon
2019-04-09 19:49   ` Thomas Monjalon
2019-04-09 20:06 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
2019-04-09 20:06   ` Thomas Monjalon
2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 1/2] mbuf: " Thomas Monjalon
2019-04-09 20:06     ` Thomas Monjalon
2019-04-09 22:55     ` Ananyev, Konstantin
2019-04-09 22:55       ` Ananyev, Konstantin
2019-04-22 13:28       ` Thomas Monjalon
2019-04-22 13:28         ` Thomas Monjalon
2019-04-09 20:06   ` [dpdk-dev] [PATCH v2 2/2] net/enetc: " Thomas Monjalon
2019-04-09 20:06     ` Thomas Monjalon
2019-04-10 11:27 Gagandeep Singh
2019-04-10 11:27 ` Gagandeep Singh
2019-04-10 11:43 ` Thomas Monjalon
2019-04-10 11:43   ` Thomas Monjalon

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