[dpdk-dev] [PATCH v2] ixgbe: configure VLAN TPID

2016-06-03 Thread Beilei Xing
The patch enables configuring the ether types of both inner and outer VLANs. Signed-off-by: Beilei Xing --- v2 changes: Modify return value. since inner tpid is not supported by single vlan, return -ENOTSUP. Change meanning of function vlan_tpid_set. drivers/net/ixgbe/ixgbe_ethdev.c | 30

[dpdk-dev] [PATCH v2] e1000: configure VLAN TPID

2016-06-03 Thread Beilei Xing
This patch enables configuring the ether types of both inner and outer VLANs. Note that outer TPID of single VLAN and inner TPID of double VLAN are read only. Signed-off-by: Beilei Xing --- v2 changes: Modify return value. Cause inner tpid is not supported by single vlan, return -ENOTSUP. Add

[dpdk-dev] [PATCH v2] i40e: modify the meaning of single VLAN type

2016-06-13 Thread Beilei Xing
-by: Beilei Xing --- v2 changes: Combine corresponding i40e driver changes into this patch. doc/guides/rel_notes/release_16_07.rst | 3 +++ drivers/net/i40e/i40e_ethdev.c | 29 - lib/librte_ether/rte_ethdev.h | 4 ++-- 3 files changed, 25 insertions

[dpdk-dev] [PATCH v2 00/30] ixgbe/base: update base driver

2016-06-14 Thread Beilei Xing
Update base driver for ixgbe, mainly work on new features and bug fixes. v2 changes: Fix typos and update commit log. Separate [patch 18/29] into two patches. Beilei Xing (30): ixgbe/base: add new VF requests for mailbox API ixgbe/base: add sgmii link for X550 ixgbe/base: fix problematic

[dpdk-dev] [PATCH v2 01/30] ixgbe/base: add new VF requests for mailbox API

2016-06-14 Thread Beilei Xing
It adds two new VF requests of IXGBE_VF_GET_RETA and IXGBE_VF_GET_RSS_KEY for mailbox API. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_mbx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe/base

[dpdk-dev] [PATCH v2 03/30] ixgbe/base: fix problematic return value

2016-06-14 Thread Beilei Xing
An error code indicating that the PF rejects the MAC address change should be returned, in case that the PF has already assigned a MAC for the VF. Fixes: af75078fece3 ("first public release") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_vf.c | 4 +++- 1 file

[dpdk-dev] [PATCH v2 04/30] ixgbe/base: add mac link setup for x550a SFP

2016-06-14 Thread Beilei Xing
This patch adds ixgbe_setup_mac_link_sfp_x550a for x550a SFP. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 4 +++ drivers/net/ixgbe/base/ixgbe_x550.c | 64 - drivers/net/ixgbe/base/ixgbe_x550.h | 3 ++ 3 files changed, 70 insertions

[dpdk-dev] [PATCH v2 05/30] ixgbe/base: fix checksum error of checking PHY token

2016-06-14 Thread Beilei Xing
Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 8a5b1dc..36df3c3 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/

[dpdk-dev] [PATCH v2 06/30] ixgbe/base: refactor eee setup for x550

2016-06-14 Thread Beilei Xing
Break ixgbe_setup_eee_X550 down to better handle a change from if statements to switch statements needed to add X550EM_A KR support. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 174 ++-- 1 file changed, 105 insertions(+), 69 deletions

[dpdk-dev] [PATCH v2 07/30] ixgbe/base: change access method

2016-06-14 Thread Beilei Xing
Use the method pointers instead of direct function calls so that the right thing will happen on X550EM_a. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 84 ++--- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/net

[dpdk-dev] [PATCH v2 08/30] ixgbe/base: add KR support for X550EM_A devices

2016-06-14 Thread Beilei Xing
Implement KR support for X550EM_A devices. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 51 + 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c

[dpdk-dev] [PATCH v2 10/30] ixgbe/base: clear stale pool mappings

2016-06-14 Thread Beilei Xing
This patch adds clearing the pool mappings when configuring default MAC addresses for the interface. Without this there will be the risk of leaking an address into pool 0 which really belongs to VF 0 when SR-IOV is enabled. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_82599.c

[dpdk-dev] [PATCH v2 11/30] ixgbe/base: rename macro of TDL

2016-06-14 Thread Beilei Xing
This patch renames IXGBE_PVFTTDLEN to IXGBE_PVFTDLEN according to abbreviation of Transmit Descriptor Length in datasheet. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h

