[dpdk-dev] [PATCH 36/36] eal: Add 2 device ids for ixgbe

2015-02-12 Thread Ouyang Changchun
Accordingly, add 2 new device id into lib_eal. Signed-off-by: Changchun Ouyang --- lib/librte_eal/common/include/rte_pci_dev_ids.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_de

[dpdk-dev] [PATCH 34/36] ixgbe base codes: New device id

2015-02-12 Thread Ouyang Changchun
The old device id: IXGBE_DEV_ID_X550EM_X is split into 2 new device id: IXGBE_DEV_ID_X550EM_X_10G_T and IXGBE_DEV_ID_X550EM_X_1G_T Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 3 ++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 5 +++-- lib/librte_pmd_ixgbe/ixgbe/

[dpdk-dev] [PATCH 33/36] ixgbe base codes: Read/write iosf sb stat

2015-02-12 Thread Ouyang Changchun
Update the macro to read/write iosf sb stat. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c index 8301d4b..5faca

[dpdk-dev] [PATCH 32/36] ixgbe base codes: Setup kx4 phy

2015-02-12 Thread Ouyang Changchun
Setup kx4 phy for x550em; Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 14 +-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 44 - 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe

[dpdk-dev] [PATCH 31/36] ixgbe base codes: Bit-bang mode

2015-02-12 Thread Ouyang Changchun
Support the bit-bang mode on X550; And negate I2C output enable; Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 66 +++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 6 +++ 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/l

[dpdk-dev] [PATCH 30/36] ixgbe base codes: Auto-negotiation

2015-02-12 Thread Ouyang Changchun
Auto-negotiation for link speed of 5G. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 41 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 2 ++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ix

[dpdk-dev] [PATCH 29/36] ixgbe base codes: Command for flow director

2015-02-12 Thread Ouyang Changchun
Add flow director command into argument to hold the current value of FDIRCMD register; handle flow director mask for non-clound mode. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 124 ++- 1 file changed, 73 insertions(+), 51 deletion

[dpdk-dev] [PATCH 28/36] ixgbe base codes: Calculate checksum

2015-02-12 Thread Ouyang Changchun
Add function to calculate checksum for X550; and add buffer into argument list to hold the eeprom image. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 74 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 1 + 2 files changed, 55 inserti

[dpdk-dev] [PATCH 27/36] ixgbe base codes: Set LAN ID

2015-02-12 Thread Ouyang Changchun
LAN ID is needed for i2c access, so move it before reading I2C eeprom. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_p

[dpdk-dev] [PATCH 26/36] ixgbe base codes: SFP probe

2015-02-12 Thread Ouyang Changchun
Check if SFP is detected or not. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 18 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 4 2 files changed, 22 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ix

[dpdk-dev] [PATCH 25/36] ixgbe base codes: Refine branch statement

2015-02-12 Thread Ouyang Changchun
Use switch-case statement to replace if-else statement. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgb

[dpdk-dev] [PATCH 24/36] ixgbe base codes: Support 5G link speed

2015-02-12 Thread Ouyang Changchun
Support 5G link speed for X550. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 4 lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c| 15 +++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --gi

[dpdk-dev] [PATCH 23/36] ixgbe base codes: API for write i2c combined

2015-02-12 Thread Ouyang Changchun
New API to perform I2C write combined operation. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 16 lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 11 +-- 3 files changed, 26 insertions(+), 2 delet

[dpdk-dev] [PATCH 22/36] ixgbe base codes: API for read i2c combined

2015-02-12 Thread Ouyang Changchun
New API to perform I2C read combined operation. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 16 lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 17 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c b/lib/librte_pm

[dpdk-dev] [PATCH 21/36] ixgbe base codes: API for set phy power

2015-02-12 Thread Ouyang Changchun
New API to control the phy power state. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 11 +++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 12 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c b/lib/librte_pmd_ixgbe/ixgbe

[dpdk-dev] [PATCH 20/36] ixgbe base codes: API for setup internal phy

2015-02-12 Thread Ouyang Changchun
New API for setup internal phy. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 14 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 15 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c b/lib/librte_pmd_ixgbe/ixgbe/ixgb

[dpdk-dev] [PATCH 19/36] ixgbe base codes: Fix mac type issue

2015-02-12 Thread Ouyang Changchun
It needs '>=' rather than '=='. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c| 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd

[dpdk-dev] [PATCH 18/36] ixgbe base codes: Restructure host interface command

2015-02-12 Thread Ouyang Changchun
Request and response command have different struct. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 22 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 34 - 2 files changed, 34 insertions(+), 22 deletions(-) diff --g

