[dpdk-dev] i354 autoneg-off link issue

2018-02-10 Thread Ananda Sathyanarayana
Hi,

I am observing a strange issue with i354 when auto-negotiation is turned off. 
The device I have has 6 ethernet ports. Port 1 and 2 are based on i210 and port 
3 to 6 are based on i354 (connected thru an external PHY). The CPU is Atom 
Rangeley (4 core).

I have connected ports 3 and 4 back to back with an external cable. When the 
link is forced to 100M/Full duplex with auto-negotiation off on both the ports, 
the link does not come up.

Whereas the link comes up fine when eth3 (i354) and eth1 (i210) are connected 
back to back and forced to 100M/Full duplex with auto-negotiation off.

This issue is seen with DPDK (16.04) and also linux kernel (ubuntu 14.04).

Is this a known issue ?

Following are logs when running the test using ethtool from linux

admin@Ananda-Desk:~$ lspci | grep Ethernet
00:14.0 Ethernet controller: Intel Corporation Ethernet Connection I354 (rev 
03)  - eth2
00:14.1 Ethernet controller: Intel Corporation Ethernet Connection I354 (rev 
03)  - eth3
00:14.2 Ethernet controller: Intel Corporation Ethernet Connection I354 (rev 
03)  - eth4
00:14.3 Ethernet controller: Intel Corporation Ethernet Connection I354 (rev 
03)  - eth5
01:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection 
(rev 03) - eth0
02:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection 
(rev 03) - eth1

admin@Ananda-Desk:~$ ethtool -i eth3
driver: igb
version: 5.2.13-k
firmware-version: 0.0.0
bus-info: :00:14.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

[Force 100M/Full on eth3]

admin@Ananda-Desk:~$ sudo ethtool -s eth3 autoneg off duplex full speed 100

admin@Ananda-Desk:~$ ethtool eth3
Settings for eth3:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes:  Not reported
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
MDI-X: off (auto)
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x0007 (7)
   drv probe link
Link detected: yes

admin@Ananda-Desk:~$ ethtool eth4
Settings for eth4:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: Twisted Pair
PHYAD: 2
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x0007 (7)
   drv probe link
Link detected: yes


[Force 100M/Full on eth4]

admin@Ananda-Desk:~$ sudo ethtool -s eth4 autoneg off duplex full speed 100
admin@Ananda-Desk:~$
admin@Ananda-Desk:~$ ethtool eth4
Settings for eth4:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes:  Not reported
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Speed: Unknown!
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 2
Transceiver: internal
Auto-negotiation: off
MDI-X: on (auto)
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x0007 (7)
   drv probe link
Link detected: no   <<
admin@Ananda-Desk:~$ ethtool eth3
Settings for eth3:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes:  Not reported
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Speed: Unknown!
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 1

[dpdk-dev] DPDK support for x553

2017-10-31 Thread Ananda Sathyanarayana
Hi,



Is the below Ethernet controller (x553) supported in DPDK (in-built into
Denverton based processors) ?



08:00.0 Ethernet controller: Intel Corporation Device 15e4 (rev 11)

09:00.0 Ethernet controller: Intel Corporation Device 15e5 (rev 11)



If it is supported, could you please let me know the DPDK version ?



If not supported, could you please let me know the planned DPDK version ?



Thanks,

Ananda


[dpdk-dev] Mellanox external dependencies...

2017-04-21 Thread Ananda Sathyanarayana
Hi All,



We are using dpdk version 16.04 and have a requirement to verify the MLX4
based adapter card.  Mellanox dpdk driver depends on the external libraries
and kernel modules from mellanox OFED release.



The following link has support for DPDK 16.11 and DPDK 2.2.

http://www.mellanox.com/page/products_dyn?product_family=209&mtag=pmd_for_dpdk



I did not find the mellonox drivers compatible for DPDK 16.04. Could you
please point me to the right version of libibverbs, libmlx4 and Kernel
modules (mlx4_core, mlx4_en, mlx4_ib and ib_uverbs) that can be used with
DPDK 16.04.



Thanks,
Ananda


[dpdk-dev] [PATCH v2] E1000: fix for forced speed/duplex config

2016-11-02 Thread Ananda Sathyanarayana
Fixed the formating/syntax issues reported

>From the code, it looks like, hw->mac.autoneg, variable is used to
switch between calling either autoneg function or forcing
speed/duplex function. But this variable is not modified in
eth_em_start/eth_igb_start routines (it is always set to 1)
even while forcing the link speed.

Following discussion thread has some more information on
this

http://dpdk.org/ml/archives/dev/2016-October/049272.html

Signed-off-by: Ananda Sathyanarayana 
---
 drivers/net/e1000/em_ethdev.c  | 12 
 drivers/net/e1000/igb_ethdev.c | 12 
 2 files changed, 24 insertions(+)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 7cf5f0c..aee3d34 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -639,6 +639,7 @@ eth_em_start(struct rte_eth_dev *dev)
speeds = &dev->data->dev_conf.link_speeds;
if (*speeds == ETH_LINK_SPEED_AUTONEG) {
hw->phy.autoneg_advertised = E1000_ALL_SPEED_DUPLEX;
+   hw->mac.autoneg = 1;
} else {
num_speeds = 0;
autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
@@ -674,6 +675,17 @@ eth_em_start(struct rte_eth_dev *dev)
}
if (num_speeds == 0 || (!autoneg && (num_speeds > 1)))
goto error_invalid_config;
+
+   /* Set/reset the mac.autoneg based on the link speed,
+* fixed or not
+*/
+   if (!autoneg) {
+   hw->mac.autoneg = 0;
+   hw->mac.forced_speed_duplex =
+   hw->phy.autoneg_advertised;
+   } else {
+   hw->mac.autoneg = 1;
+   }
}