[dpdk-dev] [PATCH v2 09/30] ixgbe/base: add link mac setup for x550a SFP+

2016-06-14 Thread Beilei Xing
This patch updates ixgbe_setup_mac_link_sfp_x550a for x550 SFP+. ixgbe_set_lan_id_multi_port_pcie has been updated to set the MAC instance(0/1) which is needed when configuring the external PHY, since x550a has two instances of MGPK. The MAC instance is read from the EEPROM. Signed-off-by: Beilei

[dpdk-dev] [PATCH v2 13/30] ixgbe/base: fix for code style

2016-06-14 Thread Beilei Xing
The ixgbe_vf.h file did not use __ and instead used which is not the standard used in every other file. Fixes: af75078fece3 ("first public release") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_vf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[dpdk-dev] [PATCH v2 12/30] ixgbe/base: fix error path to release lock

2016-06-14 Thread Beilei Xing
When there is an error getting the PHY token, the error path fails to release the locks that it has taken. Release those locks in that failure case. Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing) Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x

[dpdk-dev] [PATCH v2 14/30] ixgbe/base: fix firmware commands on x550em_a

2016-06-14 Thread Beilei Xing
This patch fixes firmware commands on x550em_a. For one thing, the checksum value was not being set. Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 19 ++- 1 file changed, 10 insert

[dpdk-dev] [PATCH v2 16/30] ixgbe/base: add new phy definitions

2016-06-14 Thread Beilei Xing
It adds new phy definitions. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_phy.c | 16 +- drivers/net/ixgbe/base/ixgbe_type.h | 14 +- drivers/net/ixgbe/base/ixgbe_x550.c | 303 ++-- drivers/net/ixgbe/base/ixgbe_x550.h | 43 + 4 files

[dpdk-dev] [PATCH v2 18/30] ixgbe/base: add function to reset swfw semaphore

2016-06-14 Thread Beilei Xing
this when you know no one should be holding the semaphore (i.e. probe time). Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.c| 14 ++ drivers/net/ixgbe/base/ixgbe_api.h| 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 1

[dpdk-dev] [PATCH v2 17/30] ixgbe/base: change device IDs

2016-06-14 Thread Beilei Xing
though nothing should be attached. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.c | 2 ++ drivers/net/ixgbe/base/ixgbe_type.h | 7 --- drivers/net/ixgbe/base/ixgbe_x550.c | 17 - lib/librte_eal/common/include

[dpdk-dev] [PATCH v2 19/30] ixgbe/base: fix possible race issue

2016-06-14 Thread Beilei Xing
This patch fixes possible race issue between ports when issuing host interface command by acquiring/releasing the management host interface semaphore in ixgbe_host_interface_command. Fixes: 36f43e8679ae ("ixgbe/base: refactor manageability block communication") Signed-off-by: B

[dpdk-dev] [PATCH v2 21/30] ixgbe/base: limit PHY token accessing to MDIO only

2016-06-14 Thread Beilei Xing
This patch limits getting and putting the PHY Token to PHY MDIO access only by adding ixgbe_read_phy_reg_x550a and ixgbe_write_phy_reg_x550a. The PHY Token is only needed to synchronize access to the MDIO shared between the two MAC instance. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base

[dpdk-dev] [PATCH v2 23/30] ixgbe/base: add bypassing VLVF

2016-06-14 Thread Beilei Xing
This patch adds support for the VLVF to be bypassed when adding or removing a VFTA entry. The PF can utilize the default pool while preserving the VLVF for the VFs use. Meanwhile, update corresponding VF ops and drivers where corresponding ops is invoked. Signed-off-by: Beilei Xing --- drivers

[dpdk-dev] [PATCH v2 26/30] ixgbe/base: fix endianness issues

2016-06-14 Thread Beilei Xing
This patch fixes endianness issues about host interface command. Fixes: ad66a85dce9a ("ixgbe/base: new FW values") Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_osdep.h | 1 + drivers/net/ixgbe/bas

[dpdk-dev] [PATCH v2 25/30] ixgbe/base: use u8 to replace u16 for a variable

2016-06-14 Thread Beilei Xing
Since PCIe standard defines maximum of 8 functions per device lan_id is a value 0..7. Because of that, lan_id don't need to be u16. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- drivers/net/ixgbe/base/ixgbe_type.h | 2 +- 2 files changed, 2 insertions(+), 2

