[dpdk-dev] [PATCH v4] ixgbe: fix data access on big endian cpu.

2015-07-29 Thread xuelin....@freescale.com
From: Xuelin Shi 1. cpu use data owned by ixgbe must use rte_le_to_cpu_xx(...) 2. cpu fill data to ixgbe must use rte_cpu_to_le_xx(...) 3. checking pci status with converted constant Signed-off-by: Xuelin Shi --- changes for v4: fix compiling error: cpu16 to cpu_16 fix issues reported by ch

[dpdk-dev] [PATCH v4] enforce rules of the cpu and ixgbe exchange data.

2015-07-16 Thread xuelin....@freescale.com
From: Xuelin Shi 1. cpu use data owned by ixgbe must use rte_le_to_cpu_xx(...) 2. cpu fill data to ixgbe must use rte_cpu_to_le_xx(...) 3. checking pci status with converted constant. Signed-off-by: Xuelin Shi --- drivers/net/ixgbe/ixgbe_rxtx.c | 77 --

[dpdk-dev] [PATCH v3] ixgbe: fix data access on big endian cpu

2015-03-31 Thread xuelin....@freescale.com
From: Xuelin Shi enforce rules of the cpu and ixgbe exchange data. 1. cpu use data owned by ixgbe must use rte_le_to_cpu_xx(...) 2. cpu fill data to ixgbe must use rte_cpu_to_le_xx(...) 3. checking pci status with converted constant. Signed-off-by: Xuelin Shi --- change for v3: check pci sta

[dpdk-dev] [PATCH v2] ixgbe: fix ixgbe access endian issue on bigendian arch

2015-03-24 Thread xuelin....@freescale.com
From: Xuelin Shi enforce rules of the cpu and ixgbe exchange data. 1. cpu use data owned by ixgbe must use rte_le_to_cpu_xx(...) 2. cpu fill data to ixgbe must use rte_cpu_to_le_xx(...) Signed-off-by: Xuelin Shi --- changes for v2: rebased on latest head. fix some style issue detected by ch

[dpdk-dev] [PATCH v2] librte_lpm: define tbl entry reversely for big endian

2015-03-24 Thread xuelin....@freescale.com
From: Xuelin Shi This module uses type conversion between struct and int. Also truncation and comparison is used with this int. It is not safe for different endian arch. Add ifdef for big endian struct to fix this issue. Signed-off-by: Xuelin Shi --- changes for v2: add lib/librte_lpm/rte

[dpdk-dev] [PATCH] librte_lpm: define tbl entry reversely for big endian

2015-03-04 Thread xuelin....@freescale.com
From: Xuelin Shi This module uses type conversion between struct and int. Also truncation and comparison is used with this int. It is not safe for different endian arch. Add ifdef for big endian struct to fix this issue. Signed-off-by: Xuelin Shi --- lib/librte_lpm/rte_lpm.h | 19

[dpdk-dev] [PATCH] ixgbe: fix data access on big endian cpu

2015-03-03 Thread xuelin....@freescale.com
From: Xuelin Shi enforce rules for cpu and ixgbe exchanging data. 1. cpu use data owned by ixgbe must use rte_le_to_cpu_xx(...) 2. cpu fill data to ixgbe must use rte_cpu_to_le_xx(...) Signed-off-by: Xuelin Shi --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 115 --

[dpdk-dev] [PATCH] e1000: fix e1000 PCI access endian issue.

2015-02-12 Thread xuelin....@freescale.com
From: Xuelin Shi e1000 is little endian, but cpu maybe not. add necessary conversions. rte_cpu_to_le_32(...) for PCI write rte_le_to_cpu_32(...) for PCI read. Signed-off-by: Xuelin Shi --- lib/librte_pmd_e1000/e1000/e1000_osdep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) dif

[dpdk-dev] [PATCH] ixgbe: fix ixgbe PCI access endian issue

2015-02-12 Thread xuelin....@freescale.com
From: Xuelin Shi ixgbe is little endian, but cpu maybe not. add necessary conversions. rte_cpu_to_le_32(...) for PCI write rte_le_to_cpu_32(...) for PCI read. Signed-off-by: Xuelin Shi --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[dpdk-dev] [PATCH] kni/ethtool/ixgbe: enforce access between ixgbe PCI and CPU

2015-02-11 Thread xuelin....@freescale.com
From: Xuelin Shi make sure: CPU read from ixgbe with IXGBE_LE32_TO_CPUS CPU write to ixgbe with IXGBE_CPU_TO_LE32 otherwise, there is endian issue for ixgbe on BIG_ENDIAN CPU. Signed-off-by: Xuelin Shi --- .../linuxapp/kni/ethtool/ixgbe/ixgbe_osdep.h | 24 +++

[dpdk-dev] [PATCH] librte_lpm: use field access instead of type conversion.

2015-02-11 Thread xuelin....@freescale.com
From: Xuelin Shi struct tbl_entry{ uint8_t next_hop; uint8_t valid :1; uint8_t valid_group :1; uint8_t depth :6 } uint16_t tbl = (uint16_t)tbl_entry; next_hop = (uint8_t)tbl; next_hop cannot get the correct value of the field if the cpu arch is BIG_ENDIAN. change

[dpdk-dev] [PATCH v2] testpmd: fix port parsing in show port info command

2015-02-06 Thread xuelin....@freescale.com
From: Xuelin Shi the port number type should be consistent with librte_cmdline, else there is potential endian issue. Signed-off-by: Xuelin Shi --- v2 change: change port type to uint8 rephrase patch title app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[dpdk-dev] [PATCH] fix testpmd show port info error

2015-02-02 Thread xuelin....@freescale.com
From: Xuelin Shi the port number type should be consistent with librte_cmdline, else there is potential endian issue. Signed-off-by: Xuelin Shi --- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 4