Re: [dpdk-dev] dpdk16.07 and virtio "Cannot mmap IO port resource"

2016-12-10 Thread Gopakumar Choorakkot Edakkunni
Hi Oliver, Looking at the kernel code pci_mmap_resource()--->pci_mmap_fits(), it looks like pci_mmap_fits() expects that the "number of pages" requested to map is no larger than the actual size of the pci resource. But in pci_uio_ioport_map() what is passed as the requested size is the end_addr of

[dpdk-dev] DPDK NIC is unreachable

2016-12-10 Thread Priyanka
Hi, We have a SRIOV+ DPDK 16.04 setup for a VM using KVM-qemu hypervisor. We are unable to ping the VM. We are assigning the VM to a SRIOV vf and for the DPDK enabled NIC on the VM to detect this VF, we are using KNI. We used the KNI app available in the examples folder. Although the non D

[dpdk-dev] [PATCH v3 28/31] net/i40e/base: fix division by zero

2016-12-10 Thread Jingjing Wu
For some cases when reading from device are incorrect or image is incorrect, this part of code causes crash due to division by zero. Fixes: 8db9e2a1b232 ("i40e: base driver") Signed-off-by: Jingjing Wu CC: sta...@dpdk.org --- drivers/net/i40e/base/i40e_common.c | 6 -- 1 file changed, 4 ins

[dpdk-dev] [PATCH v3 29/31] net/i40e/base: fix byte order

2016-12-10 Thread Jingjing Wu
Big Endian platform will accidentally send the wrong data to the firmware command. This patch fixes the issue. Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") Fixes: 3c89193a36fd ("i40e/base: support WOL config for X722") Signed-off-by: Jingjing Wu CC: sta...@dpdk.org --- drive

[dpdk-dev] [PATCH v3 30/31] net/i40e/base: remove unused macro

2016-12-10 Thread Jingjing Wu
remove X722_SUPPORT and I40E_NDIS_SUPPORT MACROs Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_adminq_cmd.h | 14 --- drivers/net/i40e/base/i40e_common.c | 18 +- drivers/net/i40e/base/i40e_devids.h | 2 -- drivers/net/i40e/base/i40e_nvm.c| 16 ---

[dpdk-dev] [PATCH v3 31/31] net/i40e: remove unused macro from PMD

2016-12-10 Thread Jingjing Wu
Signed-off-by: Jingjing Wu --- drivers/net/i40e/Makefile | 2 +- drivers/net/i40e/i40e_ethdev.c | 40 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile index 13085fb..66997b6 100644 -

[dpdk-dev] [PATCH v3 25/31] net/i40e/base: remove duplicate definitions