[dpdk-dev] [PATCH v2 29/30] ixgbe/base: define if enable crosstalk work around

2016-06-14 Thread Beilei Xing
A work around for a new crosstalk erratum that causes link flap in entry cages has been introduced. So this patch defines the bit in NVM that will tell software if this work around is needed. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 1 + 1 file changed, 1 insertion

[dpdk-dev] [PATCH v2 22/30] ixgbe/base: simplify add/remove VLANs

2016-06-14 Thread Beilei Xing
This patch simplifies the adding and removing VLANs from VFTA/VLVF/VLVFB registers. The logic to determine registers has been simplified to (vid / 32) and (1 - vid / 32). Many conditional paths and checks are no longer needed with this patch. Signed-off-by: Beilei Xing --- drivers/net/ixgbe

[dpdk-dev] [PATCH v2 30/30] ixgbe/base: update README

2016-06-14 Thread Beilei Xing
to be bypassed when adding/removing a VFTA entry. Added x550a flow control auto negotiation support. Signed-off-by: Beilei Xing --- doc/guides/rel_notes/release_16_07.rst | 11 +++ drivers/net/ixgbe/base/README | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v2 20/30] ixgbe/base: fix register access error

2016-06-14 Thread Beilei Xing
This patch corrects the FLA/GSCL/GSCN access offset value according to the datasheet. Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 42 - 1 file changed, 41 insert

[dpdk-dev] [PATCH v2 15/30] ixgbe/base: refactor NW management interface ops

2016-06-14 Thread Beilei Xing
This patch adds ixgbe_read_mng_if_sel_x550em to read NW_MNG_IF_SEL register and save fields such as PHY MDIO_ADD. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 2 ++ drivers/net/ixgbe/base/ixgbe_x550.c | 48 +++-- 2 files changed, 32

[dpdk-dev] [PATCH v2 24/30] ixgbe/base: unify coding style

2016-06-14 Thread Beilei Xing
This patch changes static keyword to STATIC definition, which can be redefined depending on the compiler used. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 38 ++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers

[dpdk-dev] [PATCH v2 28/30] ixgbe/base: add flow control autoneg for x550a

2016-06-14 Thread Beilei Xing
ixgbe_fc_enable_generic. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.h| 2 + drivers/net/ixgbe/base/ixgbe_common.c | 5 +- drivers/net/ixgbe/base/ixgbe_type.h | 6 ++ drivers/net/ixgbe/base/ixgbe_x550.c | 181 ++ drivers/net/ixgbe/base/ixgbe_x550.h

[dpdk-dev] [PATCH v2 27/30] ixgbe/base: allow setting mac anti spoofing per vf

2016-06-14 Thread Beilei Xing
-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_common.c | 40 ++- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index

[dpdk-dev] [PATCH v2 02/30] ixgbe/base: add sgmii link for X550

2016-06-14 Thread Beilei Xing
It adds sgmii link for X550. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 9 +++ drivers/net/ixgbe/base/ixgbe_x550.c | 127 +--- 2 files changed, 127 insertions(+), 9 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b

[dpdk-dev] [PATCH v3] ixgbe: configure VLAN TPID

2016-06-14 Thread Beilei Xing
The patch enables configuring the ether types of both inner and outer VLANs. Signed-off-by: Beilei Xing --- v3 changes: Fix inserting vlan tpid issue for Tx. drivers/net/ixgbe/ixgbe_ethdev.c | 39 +-- lib/librte_ether/rte_ethdev.h| 4 ++-- 2 files

[dpdk-dev] [PATCH v3 00/30]

2016-06-15 Thread Beilei Xing
Update base driver for ixgbe, mainly work on new features and bug fixes. v3 changes: Fix some commit log issues. Beilei Xing (30): ixgbe/base: add new VF requests for mailbox API ixgbe/base: add sgmii link for X550 ixgbe/base: fix problematic return value ixgbe/base: add MAC link setup

[dpdk-dev] [PATCH v3 01/30] ixgbe/base: add new VF requests for mailbox API

2016-06-15 Thread Beilei Xing
It adds two new VF requests of IXGBE_VF_GET_RETA and IXGBE_VF_GET_RSS_KEY for mailbox API. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_mbx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe/base

[dpdk-dev] [PATCH v3 02/30] ixgbe/base: add sgmii link for X550