[dpdk-dev] [PATCH 17/36] ixgbe base codes: Get bus info

2015-02-12 Thread Ouyang Changchun
New function to get bus information for x550em; Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 23 +-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 1 + 3 files changed, 23 insertions(+), 2 deletions

[dpdk-dev] [PATCH 16/36] ixgbe base codes: New phy ID

2015-02-12 Thread Ouyang Changchun
Add new phy ID: X557_PHY_ID, and implement its internal setup function and external init function. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 3 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 10 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 204 +++

[dpdk-dev] [PATCH 15/36] ixgbe base codes: Update macros

2015-02-12 Thread Ouyang Changchun
Update macros in ixgbe_type header files. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 59 + 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe

[dpdk-dev] [PATCH 14/36] ixgbe base codes: Use IOMEM

2015-02-12 Thread Ouyang Changchun
Use IOMEM for hw addr. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 2 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_

[dpdk-dev] [PATCH 13/36] ixgbe base codes: Clear Tx pending

2015-02-12 Thread Ouyang Changchun
Wait for a last completion before clearing buffers, and before proceeding, it needs make sure that the PCIe block does not have transactions pending. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 22 +- 1 file changed, 21 insertions(+), 1 del

[dpdk-dev] [PATCH 12/36] ixgbe base codes: Refine struct for physical information

2015-02-12 Thread Ouyang Changchun
Remove lan_id from struct ixgbe_phy_info. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 4 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 66 ---

[dpdk-dev] [PATCH 11/36] ixgbe base codes: Refine function for host interface command

2015-02-12 Thread Ouyang Changchun
Add timeout as new argument in host interface command. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 13 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 5 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.

[dpdk-dev] [PATCH 10/36] ixgbe base codes: Get host interface command status

2015-02-12 Thread Ouyang Changchun
Add new function ixgbe_get_hi_status to get host interface command status. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 30 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 1 + 2 files changed, 31 insertions(+) diff --git a/lib/libr

[dpdk-dev] [PATCH 09/36] ixgbe base codes: Use mng present function

2015-02-12 Thread Ouyang Changchun
82599 use mng present to check if MNG FW could be enabled. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c

[dpdk-dev] [PATCH 08/36] ixgbe base codes: Set phy power

2015-02-12 Thread Ouyang Changchun
Define the function of setting phy power; Set copper phy power for x540. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 30 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 + lib/librte_pmd

[dpdk-dev] [PATCH 07/36] ixgbe base codes: Extract function for management capability

2015-02-12 Thread Ouyang Changchun
Define function ixgbe_mng_present to check if management capability is present or not. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 16 lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 1 + 2 files changed, 17 insertions(+) diff --git a/lib/librt

[dpdk-dev] [PATCH 06/36] ixgbe base codes: Update the CS address

2015-02-12 Thread Ouyang Changchun
Update the adress of IXGBE_CS4227. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h b/lib/librte_pmd_ixgbe/ixg

[dpdk-dev] [PATCH 05/36] ixgbe base codes: Fix early return

2015-02-12 Thread Ouyang Changchun
It could early return according to read status. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c index 76e9a32..84ab8b7 100644 --- a

[dpdk-dev] [PATCH 04/36] ixgbe base codes: Fix link speed issue

2015-02-12 Thread Ouyang Changchun
Remove unnecessary '|' for the link speed. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c index 540b477..76e

[dpdk-dev] [PATCH 03/36] ixgbe base codes: Fix bus type issue

2015-02-12 Thread Ouyang Changchun
It needs check if the bus type is the unknown type or not. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c in

[dpdk-dev] [PATCH 02/36] ixgbe base codes: Debug output macro

2015-02-12 Thread Ouyang Changchun
Use DEBUGOUT to replace ERROR_REPORT1. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c index 1f536e1..

[dpdk-dev] [PATCH 01/36] ixgbe base codes: Code cleanup and minor changes

2015-02-12 Thread Ouyang Changchun
Remove '&' before function name; Adjust the spaces etc. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c | 55 +++--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 105 +-- lib

[dpdk-dev] [PATCH 00/36] Update IXGBE base codes

2015-02-12 Thread Ouyang Changchun
This patch set update IXGBE base codes to the version of cid-10g-shared-code.2015.02.03. and this patch set add 2 new device id as following: #define IXGBE_DEV_ID_X550EM_X_10G_T0x15AD #define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE Changchun Ouyang (36): ixgbe base codes: Code

[dpdk-dev] [PATCH 3/3] examples: example showing use of callbacks.