2016-12-10 Thread Jingjing Wu
We already define I40E_AQ_PHY_TYPE_EXT_25G* flags in the response adminq structure above, and do not need to re-define these. While we are here, replace 0X with 0x as normal style. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_adminq_cmd.h | 8 ++-- 1 file changed, 2 insertions(

[dpdk-dev] [PATCH v3 26/31] net/i40e/base: add ERROR state for NVM update state machine

2016-12-10 Thread Jingjing Wu
This patch adds I40E_NVMUPD_STATE_ERROR state for NVM update. Without this patch driver has no possibility to return NVM image write failure.This state is being set when ARQ rises error. arq_last_status is also updated every time when ARQ event comes, not only on error cases. Signed-off-by: Jingji

[dpdk-dev] [PATCH v3 27/31] net/i40e/base: add broadcast promiscuous control per VLAN

2016-12-10 Thread Jingjing Wu
Add a new adminq function that allows driver to configure per-VLAN broadcast promiscuous mode, similar to how we handle unicast and multicast promiscuous modes. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c| 34 ++ drivers/net/i40e/base/i4

[dpdk-dev] [PATCH v3 23/31] net/i40e/base: change shift values to hex

2016-12-10 Thread Jingjing Wu
Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_type.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 99e080e..3784c8f 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net

[dpdk-dev] [PATCH v3 24/31] net/i40e/base: comment that udp port must be in Host order

2016-12-10 Thread Jingjing Wu
The firmware expects the Port number to be in Little Endian format, and the i40e_aq_add_udp_tunnel command clearly expects the udp_port variable to be in Host order, as it uses CPU_TO_LE16(). It was recently discovered in the Linux driver that we were passing a Big Endian port number, which was the

[dpdk-dev] [PATCH v3 20/31] net/i40e/base: fix wol failure on PF reset

2016-12-10 Thread Jingjing Wu
By default the device clears all MAC filter information on PF Reset. However, this will cause Wake-On-LAN to fail because the wake filters are deleted on transition to D3 power state. To get around this, firmware is adding functionality to preserve certain MAC filters during PFR. These bits allow t

[dpdk-dev] [PATCH v3 19/31] net/i40e/base: implement set VSI full promisc mode

2016-12-10 Thread Jingjing Wu
This patch implements a function to set a VSI to broadcast, multicast, and unicast promiscuous mode all at once. This is specifically needed to set the WoL/Proxy VSI created by FW to full promiscuous mode during power down for WoL patterns and protocol offloads to function properly. Signed-off-by:

[dpdk-dev] [PATCH v3 21/31] net/i40e/base: save link FEC info from link up event

2016-12-10 Thread Jingjing Wu
Store the FEC status bits from the link up event into the hw_link_info structure. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c | 2 ++ drivers/net/i40e/base/i40e_type.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/ne

[dpdk-dev] [PATCH v3 22/31] net/i40e/base: fix NVM access intefering

2016-12-10 Thread Jingjing Wu
Acquire NVM lock before reads on all devices. Previously, locks were only used for X722 and later. Fixes an issue where simultaneous X710 NVM accesses were interfering with each other. Fixes: 8db9e2a1b232 ("i40e: base driver") Signed-off-by: Jingjing Wu CC: sta...@dpdk.org --- drivers/net/i40

[dpdk-dev] [PATCH v3 18/31] net/i40e/base: implement clear all WoL filters

2016-12-10 Thread Jingjing Wu
This patch implements the clear Wake on LAN (WoL) filters admin queue function which clears out ALL WoL patterns programmed into the flex filters. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_adminq_cmd.h | 1 + drivers/net/i40e/base/i40e_common.c | 20 dri

[dpdk-dev] [PATCH v3 17/31] net/i40e/base: adjust 25G PHY type values

2016-12-10 Thread Jingjing Wu
Define the values for the 25G PHY type bit-fields that match reported values from firmware. There was a gap in the bit fields but no corresponding gap i40e_aq_phy_type enum. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_type.h | 20 1 file changed, 16 insertions(

[dpdk-dev] [PATCH v3 16/31] net/i40e/base: use BIT() macro instead of bit fields

2016-12-10 Thread Jingjing Wu
Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_adminq_cmd.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 1884758..cef02b1 100644 --- a/drivers/net/i40e/base/i40e_a

[dpdk-dev] [PATCH v3 15/31] net/i40e/base: add FEC bits to PHY capabilities

2016-12-10 Thread Jingjing Wu
Add FEC bits to the PHY capabilities AQ command struct. This is required for 25GbE support. Change the name of the generic mod_type_ext field to indicate that it is now used for handling FEC. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_adminq_cmd.h | 13 - drivers/net/i

[dpdk-dev] [PATCH v3 14/31] net/i40e/base: remove FPK HyperV VF device ID

2016-12-10 Thread Jingjing Wu
Microsoft recently removed the requirement for VFs to use the VMBus. The Fort Park Windows VF has been changed to use only the hardware mailbox, so the Hyper-V VF device ID can be removed. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c | 1 - drivers/net/i40e/base/i40e_devids

[dpdk-dev] [PATCH v3 11/31] net/i40e/base: fix unknown PHYs incorrect identification

2016-12-10 Thread Jingjing Wu
The PHY type value for unrecognized PHYs and cables was changed based on firmware version number. Newer hardware use lower firmware version numbers and this was causing some PHYs to be identified as type 0x16 instead of 0xe (unknown). Without this patch, newer card will incorrectly identify unknow

[dpdk-dev] [PATCH v3 13/31] net/i40e/base: deprecating unused macro

2016-12-10 Thread Jingjing Wu
I40E_MAC_X710 was supposed to be for 10G and I40E_MAC_XL710 was supposed to be for 40G. But i40e_set_mac_type() sets I40E_MAC_XL710 for all device IDS. I40E_MAC_X710 is not used at all. Thus deprecating this extra macro. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_type.h | 1 - 1 f

[dpdk-dev] [PATCH v3 10/31] net/i40e/base: add protocols when discover capabilities

2016-12-10 Thread Jingjing Wu
Add logical_id to I40E_AQ_CAP_ID_MNG_MODE capability starting from major version 2. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c | 8 drivers/net/i40e/base/i40e_type.h | 4 2 files changed, 12 insertions(+) diff --git a/drivers/net/i40e/base/i40e_common.c

[dpdk-dev] [PATCH v3 12/31] net/i40e/base: replace memcpy

2016-12-10 Thread Jingjing Wu
To align with current memcpy use, replace existing legacy memcpy() calls with i40e_memcpy() calls. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c | 13 - drivers/net/i40e/base/i40e_nvm.c| 7 --- 2 files changed, 12 insertions(+), 8 deletions(-) diff --gi

[dpdk-dev] [PATCH v3 09/31] net/i40e/base: add bus number info

2016-12-10 Thread Jingjing Wu
Currently i40e_bus_info has PCI device and function info only. However in log messages slot number (i.e hw->bus.device) is being printed as bus number. Another field should be added to provide bus number info and preserve existing information. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base

[dpdk-dev] [PATCH v3 07/31] net/i40e/base: add media type detection for 25G link

2016-12-10 Thread Jingjing Wu
Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 2ad9448..7eea189 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base

[dpdk-dev] [PATCH v3 05/31] net/i40e/base: group base mode VF offload flags

2016-12-10 Thread Jingjing Wu
Group together the minimum set of offload capabilities that are always supported by VF in base mode. This define would be used by PF to make sure VF in base mode gets minimum of base capabilities. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_virtchnl.h | 4 1 file changed, 4 in

[dpdk-dev] [PATCH v3 08/31] net/i40e/base: add clause22 and clause45 implementation

2016-12-10 Thread Jingjing Wu
Some external PHYs require Clause22 and Clause45 method for accessing registers. Mostly used for X722 support. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c| 245 +++-- drivers/net/i40e/base/i40e_prototype.h | 16 ++- drivers/net/i40e/base/i4

[dpdk-dev] [PATCH v3 06/31] net/i40e/base: fix long link down notification time

2016-12-10 Thread Jingjing Wu
This patch fixes a problem where it could take a very long time (>100 msec) to print the link down notification. This problem is fixed by changing how often we update link info from fw, when link is down. Without this patch, it can take over 100msec to notify user link is down. Fixes: e6691b428eb1

[dpdk-dev] [PATCH v3 02/31] net/i40e/base: fix flow control set for 25G

2016-12-10 Thread Jingjing Wu
Add phy_type_ext copied from old setting to rpevents 25G PHY types from being disabled when setting the flow control modes. Fixes: 51131ae119 ("net/i40e/base: get PHY abilities for 25G") Signed-off-by: Jingjing Wu CC: sta...@dpdk.org --- drivers/net/i40e/base/i40e_common.c | 1 + 1 file changed

[dpdk-dev] [PATCH v3 04/31] net/i40e/base: fix bit test mask

2016-12-10 Thread Jingjing Wu
Incorrect bit mask was used for testing "get link status" response. Instead of I40E_AQ_LSE_ENABLE (which is actually 0x03) it should be I40E_AQ_LSE_IS_ENABLED (which is defined as 0x01). Fixes: 8db9e2a1b232 ("i40e: base driver") Signed-off-by: Jingjing Wu CC: sta...@dpdk.org --- drivers/net/i40

[dpdk-dev] [PATCH v3 01/31] net/i40e/base: add encap csum VF offload flag

2016-12-10 Thread Jingjing Wu
Add ENCAP_CSUM offload negotiation flag. Currently VF assumes checksum offload for encapsulated packets is supported by default. Going forward, this feature needs to be negotiated with PF before advertising to the stack. Hence, we need a flag to control it. Signed-off-by: Jingjing Wu --- drivers

[dpdk-dev] [PATCH v3 03/31] net/i40e/base: remove unnecessary code

2016-12-10 Thread Jingjing Wu
This patch changes some assignments and removing the unnecessary code to avoid error reported by static analysis tools. Signed-off-by: Jingjing Wu --- drivers/net/i40e/base/i40e_common.c | 4 drivers/net/i40e/base/i40e_lan_hmc.c | 5 - 2 files changed, 9 deletions(-) diff --git a/driv

[dpdk-dev] [PATCH v3 00/31] net/i40e: base code update

2016-12-10 Thread Jingjing Wu
i40e base code upate. The main changes are: - add clause22 and clause45 implementation for PHY registers accessing - replace existing legacy memcpy() calls with i40e_memcpy() calls. - use BIT() macro instead of bit fields - add clear all WoL filters implementation - add ERROR state for NVM upd