2016-06-15 Thread Beilei Xing
It adds sgmii link for X550. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 9 +++ drivers/net/ixgbe/base/ixgbe_x550.c | 127 +--- 2 files changed, 127 insertions(+), 9 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b

[dpdk-dev] [PATCH v3 03/30] ixgbe/base: fix problematic return value

2016-06-15 Thread Beilei Xing
An error code indicating that the PF rejects the MAC address change should be returned, in case that the PF has already assigned a MAC for the VF. Fixes: af75078fece3 ("first public release") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_vf.c | 4 +++- 1 file

[dpdk-dev] [PATCH v3 05/30] ixgbe/base: fix checksum error of checking PHY token

2016-06-15 Thread Beilei Xing
0em_a") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 8a5b1dc..36df3c3 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers

[dpdk-dev] [PATCH v3 09/30] ixgbe/base: add link MAC setup for X550a SFP+

2016-06-15 Thread Beilei Xing
This patch updates ixgbe_setup_mac_link_sfp_x550a for X550 SFP+. ixgbe_set_lan_id_multi_port_pcie has been updated to set the MAC instance(0/1) which is needed when configuring the external PHY, since X550a has two instances of MGPK. The MAC instance is read from the EEPROM. Signed-off-by: Beilei

[dpdk-dev] [PATCH v3 08/30] ixgbe/base: add KR support for X550em_a devices

2016-06-15 Thread Beilei Xing
Implement KR support for X550em_a devices. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 51 + 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c

[dpdk-dev] [PATCH v3 06/30] ixgbe/base: refactor eee setup for X550

2016-06-15 Thread Beilei Xing
Break ixgbe_setup_eee_X550 down to better handle a change from if statements to switch statements needed to add X550em_a KR support. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 174 ++-- 1 file changed, 105 insertions(+), 69 deletions

[dpdk-dev] [PATCH v3 10/30] ixgbe/base: clear stale pool mappings

2016-06-15 Thread Beilei Xing
This patch adds clearing the pool mappings when configuring default MAC addresses for the interface. Without this there will be the risk of leaking an address into pool 0 which really belongs to VF 0 when SR-IOV is enabled. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_82599.c

[dpdk-dev] [PATCH v3 11/30] ixgbe/base: rename macro of TDL

2016-06-15 Thread Beilei Xing
This patch renames IXGBE_PVFTTDLEN to IXGBE_PVFTDLEN according to abbreviation of Transmit Descriptor Length in datasheet. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h

[dpdk-dev] [PATCH v3 04/30] ixgbe/base: add MAC link setup for X550a SFP

2016-06-15 Thread Beilei Xing
This patch adds ixgbe_setup_mac_link_sfp_x550a for X550a SFP. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 4 +++ drivers/net/ixgbe/base/ixgbe_x550.c | 64 - drivers/net/ixgbe/base/ixgbe_x550.h | 3 ++ 3 files changed, 70 insertions

[dpdk-dev] [PATCH v3 13/30] ixgbe/base: fix for code style

2016-06-15 Thread Beilei Xing
The ixgbe_vf.h file did not use __ and instead used which is not the standard used in every other file. Fixes: af75078fece3 ("first public release") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_vf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[dpdk-dev] [PATCH v3 14/30] ixgbe/base: fix firmware commands on X550em_a

2016-06-15 Thread Beilei Xing
This patch fixes firmware commands on X550em_a. For one thing, the checksum value was not being set. Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 19 ++- 1 file changed, 10 insert

[dpdk-dev] [PATCH v3 07/30] ixgbe/base: change access method

2016-06-15 Thread Beilei Xing
Use the method pointers instead of direct function calls so that the right thing will happen on X550EM_a. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 84 ++--- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/net

[dpdk-dev] [PATCH v3 15/30] ixgbe/base: refactor NW management interface ops

2016-06-15 Thread Beilei Xing
This patch adds ixgbe_read_mng_if_sel_x550em to read NW_MNG_IF_SEL register and save fields such as PHY MDIO_ADD. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 2 ++ drivers/net/ixgbe/base/ixgbe_x550.c | 48 +++-- 2 files changed, 32

[dpdk-dev] [PATCH v3 16/30] ixgbe/base: add new phy definitions

2016-06-15 Thread Beilei Xing
It adds new phy definitions. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_phy.c | 16 +- drivers/net/ixgbe/base/ixgbe_type.h | 14 +- drivers/net/ixgbe/base/ixgbe_x550.c | 303 ++-- drivers/net/ixgbe/base/ixgbe_x550.h | 43 + 4 files