2015-02-12 Thread John McNamara
From: Richardson, Bruce Rough example showing how callbacks can be used to insert a timestamp into each packet on RX. Then on TX the timestamp is used to calculate the packet latency in cycles through the app. Signed-off-by: Bruce Richardson --- examples/rxtx_callbacks/Makefile | 57 ++

[dpdk-dev] [PATCH 2/3] ethdev: Add in data rxtx callback support

2015-02-12 Thread John McNamara
From: Richardson, Bruce Add in support for inline processing of packets inside the RX or TX call. For an RX callback, what happens is that we get a set of packets from the NIC and then pass them to a callback function, if configured, to allow additional processing to be done on them, e.g. filling

[dpdk-dev] [PATCH 1/3] ethdev: rename callbacks field to intr_cbs

2015-02-12 Thread John McNamara
From: Richardson, Bruce The callbacks member of the rte_eth_dev structure has been renamed to intr_cbs to make it clear that it refers to callbacks from NIC interrupts. This then allows us to add other types of callbacks to the structure without ambiguity. Signed-off-by: Bruce Richardson --- a

[dpdk-dev] [PATCH 0/3] DPDK ethdev callback support

2015-02-12 Thread John McNamara
This patchset is for a small addition to the ethdev library, to add in support for callbacks at the RX and TX stages. This allows packet processing to be done on packets before they get returned to applications using rte_eth_rx_burst call. See the RFC cover letter for the use cases: http://dp

[dpdk-dev] [PATCH] i40e: fix the issue reported by klocwork

2015-02-12 Thread Jingjing Wu
Klocwork reports array 'src_offset' may use index 16. In function i40e_srcoff_to_flx_pit, index j + 1 can reach I40E_FDIR_MAX_FLEX_LEN. This patch fixes this issue to avoid array bound. Signed-off-by: Jingjing Wu --- lib/librte_pmd_i40e/i40e_fdir.c | 35 +-- 1 fi

[dpdk-dev] Packet drops during non-exhaustive flood with OVS and 1.8.0

2015-02-12 Thread Andrey Korolyov
On Thu, Feb 12, 2015 at 6:05 PM, Traynor, Kevin wrote: >> -Original Message- >> From: Andrey Korolyov [mailto:andrey at xdel.ru] >> Sent: Tuesday, February 3, 2015 5:21 PM >> To: Traynor, Kevin >> Cc: dev at dpdk.org; discuss at openvswitch.org >> Subject: Re: Packet drops during non-exha

[dpdk-dev] [PATCH 1/7] vmxnet3: add support for VLAN filtering

2015-02-12 Thread Yong Wang
On 12/16/14, 9:13 PM, "Stephen Hemminger" wrote: >From: Stephen Hemminger > >VMXNET3 supports configuring filter table in host. > >Signed-off-by: Stephen Hemminger >--- > lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c | 107 >+--- > lib/librte_pmd_vmxnet3/vmxnet3_ethdev.h |

[dpdk-dev] [PATCH v2 09/11] lib/librte_vhost: vhost user support

2015-02-12 Thread Linhaifeng
On 2015/2/12 17:28, Xie, Huawei wrote: > On 2/12/2015 4:28 PM, Linhaifeng wrote: >> >> On 2015/2/12 13:07, Huawei Xie wrote: >>> + >>> + /* This is ugly */ >>> + mapped_size = memory.regions[idx].memory_size + >>> + memory.regions[idx].mmap_offset; >>> +

[dpdk-dev] [PATCH v3 2/2] eal: add help option

2015-02-12 Thread Thomas Monjalon
Help is printed with -h or --help. Help is also printed for an unknown option. This was broken since the rework of options. Fixes: 489a9d6c9f77 ("merge bsd and linux common options parsing") Signed-off-by: Thomas Monjalon Acked-by: David Marchand --- lib/librte_eal/bsdapp/eal/eal.c

[dpdk-dev] [PATCH v3 1/2] eal: sort and align options lists

2015-02-12 Thread Thomas Monjalon
Options listing in usage help was a mess. The main usage line is fixed and shorter. The options in usage output are logically sorted (cpu/mem/dev/proc), aligned and lightly reworded. The options in declarations are alphabetically sorted. Code in swith statement is not moved. Signed-off-by: Thomas

[dpdk-dev] [PATCH v3 0/2] help option

2015-02-12 Thread Thomas Monjalon
This is a small reorganization of options. The main goal is to provide a nice --help option. changes in v3: - reword arguments in usage changes in v2: - sort also the options enum Thomas Monjalon (2): eal: sort and align options lists eal: add help option lib/librte_eal/bsdapp/eal/eal.c