e1000_setup_link(hw);
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 4924396..2fddf0c 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1327,6 +1327,7 @@ eth_igb_start(struct rte_eth_dev *dev)
speeds = &dev->data->dev_conf.link_speeds;
if (*speeds == ETH_LINK_SPEED_AUTONEG) {
hw->phy.autoneg_advertised = E1000_ALL_SPEED_DUPLEX;
+   hw->mac.autoneg = 1;
} else {
num_speeds = 0;
autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
@@ -1362,6 +1363,17 @@ eth_igb_start(struct rte_eth_dev *dev)
}
if (num_speeds == 0 || (!autoneg && (num_speeds > 1)))
goto error_invalid_config;
+
+   /* Set/reset the mac.autoneg based on the link speed,
+* fixed or not
+*/
+   if (!autoneg) {
+   hw->mac.autoneg = 0;
+   hw->mac.forced_speed_duplex =
+   hw->phy.autoneg_advertised;
+   } else {
+   hw->mac.autoneg = 1;
+   }
}

e1000_setup_link(hw);
-- 
1.9.1



[dpdk-dev] [PATCH] E1000: fix for forced speed/duplex config

2016-11-01 Thread Ananda Sathyanarayana
>From the code, it looks like, hw->mac.autoneg, variable is used to
switch between calling either autoneg function or forcing
speed/duplex function. But this variable is not modified in
eth_em_start/eth_igb_start routines (it is always set to 1)
even while forcing the link speed.

Following discussion thread has some more information on
this

http://dpdk.org/ml/archives/dev/2016-October/049272.html

Signed-off-by: Ananda Sathyanarayana 
---
 drivers/net/e1000/em_ethdev.c  | 16 ++--
 drivers/net/e1000/igb_ethdev.c | 16 ++--
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 7cf5f0c..a2412f5 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -639,6 +639,7 @@ eth_em_start(struct rte_eth_dev *dev)
speeds = &dev->data->dev_conf.link_speeds;
if (*speeds == ETH_LINK_SPEED_AUTONEG) {
hw->phy.autoneg_advertised = E1000_ALL_SPEED_DUPLEX;
+hw->mac.autoneg = 1;
} else {
num_speeds = 0;
autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
@@ -672,9 +673,20 @@ eth_em_start(struct rte_eth_dev *dev)
hw->phy.autoneg_advertised |= ADVERTISE_1000_FULL;
num_speeds++;
}
-   if (num_speeds == 0 || (!autoneg && (num_speeds > 1)))
+   if (num_speeds == 0 || (!autoneg && (num_speeds > 1))) {
goto error_invalid_config;
-   }
+}
+/*
+ * Set/reset the mac.autoneg based on the link speed,
+ * fixed or not
+ */
+if (!autoneg) {
+hw->mac.autoneg = 0;
+hw->mac.forced_speed_duplex = 
hw->phy.autoneg_advertised;
+} else {
+hw->mac.autoneg = 1;
+}
+}

e1000_setup_link(hw);

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 4924396..9fb498f 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1327,6 +1327,7 @@ eth_igb_start(struct rte_eth_dev *dev)
speeds = &dev->data->dev_conf.link_speeds;
if (*speeds == ETH_LINK_SPEED_AUTONEG) {
hw->phy.autoneg_advertised = E1000_ALL_SPEED_DUPLEX;
+hw->mac.autoneg = 1;
} else {
num_speeds = 0;
autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
@@ -1360,9 +1361,20 @@ eth_igb_start(struct rte_eth_dev *dev)
hw->phy.autoneg_advertised |= ADVERTISE_1000_FULL;
num_speeds++;
}
-   if (num_speeds == 0 || (!autoneg && (num_speeds > 1)))
+   if (num_speeds == 0 || (!autoneg && (num_speeds > 1))) {
goto error_invalid_config;
-   }
+}
+/*
+ * Set/reset the mac.autoneg based on the link speed,
+ * fixed or not
+ */
+if (!autoneg) {
+hw->mac.autoneg = 0;
+hw->mac.forced_speed_duplex = 
hw->phy.autoneg_advertised;
+} else {
+hw->mac.autoneg = 1;
+}
+}

e1000_setup_link(hw);

-- 
1.9.1



[dpdk-dev] Manual link speed/duplex configuration not working with DPDK

2016-10-21 Thread Ananda Sathyanarayana
Hi All,



While testing manual link speed/duplex configuration with DPDK 1.7.1, I
observed the same issues mentioned by the below post

http://dpdk.org/ml/archives/dev/2015-January/010834.html. I see the same
issue with 16.04 as well.



Looks like the above patch is not accepted by the DPDK community yet.  Any
specific reason ?



>From the code, it looks like, hw->mac.autoneg, variable is used to switch
between calling either autoneg function or forcing speed/duplex function.
But this variable is not modified in eth_em_start/eth_igb_start routines
(it is always set to 1) while forcing the link.



s32 e1000_setup_copper_link_generic(struct e1000_hw *hw)

{

s32 ret_val;

bool link;



DEBUGFUNC("e1000_setup_copper_link_generic");



if (hw->mac.autoneg) {  always set, is not modified
in eth_em_start/eth_igb_start



/* Setup autoneg and flow control advertisement and perform

 * autonegotiation.

 */

ret_val = e1000_copper_link_autoneg(hw);

if (ret_val)

return ret_val;

} else {

/* PHY will be set to 10H, 10F, 100H or 100F

 * depending on user settings.

 */

DEBUGOUT("Forcing Speed and Duplex\n");

ret_val = hw->phy.ops.force_speed_duplex(hw);
 Not called at all

if (ret_val) {

DEBUGOUT("Error Forcing Speed and Duplex\n");

return ret_val;

}

}



}





Thanks,

Ananda