[dpdk-dev] [PATCH v3 12/30] ixgbe/base: fix error path to release lock

2016-06-15 Thread Beilei Xing
When there is an error getting the PHY token, the error path fails to release the locks that it has taken. Release those locks in that failure case. Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing on X550em_a") Signed-off-by: Beilei Xing --- drivers/net/

[dpdk-dev] [PATCH v3 18/30] ixgbe/base: add function to reset swfw semaphore

2016-06-15 Thread Beilei Xing
this when you know no one should be holding the semaphore (i.e. probe time) Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.c| 14 ++ drivers/net/ixgbe/base/ixgbe_api.h| 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 1

[dpdk-dev] [PATCH v3 19/30] ixgbe/base: fix possible race issue

2016-06-15 Thread Beilei Xing
This patch fixes possible race issue between ports when issuing host interface command by acquiring/releasing the management host interface semaphore in ixgbe_host_interface_command. Fixes: 36f43e8679ae ("ixgbe/base: refactor manageability block communication") Signed-off-by: B

[dpdk-dev] [PATCH v3 17/30] ixgbe/base: change device IDs

2016-06-15 Thread Beilei Xing
though nothing should be attached. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.c | 2 ++ drivers/net/ixgbe/base/ixgbe_type.h | 7 --- drivers/net/ixgbe/base/ixgbe_x550.c | 17 - lib/librte_eal/common/include

[dpdk-dev] [PATCH v3 20/30] ixgbe/base: fix register access error

2016-06-15 Thread Beilei Xing
This patch corrects the FLA/GSCL/GSCN access offset value according to the datasheet. Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 42 - 1 file changed, 41 insert

[dpdk-dev] [PATCH v3 21/30] ixgbe/base: limit PHY token accessing to MDIO only

2016-06-15 Thread Beilei Xing
This patch limits getting and putting the PHY Token to PHY MDIO access only by adding ixgbe_read_phy_reg_x550a and ixgbe_write_phy_reg_x550a. The PHY Token is only needed to synchronize access to the MDIO shared between the two MAC instance. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base

[dpdk-dev] [PATCH v3 22/30] ixgbe/base: simplify add/remove VLANs

2016-06-15 Thread Beilei Xing
This patch simplifies the adding and removing VLANs from VFTA/VLVF/VLVFB registers. The logic to determine registers has been simplified to (vid / 32) and (1 - vid / 32). Many conditional paths and checks are no longer needed with this patch. Signed-off-by: Beilei Xing --- drivers/net/ixgbe

[dpdk-dev] [PATCH v3 23/30] ixgbe/base: add bypassing VLVF

2016-06-15 Thread Beilei Xing
This patch adds support for the VLVF to be bypassed when adding or removing a VFTA entry. The PF can utilize the default pool while preserving the VLVF for the VFs use. Meanwhile, update corresponding VF ops and drivers where corresponding ops is invoked. Signed-off-by: Beilei Xing --- drivers

[dpdk-dev] [PATCH v3 24/30] ixgbe/base: unify coding style

2016-06-15 Thread Beilei Xing
This patch changes static keyword to STATIC definition, which can be redefined depending on the compiler used. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 38 ++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers

[dpdk-dev] [PATCH v3 25/30] ixgbe/base: use u8 to replace u16 for a variable

2016-06-15 Thread Beilei Xing
Since PCIe standard defines maximum of 8 functions per device lan_id is a value 0..7. Because of that, lan_id don't need to be u16. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- drivers/net/ixgbe/base/ixgbe_type.h | 2 +- 2 files changed, 2 insertions(+), 2

[dpdk-dev] [PATCH v3 26/30] ixgbe/base: fix endianness issues

2016-06-15 Thread Beilei Xing
This patch fixes endianness issues about host interface command. Fixes: ad66a85dce9a ("ixgbe/base: new FW values") Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_osdep.h | 1 + drivers/net/ixgbe/bas

[dpdk-dev] [PATCH v3 27/30] ixgbe/base: allow setting MAC anti spoofing per VF

2016-06-15 Thread Beilei Xing
-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_common.c | 40 ++- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index

[dpdk-dev] [PATCH v3 28/30] ixgbe/base: add flow control autoneg for X550a