[dpdk-dev] [PATCH v2] eal_pci: Fix max_vfs missing for none igb_uio driver

2015-02-12 Thread Thomas Monjalon
2015-02-11 21:25, Michael Qiu: > max_vfs will only be created by igb_uio driver, for other > drivers like vfio or pci_uio_generic, max_vfs will miss. > > But sriov_numvfs is not driver related, just get the vf numbers > from that field. > > Signed-off-by: Michael Qiu [...] > snprintf(filen

[dpdk-dev] [PATCH v2] mk: Only default to -Werror when building from git checkout

2015-02-12 Thread Panu Matilainen
Add RTE_DEVEL_BUILD make-variable which can be used to do things differently when doing development vs building a release, autodetected from source root .git presence and overridable via commandline. Use it to only enable -Werror compiler flag when building a git checkout: Failing build on warning

[dpdk-dev] [PATCH v1] afpacket: fix critical issue reported by klocwork

2015-02-12 Thread Cunming Liang
Klocwork report 'req' might be used uninitialized. In some cases it can 'goto error' when '*internals' not been set. The result is unexpected checking the value of '*internals'. Signed-off-by: Cunming Liang --- lib/librte_pmd_af_packet/rte_eth_af_packet.c | 4 +++- 1 file changed, 3 insertions(+

[dpdk-dev] [PATCH v2] mk: fix librte_vhost linking

2015-02-12 Thread Thomas Monjalon
> > librte_vhost is not a plugin but a library, move it to proper section to fix > > sample app build in shared, non-combined library setup. > > > > Signed-off-by: Panu Matilainen > > Acked-by: Sergio Gonzalez Monroy Applied, thanks

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Panu Matilainen
On 02/12/2015 04:38 PM, Stephen Hemminger wrote: > On Thu, 12 Feb 2015 13:13:22 +0200 > Panu Matilainen wrote: > >> This adds new CONFIG_RTE_ERROR_ON_WARNING config option to enable >> fail-on-warning compile behavior, defaulting to off. >> >> Failing build on warnings is a useful developer tool b

[dpdk-dev] [PATCH 0/4] Broadcom 10G NIC Poll Mode Driver

2015-02-12 Thread Stephen Hemminger
On Thu, 12 Feb 2015 14:56:06 + Thomas Monjalon wrote: > 2015-02-12 06:33, Stephen Hemminger: > > On Thu, 12 Feb 2015 15:00:13 +0100 > > Thomas Monjalon wrote: > > > > > Hi Stephen, > > > > > > 2015-02-07 07:15, Stephen Hemminger: > > > > Source was from FreeBSD. > > > > > > > > changes we

[dpdk-dev] [PATCH] mk: fix missing link of librte_vhost in shared, non-combined config

2015-02-12 Thread Thomas Monjalon
2015-02-11 12:31, Gonzalez Monroy, Sergio: > From: Panu Matilainen [mailto:pmatilai at redhat.com] > > On 02/11/2015 12:51 PM, Gonzalez Monroy, Sergio wrote: > > > I think that vhost is being linked in the wrong place (plugins section). > > > The plugins only get linked when building static librari

[dpdk-dev] [PATCH] eal: add rte_eal_iopl_init to version map

2015-02-12 Thread Thomas Monjalon
2015-02-12 15:18, Gonzalez Monroy, Sergio: > On 12/02/2015 15:12, Thomas Monjalon wrote: > > 2015-02-11 13:30, Sergio Gonzalez Monroy: > >> Common rte_eal_iopl_init function is missing from eal version map. > > How did you see it? > > Thanks > Building shared libraries and using virtio PMD would re

[dpdk-dev] [PATCH v2 09/11] lib/librte_vhost: vhost user support

2015-02-12 Thread Linhaifeng
On 2015/2/12 13:07, Huawei Xie wrote: > + > + /* This is ugly */ > + mapped_size = memory.regions[idx].memory_size + > + memory.regions[idx].mmap_offset; > + mapped_address = (uint64_t)(uintptr_t)mmap(NULL, > + mapped_siz

[dpdk-dev] [PATCH v5 19/19] timer: add support to non-EAL thread

2015-02-12 Thread Cunming Liang
Allow to setup timers only for EAL (lcore) threads (__lcore_id < MAX_LCORE_ID). E.g. ? dynamically created thread will be able to reset/stop timer for lcore thread, but it will be not allowed to setup timer for itself or another non-lcore thread. rte_timer_manage() for non-lcore thread would simp

[dpdk-dev] [PATCH v5 18/19] ring: add sched_yield to avoid spin forever

2015-02-12 Thread Cunming Liang
Add a sched_yield() syscall if the thread spins for too long, waiting other thread to finish its operations on the ring. That gives pre-empted thread a chance to proceed and finish with ring enqnue/dequeue operation. The purpose is to reduce contention on the ring. By ring_perf_test, it doesn't

[dpdk-dev] [PATCH v5 17/19] ring: add support to non-EAL thread

2015-02-12 Thread Cunming Liang
ring debug stat won't take care non-EAL thread. Signed-off-by: Cunming Liang --- v5 changes: check __lcore_id with LCORE_ID_ANY instead of RTE_MAX_LCORE lib/librte_ring/rte_ring.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/librte_ring/rte_ring.h b/lib

[dpdk-dev] [PATCH v5 16/19] mempool: add support to non-EAL thread

2015-02-12 Thread Cunming Liang
For non-EAL thread, bypass per lcore cache, directly use ring pool. It allows using rte_mempool in either EAL thread or any user pthread. As in non-EAL thread, it directly rely on rte_ring and it's none preemptive. It doesn't suggest to run multi-pthread/cpu which compete the rte_mempool. It will g

[dpdk-dev] [PATCH v5 15/19] eal: fix recursive spinlock in non-EAL thraed

2015-02-12 Thread Cunming Liang
In non-EAL thread, lcore_id alrways be LCORE_ID_ANY. It cann't be used as unique id for recursive spinlock. Then use rte_gettid() to replace it. Signed-off-by: Cunming Liang --- lib/librte_eal/common/include/generic/rte_spinlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

[dpdk-dev] [PATCH v5 14/19] eal: set _lcore_id and _socket_id to (-1) by default

2015-02-12 Thread Cunming Liang
For those none EAL thread, *_lcore_id* shall always be LCORE_ID_ANY. The libraries using *_lcore_id* as index need to take care. *_socket_id* always be SOCKET_ID_ANY unitl the thread changes the affinity by rte_thread_set_affinity() Signed-off-by: Cunming Liang --- v5 changes: define LCORE_I

[dpdk-dev] [PATCH v5 13/19] log: fix the gap to support non-EAL thread

2015-02-12 Thread Cunming Liang
For those non-EAL thread, *_lcore_id* is invalid and probably larger than RTE_MAX_LCORE. The patch adds the check and allows only EAL thread using EAL per thread log level and log type. Others shares the global log level. Signed-off-by: Cunming Liang --- lib/librte_eal/common/eal_common_log.c

[dpdk-dev] [PATCH v5 12/19] malloc: fix the issue of SOCKET_ID_ANY

2015-02-12 Thread Cunming Liang
Add check for rte_socket_id(), avoid get unexpected return like (-1). Signed-off-by: Cunming Liang --- lib/librte_malloc/malloc_heap.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/librte_malloc/malloc_heap.h b/lib/librte_malloc/malloc_heap.h index b4aec45..a47136

[dpdk-dev] [PATCH v5 11/19] enic: fix re-define freebsd compile complain

2015-02-12 Thread Cunming Liang
Some macro already been defined by freebsd 'sys/param.h'. Signed-off-by: Cunming Liang --- v5 changes: rename the redefined MACRO instead of undefine them lib/librte_pmd_enic/enic.h | 4 ++-- lib/librte_pmd_enic/enic_compat.h | 2 +- lib/librte_pmd_enic/vnic/vnic_dev.c | 6 +++---

[dpdk-dev] [PATCH v5 10/19] eal: apply affinity of EAL thread by assigned cpuset

2015-02-12 Thread Cunming Liang
EAL threads use assigned cpuset to set core affinity during startup. It keeps 1:1 mapping, if no '--lcores' option is used. Signed-off-by: Cunming Liang --- v5 changes: add return check for dump_affinity call rte_thread_set_affinity() directly during EAL thread set lib/librte_eal/bsdapp/

[dpdk-dev] [PATCH v5 09/19] eal: add rte_gettid() to acquire unique system tid

2015-02-12 Thread Cunming Liang
The rte_gettid() wraps the linux and freebsd syscall gettid(). It provides a persistent unique thread id for the calling thread. It will save the unique id in TLS on the first time. Signed-off-by: Cunming Liang --- lib/librte_eal/bsdapp/eal/eal_thread.c | 9 + lib/librte_eal/common/in

[dpdk-dev] [PATCH v5 08/19] eal: standardize init sequence between linux and bsd

2015-02-12 Thread Cunming Liang
Signed-off-by: Cunming Liang --- lib/librte_eal/bsdapp/eal/eal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 69f3c03..cb11b5c 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsda

[dpdk-dev] [PATCH v5 07/19] eal: add eal_common_thread.c for common thread API

2015-02-12 Thread Cunming Liang
The API works for both EAL thread and none EAL thread. When calling rte_thread_set_affinity, the *_socket_id* and *_cpuset* of calling thread will be updated if the thread successful set the cpu affinity. Signed-off-by: Cunming Liang --- v5 changes: refine code of rte_thread_set_affinity()

[dpdk-dev] [PATCH v5 06/19] eal: new TLS definition and API declaration

2015-02-12 Thread Cunming Liang
1. add two TLS *_socket_id* and *_cpuset* 2. add two external API rte_thread_set/get_affinity 3. add one internal API eal_thread_dump_affinity Signed-off-by: Cunming Liang --- v5 changes: add comments for RTE_CPU_AFFINITY_STR_LEN update comments for eal_thread_dump_affinity() return voi

[dpdk-dev] [PATCH v5 05/19] eal: add support parsing socket_id from cpuset

2015-02-12 Thread Cunming Liang
It returns the socket_id if all cpus in the cpuset belongs to the same NUMA node, otherwise it will return SOCKET_ID_ANY. Signed-off-by: Cunming Liang --- v5 changes: expose cpu_socket_id as eal_cpu_socket_id for linuxapp eal_cpuset_socket_id() remove static inline and move to c file lib

[dpdk-dev] [PATCH v5 04/19] eal: fix wrong strnlen() return value in 32bit icc

2015-02-12 Thread Cunming Liang
The problem is that strnlen() here may return invalid value with 32bit icc. (actually it returns it?s second parameter,e.g: sysconf(_SC_ARG_MAX)). It starts to manifest hwen max_len parameter is > 2M and using icc ?m32 ?O2 (or above). Suggested-by: Konstantin Ananyev Signed-off-by: Cunming Liang

[dpdk-dev] [PATCH v5 03/19] eal: new eal option '--lcores' for cpu assignment

2015-02-12 Thread Cunming Liang
It supports one new eal long option '--lcores' for EAL thread cpuset assignment. The format pattern: --lcores='lcores[@cpus]<,lcores[@cpus]>' lcores, cpus could be a single digit/range or a group. '(' and ')' are necessary if it's a group. If not supply '@cpus', the value of cpus uses the

[dpdk-dev] [PATCH v5 02/19] eal: fix PAGE_SIZE redefine complaint on freebsd

2015-02-12 Thread Cunming Liang
Signed-off-by: Cunming Liang --- lib/librte_eal/bsdapp/eal/eal_memory.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c index 65ee87d..33ebd0f 100644 --- a/lib/librte_eal/bsdapp/eal/eal_m

[dpdk-dev] [PATCH v5 01/19] eal: add cpuset into per EAL thread lcore_config

2015-02-12 Thread Cunming Liang
The patch adds 'cpuset' into per-lcore configure 'lcore_config[]', as the lcore no longer always 1:1 pinning with physical cpu. The lcore now stands for a EAL thread rather than a logical cpu. It doesn't change the default behavior of 1:1 mapping, but allows to affinity the EAL thread to multiple

[dpdk-dev] [PATCH v5 00/19] support multi-pthread per core

2015-02-12 Thread Cunming Liang
v5 changes: reorder some patch and split into addtional two patches rte_thread_get_affinity() return type change to avoid add RTE_RING_PAUSE_REP into config and by default turn off v4 changes: new patch fixing strnlen() invalid return in 32bit icc [03/17] update and add more comments on

[dpdk-dev] [PATCH] eal: add rte_eal_iopl_init to version map

2015-02-12 Thread Thomas Monjalon
2015-02-11 13:30, Sergio Gonzalez Monroy: > Common rte_eal_iopl_init function is missing from eal version map. How did you see it? Thanks > rte_eal_hpet_init; > + rte_eal_iopl_init; > rte_eal_init; You missed the alphabetical order, you were not so far ;)

[dpdk-dev] [PATCH 2/3] ethdev: Add in data rxtx callback support

2015-02-12 Thread Neil Horman
On Thu, Feb 12, 2015 at 07:57:56PM +, John McNamara wrote: > From: Richardson, Bruce > > Add in support for inline processing of packets inside the RX or > TX call. For an RX callback, what happens is that we get a set of > packets from the NIC and then pass them to a callback function, if >

[dpdk-dev] [PATCH 0/8] Improve build process

2015-02-12 Thread Panu Matilainen
On 02/12/2015 02:23 PM, Neil Horman wrote: > On Thu, Feb 12, 2015 at 10:03:51AM +, Gonzalez Monroy, Sergio wrote: >> On 12/02/2015 09:22, Panu Matilainen wrote: >>> On 02/11/2015 01:11 PM, Gonzalez Monroy, Sergio wrote: > From: Neil Horman [mailto:nhorman at tuxdriver.com] > Sent: Frida

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Panu Matilainen
On 02/12/2015 02:08 PM, Bruce Richardson wrote: > On Thu, Feb 12, 2015 at 02:02:19PM +0200, Panu Matilainen wrote: >> On 02/12/2015 01:25 PM, Bruce Richardson wrote: >>> On Thu, Feb 12, 2015 at 01:13:22PM +0200, Panu Matilainen wrote: This adds new CONFIG_RTE_ERROR_ON_WARNING config option to

[dpdk-dev] [PATCH 0/4] Broadcom 10G NIC Poll Mode Driver

2015-02-12 Thread Thomas Monjalon
2015-02-12 06:33, Stephen Hemminger: > On Thu, 12 Feb 2015 15:00:13 +0100 > Thomas Monjalon wrote: > > > Hi Stephen, > > > > 2015-02-07 07:15, Stephen Hemminger: > > > Source was from FreeBSD. > > > > > > changes were to make it work and lots of de-uglification. > > > > Maintenance would be ea

[dpdk-dev] [PATCH] eal: add rte_eal_iopl_init to version map

2015-02-12 Thread Gonzalez Monroy, Sergio
On 12/02/2015 15:39, Sergio Gonzalez Monroy wrote: > Building shared libraries and using virtio PMD results in undefined > reference to 'rte_eal_iopl_init'. > > Add missing function to eal version map. > > Signed-off-by: Sergio Gonzalez Monroy > --- > lib/librte_eal/bsdapp/eal/rte_eal_version.ma

[dpdk-dev] [PATCH v2] eal: add rte_eal_iopl_init to version map

2015-02-12 Thread Sergio Gonzalez Monroy
Building shared libraries and using virtio PMD results in undefined reference to 'rte_eal_iopl_init'. Add missing function to eal version map. Signed-off-by: Sergio Gonzalez Monroy --- v2: - more detailed commit - add entry in alphabetical order lib/librte_eal/bsdapp/eal/rte_eal_version.map

[dpdk-dev] [PATCH] eal: fix fscanf format mismatch

2015-02-12 Thread Sergio Gonzalez Monroy
Variables are unsigned int but format scans for signed int. Signed-off-by: Sergio Gonzalez Monroy --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio

[dpdk-dev] [PATCH] eal: add rte_eal_iopl_init to version map

2015-02-12 Thread Sergio Gonzalez Monroy
Building shared libraries and using virtio PMD results in undefined reference to 'rte_eal_iopl_init'. Add missing function to eal version map. Signed-off-by: Sergio Gonzalez Monroy --- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 + lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 +

[dpdk-dev] [PATCH] eal: add rte_eal_iopl_init to version map

2015-02-12 Thread Gonzalez Monroy, Sergio
On 12/02/2015 15:12, Thomas Monjalon wrote: > 2015-02-11 13:30, Sergio Gonzalez Monroy: >> Common rte_eal_iopl_init function is missing from eal version map. > How did you see it? > Thanks Building shared libraries and using virtio PMD would result in undefined reference symbol. Should I add it to

[dpdk-dev] Packet drops during non-exhaustive flood with OVS and 1.8.0

2015-02-12 Thread Traynor, Kevin
> -Original Message- > From: Andrey Korolyov [mailto:andrey at xdel.ru] > Sent: Tuesday, February 3, 2015 5:21 PM > To: Traynor, Kevin > Cc: dev at dpdk.org; discuss at openvswitch.org > Subject: Re: Packet drops during non-exhaustive flood with OVS and 1.8.0 > > > These patches are to ena

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Thomas Monjalon
2015-02-12 15:58, Panu Matilainen: > + # see if we're building from git > + ifneq ($(wildcard $(RTE_SDK)/.git),) > +DEVEL_BUILD := y > + endif Yes it allows to force DEVEL_BUILD to any value on command line. But please use RTE_ prefix.

[dpdk-dev] [PATCH 0/4] Broadcom 10G NIC Poll Mode Driver

2015-02-12 Thread Thomas Monjalon
Hi Stephen, 2015-02-07 07:15, Stephen Hemminger: > Source was from FreeBSD. > > changes were to make it work and lots of de-uglification. Maintenance would be eased by showing this work with separate commits. You should at least have a patch for importing FreeBSD source without modifications. O

[dpdk-dev] [PATCH] testpmd: use default rx/tx port configuration values

2015-02-12 Thread Pablo de Lara
Function to get rx/tx port configuration from the PMDs was added in previous release to simplify the port configuration in all sample apps, but testpmd was not modified. This patch makes testpmd get the default rx/tx port configuration, but still uses the parameters passed by the command line. Th

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Bruce Richardson
On Thu, Feb 12, 2015 at 03:58:07PM +0200, Panu Matilainen wrote: > On 02/12/2015 02:08 PM, Bruce Richardson wrote: > >On Thu, Feb 12, 2015 at 02:02:19PM +0200, Panu Matilainen wrote: > >>On 02/12/2015 01:25 PM, Bruce Richardson wrote: > >>>On Thu, Feb 12, 2015 at 01:13:22PM +0200, Panu Matilainen w

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Panu Matilainen
On 02/12/2015 01:25 PM, Bruce Richardson wrote: > On Thu, Feb 12, 2015 at 01:13:22PM +0200, Panu Matilainen wrote: >> This adds new CONFIG_RTE_ERROR_ON_WARNING config option to enable >> fail-on-warning compile behavior, defaulting to off. >> >> Failing build on warnings is a useful developer tool

[dpdk-dev] [PATCH v7 04/14] eal/pci: Consolidate pci address comparison APIs

2015-02-12 Thread Iremonger, Bernard
> > /* Scan one pci sysfs entry, and fill the devices list from > > it. */ static int pci_scan_one(const char *dirname, uint16_t > > domain, uint8_t bus, @@ -353,13 +339,20 @@ pci_scan_one(const > > char *dirname, uint16_t domain, uint8_t bus, > > } > >

[dpdk-dev] [PATCH v5 19/19] timer: add support to non-EAL thread

2015-02-12 Thread Ananyev, Konstantin
Hi lads, > -Original Message- > From: Liang, Cunming > Sent: Thursday, February 12, 2015 8:17 AM > To: dev at dpdk.org > Cc: Ananyev, Konstantin; olivier.matz at 6wind.com; Liang, Cunming > Subject: [PATCH v5 19/19] timer: add support to non-EAL thread > > Allow to setup timers only for E

[dpdk-dev] [PATCH] x32 ABI support, first iteration

2015-02-12 Thread De Lara Guarch, Pablo
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ananyev, > Konstantin > Sent: Monday, February 09, 2015 10:23 AM > To: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] x32 ABI support, first iteration > > > Subject: [PATCH] x32 ABI support, first iteration

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Panu Matilainen
This adds new CONFIG_RTE_ERROR_ON_WARNING config option to enable fail-on-warning compile behavior, defaulting to off. Failing build on warnings is a useful developer tool but its bad for release tarballs which can and do get built with newer compilers than what was used/available during developme

[dpdk-dev] [PATCH v5 18/19] ring: add sched_yield to avoid spin forever

2015-02-12 Thread Bruce Richardson
On Thu, Feb 12, 2015 at 01:08:43PM +, Ananyev, Konstantin wrote: > > > > -Original Message- > > From: Liang, Cunming > > Sent: Thursday, February 12, 2015 1:05 PM > > To: Olivier MATZ; dev at dpdk.org > > Cc: Ananyev, Konstantin > > Subject: RE: [PATCH v5 18/19] ring: add sched_yield

[dpdk-dev] [PATCH v5 18/19] ring: add sched_yield to avoid spin forever

2015-02-12 Thread Ananyev, Konstantin
> -Original Message- > From: Liang, Cunming > Sent: Thursday, February 12, 2015 1:05 PM > To: Olivier MATZ; dev at dpdk.org > Cc: Ananyev, Konstantin > Subject: RE: [PATCH v5 18/19] ring: add sched_yield to avoid spin forever > > Hi, > > > -Original Message- > > From: Olivier MA

[dpdk-dev] [PATCH v2 11/11] lib/librte_vhost: support dynamically registering vhost server

2015-02-12 Thread Huawei Xie
* support calling rte_vhost_driver_register after rte_vhost_driver_session_start * add mutext to protect fdset from concurrent access * add busy flag in fdentry. this flag is set before cb and cleared after cb is finished. mutex lock scenario in vhost: * event_dispatch(in rte_vhost_driver_sessio

[dpdk-dev] [PATCH v2 10/11] lib/librte_vhost: support dev->ifname for vhost-user

2015-02-12 Thread Huawei Xie
for vhost-cuse, ifname is the name of the tap device for vhost-user, ifname is the name of the unix domain socket path Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 3 +- lib/librte_vhost/vhost-net.h | 3 ++ lib/librte_vhost/vhost_cuse/vhost-net

  1   2   >