2016-06-15 Thread Beilei Xing
ixgbe_fc_enable_generic. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.h| 2 + drivers/net/ixgbe/base/ixgbe_common.c | 5 +- drivers/net/ixgbe/base/ixgbe_type.h | 6 ++ drivers/net/ixgbe/base/ixgbe_x550.c | 181 ++ drivers/net/ixgbe/base/ixgbe_x550.h

[dpdk-dev] [PATCH v3 29/30] ixgbe/base: define if enable crosstalk work around

2016-06-15 Thread Beilei Xing
A work around for a new crosstalk erratum that causes link flap in entry cages has been introduced. So this patch defines the bit in NVM that will tell software if this work around is needed. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 1 + 1 file changed, 1 insertion

[dpdk-dev] [PATCH v3 30/30] ixgbe/base: update README

2016-06-15 Thread Beilei Xing
to be bypassed when adding/removing a VFTA entry. Added X550a flow control auto negotiation support. Signed-off-by: Beilei Xing --- doc/guides/rel_notes/release_16_07.rst | 11 +++ drivers/net/ixgbe/base/README | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc

[dpdk-dev] [PATCH v3] e1000: configure VLAN TPID

2016-06-16 Thread Beilei Xing
This patch enables configuring the outer TPID for double VLAN. Note that outer TPID of single VLAN and inner TPID of double VLAN are read only. Signed-off-by: Beilei Xing --- v3 changes: Update commit log and comments. drivers/net/e1000/igb_ethdev.c | 37

[dpdk-dev] [PATCH v4] e1000: configure VLAN TPID

2016-06-16 Thread Beilei Xing
This patch enables configuring the outer TPID for double VLAN. Note that all other TPID values are read only. Signed-off-by: Beilei Xing --- v4 changes: Optimize the code to be more readable. v3 changes: Update commit log and comments. v2 changes: Modify return value. Cause inner TPID

[dpdk-dev] [PATCH v3] i40e: fix the type issue of a single VLAN type

2016-06-22 Thread Beilei Xing
;) Signed-off-by: Beilei Xing --- v3 changes: Note it as a "fixed issue" in the i40e driver. Reword the title. v2 changes: Combine corresponding i40e driver changes into this patch. doc/guides/rel_notes/release_16_07.rst | 7 +++ drivers/net/i40e/i40e_e

[dpdk-dev] [PATCH v4 00/29] ixgbe/base: update base driver

2016-06-23 Thread Beilei Xing
Update base driver for ixgbe, mainly work on new features and bug fixes. v4 changes: Update some commit logs. Merge related patched. v3 changes: Fix some commit log issues. Beilei Xing (29): ixgbe/base: add new VF requests for mailbox API ixgbe/base: add sgmii link for X550 ixgbe/base

[dpdk-dev] [PATCH v4 01/29] ixgbe/base: add new VF requests for mailbox API

2016-06-23 Thread Beilei Xing
This patch adds two new VF requests of IXGBE_VF_GET_RETA and IXGBE_VF_GET_RSS_KEY for mailbox API. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_mbx.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe

[dpdk-dev] [PATCH v4 02/29] ixgbe/base: add sgmii link for X550

2016-06-23 Thread Beilei Xing
This patch adds new phy type and media type to support sgmii link for X550, and add ixgbe_setup_sgmii to support sgmii link setup. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 9 +++ drivers/net/ixgbe/base/ixgbe_x550.c | 127 +--- 2

[dpdk-dev] [PATCH v4 03/29] ixgbe/base: fix problematic return value

2016-06-23 Thread Beilei Xing
An error code indicating that the PF rejects the MAC address change should be returned, in case that the PF has already assigned a MAC for the VF. Fixes: af75078fece3 ("first public release") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_vf.c | 4 +++- 1 file

[dpdk-dev] [PATCH v4 05/29] ixgbe/base: fix firmware command checksum error

2016-06-23 Thread Beilei Xing
. Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing on X550em_a") Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 21 - 1 file changed, 12 insert

[dpdk-dev] [PATCH v4 06/29] ixgbe/base: refactor eee setup for X550

2016-06-23 Thread Beilei Xing
Break ixgbe_setup_eee_X550 down to better handle a change from if statements to switch statements needed to add X550em_a KR support. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 174 ++-- 1 file changed, 105 insertions(+), 69 deletions

[dpdk-dev] [PATCH v4 08/29] ixgbe/base: change access method

2016-06-23 Thread Beilei Xing
Use the method pointers instead of direct function calls so that the right thing will happen on X550EM_a. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 76 ++--- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/drivers/net

[dpdk-dev] [PATCH v4 09/29] ixgbe/base: add link MAC setup for X550a SFP+

2016-06-23 Thread Beilei Xing
This patch updates ixgbe_setup_mac_link_sfp_x550a for X550 SFP+. ixgbe_set_lan_id_multi_port_pcie has been updated to set the MAC instance(0/1) which is needed when configuring the external PHY, since X550a has two instances of MGPK. The MAC instance is read from the EEPROM. Signed-off-by: Beilei

[dpdk-dev] [PATCH v4 10/29] ixgbe/base: clear stale pool mappings

2016-06-23 Thread Beilei Xing
This patch adds clearing the pool mappings when configuring default MAC addresses for the interface. Without this there will be the risk of leaking an address into pool 0 which really belongs to VF 0 when SR-IOV is enabled. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_82599.c

[dpdk-dev] [PATCH v4 04/29] ixgbe/base: add MAC link setup for X550a SFP

2016-06-23 Thread Beilei Xing
This patch adds ixgbe_setup_mac_link_sfp_x550a for X550a SFP. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 4 +++ drivers/net/ixgbe/base/ixgbe_x550.c | 64 - drivers/net/ixgbe/base/ixgbe_x550.h | 3 ++ 3 files changed, 70 insertions

[dpdk-dev] [PATCH v4 07/29] ixgbe/base: add KR support for X550em_a devices

2016-06-23 Thread Beilei Xing
Implement KR support for X550em_a devices. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 53 + 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c

[dpdk-dev] [PATCH v4 12/29] ixgbe/base: fix error path to release lock

2016-06-23 Thread Beilei Xing
When there is an error getting the PHY token, the error path fails to release the locks that it has taken. Release those locks in that failure case. Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing on X550em_a") Signed-off-by: Beilei Xing --- drivers/net/

[dpdk-dev] [PATCH v4 11/29] ixgbe/base: rename macro of TDL

2016-06-23 Thread Beilei Xing
This patch renames IXGBE_PVFTTDLEN to IXGBE_PVFTDLEN according to abbreviation of Transmit Descriptor Length in datasheet. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h

[dpdk-dev] [PATCH v4 13/29] ixgbe/base: fix for code style

2016-06-23 Thread Beilei Xing
The ixgbe_vf.h file did not use __ and instead used which is not the standard used in every other file. Fixes: af75078fece3 ("first public release") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_vf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[dpdk-dev] [PATCH v4 14/29] ixgbe/base: optimize internal PHY mode determination

2016-06-23 Thread Beilei Xing
NW_MNG_IF_SEL register is critical PHY link configuration, add ixgbe_read_mng_if_sel_x550em to read NW_MNG_IF_SEL, validate register values and save fields such as PHY MDIO address, optimize internal PHY mode determination. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 2

[dpdk-dev] [PATCH v4 15/29] ixgbe/base: add new phy definitions

2016-06-23 Thread Beilei Xing
It adds new phy definitions. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_phy.c | 16 +- drivers/net/ixgbe/base/ixgbe_type.h | 14 +- drivers/net/ixgbe/base/ixgbe_x550.c | 303 ++-- drivers/net/ixgbe/base/ixgbe_x550.h | 43 + 4 files

[dpdk-dev] [PATCH v4 16/29] ixgbe/base: change device IDs

2016-06-23 Thread Beilei Xing
though nothing should be attached. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.c | 2 ++ drivers/net/ixgbe/base/ixgbe_type.h | 7 --- drivers/net/ixgbe/base/ixgbe_x550.c | 17 - lib/librte_eal/common/include

[dpdk-dev] [PATCH v4 17/29] ixgbe/base: add function to reset swfw semaphore

2016-06-23 Thread Beilei Xing
this when you know no one should be holding the semaphore (i.e. probe time) Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.c| 14 ++ drivers/net/ixgbe/base/ixgbe_api.h| 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 1

[dpdk-dev] [PATCH v4 18/29] ixgbe/base: fix possible race issue

2016-06-23 Thread Beilei Xing
This patch fixes possible race issue between ports when issuing host interface command by acquiring/releasing the management host interface semaphore in ixgbe_host_interface_command. Fixes: 36f43e8679ae ("ixgbe/base: refactor manageability block communication") Signed-off-by: B

[dpdk-dev] [PATCH v4 19/29] ixgbe/base: fix register access error

2016-06-23 Thread Beilei Xing
This patch corrects the FLA/GSCL/GSCN access offset value according to the datasheet. Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 42 - 1 file changed, 41 insert

[dpdk-dev] [PATCH v4 21/29] ixgbe/base: simplify add/remove VLANs

2016-06-23 Thread Beilei Xing
This patch simplifies the adding and removing VLANs from VFTA/VLVF/VLVFB registers. The logic to determine registers has been simplified to (vid / 32) and (1 - vid / 32). Many conditional paths and checks are no longer needed with this patch. Signed-off-by: Beilei Xing --- drivers/net/ixgbe

[dpdk-dev] [PATCH v4 22/29] ixgbe/base: add bypassing VLVF

2016-06-23 Thread Beilei Xing
This patch adds support for the VLVF to be bypassed when adding or removing a VFTA entry. The PF can utilize the default pool while preserving the VLVF for the VFs use. Meanwhile, update corresponding VF ops and drivers where corresponding ops is invoked. Signed-off-by: Beilei Xing --- drivers

[dpdk-dev] [PATCH v4 20/29] ixgbe/base: limit PHY token accessing to MDIO only

2016-06-23 Thread Beilei Xing
This patch limits getting and putting the PHY Token to PHY MDIO access only by adding ixgbe_read_phy_reg_x550a and ixgbe_write_phy_reg_x550a. The PHY Token is only needed to synchronize access to the MDIO shared between the two MAC instance. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base

[dpdk-dev] [PATCH v4 24/29] ixgbe/base: use u8 to replace u16 for a variable

2016-06-23 Thread Beilei Xing
Since PCIe standard defines maximum of 8 functions per device lan_id is a value 0..7. Because of that, lan_id don't need to be u16. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- drivers/net/ixgbe/base/ixgbe_type.h | 2 +- 2 files changed, 2 insertions(+), 2

[dpdk-dev] [PATCH v4 25/29] ixgbe/base: fix endianness issues

2016-06-23 Thread Beilei Xing
This patch fixes endianness issues about host interface command. Fixes: ad66a85dce9a ("ixgbe/base: new FW values") Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device") Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_osdep.h | 1 + drivers/net/ixgbe/bas

[dpdk-dev] [PATCH v4 26/29] ixgbe/base: allow setting MAC anti spoofing per VF

2016-06-23 Thread Beilei Xing
-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_common.c | 40 ++- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index

[dpdk-dev] [PATCH v4 23/29] ixgbe/base: unify coding style

2016-06-23 Thread Beilei Xing
This patch changes static keyword to STATIC definition, which can be redefined depending on the compiler used. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_x550.c | 38 ++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers

[dpdk-dev] [PATCH v4 27/29] ixgbe/base: add flow control autoneg for X550a

2016-06-23 Thread Beilei Xing
ixgbe_fc_enable_generic. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_api.h| 2 + drivers/net/ixgbe/base/ixgbe_common.c | 5 +- drivers/net/ixgbe/base/ixgbe_type.h | 6 ++ drivers/net/ixgbe/base/ixgbe_x550.c | 181 ++ drivers/net/ixgbe/base/ixgbe_x550.h

[dpdk-dev] [PATCH v4 29/29] ixgbe/base: update README

2016-06-23 Thread Beilei Xing
to be bypassed when adding/removing a VFTA entry. Added X550a flow control auto negotiation support. Signed-off-by: Beilei Xing --- doc/guides/rel_notes/release_16_07.rst | 11 +++ drivers/net/ixgbe/base/README | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc

[dpdk-dev] [PATCH v4 28/29] ixgbe/base: define if enable crosstalk work around

2016-06-23 Thread Beilei Xing
A work around for a new crosstalk erratum that causes link flap in entry cages has been introduced. So this patch defines the bit in NVM that will tell software if this work around is needed. Signed-off-by: Beilei Xing --- drivers/net/ixgbe/base/ixgbe_type.h | 1 + 1 file changed, 1 insertion

[dpdk-dev] [PATCH] examples/l3fwd: update documentation

2016-06-23 Thread Beilei Xing
Update l3fwd documentation with -E, -L and --eth-dest options. Signed-off-by: Beilei Xing --- doc/guides/sample_app_ug/l3_forward.rst | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/guides/sample_app_ug/l3_forward.rst b/doc/guides/sample_app_ug/l3_forward.rst

  1   2   >