[dpdk-users] Link Status Down on Cisco C220 M3 Enic Driver

2018-01-16 Thread Haci Burak
Hello ,

I am new to DPDK and I have this problem with the link status. But when i
see it with CIMC their status is up and actually both interface is
connected to each other with cable.
I have followed the instructions and here my logs and outputs is below. If
there any other logs or stats i can provide ,  i would gladly do that. I am
trying to run on host machine installation. (No VM )

padmin@ubuntu-host:~$
> *uname -a*Linux ubuntu-host 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed
> Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux




> padmin@ubuntu-host:~/dpdk-stable-16.11.4/examples/ethtool/ethtool-app/ethtool/ethtool-app/x86_64-native-linuxapp-gcc/app$
>
> *lspci | grep Cisco | grep Ethernet*08:00.0 Ethernet controller: Cisco
> Systems Inc VIC Ethernet NIC (rev a2)
> 09:00.0 Ethernet controller: Cisco Systems Inc VIC Ethernet NIC (rev a2)



 I am using version 16.11 which is used for Warp17 which the app I planning
to use . Here the output log of the when i run the example *ethtool*.


padmin@ubuntu-host:~/dpdk-stable-16.11.4/examples/ethtool/ethtool-app/ethtool/ethtool-app/x86_64-native-linuxapp-gcc/app$
> sudo ./ethtool -l 0-4 -n 4
> EAL: Detected 32 lcore(s)
> EAL: Probing VFIO support...
> EAL: PCI device :01:00.0 on NUMA socket 0
> EAL:   probe driver: 8086:1521 net_e1000_igb
> EAL: PCI device :01:00.1 on NUMA socket 0
> EAL:   probe driver: 8086:1521 net_e1000_igb
> EAL: PCI device :08:00.0 on NUMA socket 0
> EAL:   probe driver: 1137:43 net_enic
> PMD: rte_enic_pmd: Advanced Filters not available
> PMD: rte_enic_pmd: vNIC MAC addr 54:a2:74:cc:94:90 wq/rq 4096/4096 mtu
> 1500, max mtu:9004
> PMD: rte_enic_pmd: vNIC csum tx/rx yes/yes rss yes intr mode any type min
> timer 125 usec loopback tag 0x
> PMD: rte_enic_pmd: vNIC resources avail: wq 128 rq 256 cq 256 intr 1
> EAL: PCI device :09:00.0 on NUMA socket 0
> EAL:   probe driver: 1137:43 net_enic
> PMD: rte_enic_pmd: Advanced Filters not available
> PMD: rte_enic_pmd: vNIC MAC addr 54:a2:74:cc:94:91 wq/rq 4096/4096 mtu
> 1500, max mtu:9004
> PMD: rte_enic_pmd: vNIC csum tx/rx yes/yes rss yes intr mode any type min
> timer 125 usec loopback tag 0x
> PMD: rte_enic_pmd: vNIC resources avail: wq 128 rq 256 cq 256 intr 1
> Number of NICs: 2
> Init port 0..
> PMD: rte_enic_pmd: Scatter rx mode disabled
> PMD: rte_enic_pmd: Rq 0 Scatter rx mode not being used
> PMD: rte_enic_pmd: Using 128 rx descriptors (sop 128, data 0)
> PMD: rte_enic_pmd: TX Queues - effective number of descs:256
> PMD: rte_enic_pmd: vNIC resources used:  wq 1 rq 2 cq 2 intr 0
> PMD: rte_enic_pmd: RQ[0] error_status 4
> Init port 1..
> PMD: rte_enic_pmd: Scatter rx mode disabled
> PMD: rte_enic_pmd: Rq 0 Scatter rx mode not being used
> PMD: rte_enic_pmd: Using 128 rx descriptors (sop 128, data 0)
> PMD: rte_enic_pmd: TX Queues - effective number of descs:256
> PMD: rte_enic_pmd: vNIC resources used:  wq 1 rq 2 cq 2 intr 0
> PMD: rte_enic_pmd: RQ[0] error_status 4
> EthApp> quit



*My NIC status:*


Network devices using DPDK-compatible driver
> 
> :08:00.0 'VIC Ethernet NIC' drv=igb_uio unused=
> :09:00.0 'VIC Ethernet NIC' drv=igb_uio unused=
> Network devices using kernel driver
> ===
> :01:00.0 'I350 Gigabit Network Connection' if=eth2 drv=igb
> unused=igb_uio *Active*
> :01:00.1 'I350 Gigabit Network Connection' if=eth3 drv=igb
> unused=igb_uio
> Other network devices
> =
> 
> Crypto devices using DPDK-compatible driver
> ===
> 
> Crypto devices using kernel driver
> ==
> 
> Other crypto devices
> 
> 



Memory

AnonHugePages: 26624 kB
> HugePages_Total:  32
> HugePages_Free:32
> HugePages_Rsvd:0
> HugePages_Surp:0
> Hugepagesize:1048576 kB




Thanks in advance
-- 

*Haci Burak Karamik*
Software Architect
Mobile:  0905397368221 <00905397368221>
Skype: bkaramik
[image: Aurea]



[dpdk-users] Link status?

2016-05-25 Thread Gadre Nayan
There is a patch available for link status change on a kni interface. It
will send netlink message from the kni driver.
On 25 May 2016 9:45 p.m., "Jason Lixfeld"  wrote:

> Hi,
>
> I?m messing around with MoonGen and trying to simplify some basic
> diagnostics before calling whatever MoonGen script I wanted to call.  Right
> now, I?m trying to find a way to report back the status of a link to see if
> it?s up so that I know whether or not it can be used as a tx or rx
> interface for whatever MoonGen script I want to run.
>
> Is there an easy way to do that with an existing dpdk application, or does
> one need to be an super uber programmer type (which I am not anywhere close
> to being :)) and write some application to be able to do that?
>
> Not sure if it matters, but I?m using an Intel 82599 6 port SFP+. I?m
> using v2.2.0 (I think?  Whatever the version is that is retrieved from git
> when I build MoonGen), Debian 8.4.
>
> Sorry for sounding dumb.  I?m not a programmer in the least :(
>
> Thanks in advance!


[dpdk-users] Link status?

2016-05-25 Thread Thomas Monjalon
2016-05-25 12:14, Jason Lixfeld:
> Is there an easy way to do that with an existing dpdk application, or does 
> one need to be an super uber programmer type (which I am not anywhere close 
> to being :)) and write some application to be able to do that?

Yes you need to access to a variable inside the application to know that.
You can have a secondary application which looks into the primary one.
You can try to write one or check these apps:
app/proc_info (stats but no link status yet)
examples/ethtool/ethtool-app/ (more complicate than a secondary app)



[dpdk-users] Link status?

2016-05-25 Thread Jason Lixfeld
It sounds like that will only tell me if link status changes, not what the 
current link status is?

> On May 25, 2016, at 12:29 PM, Gadre Nayan  wrote:
> 
> There is a patch available for link status change on a kni interface. It will 
> send netlink message from the kni driver.
> 
> On 25 May 2016 9:45 p.m., "Jason Lixfeld"  wrote:
> Hi,
> 
> I?m messing around with MoonGen and trying to simplify some basic diagnostics 
> before calling whatever MoonGen script I wanted to call.  Right now, I?m 
> trying to find a way to report back the status of a link to see if it?s up so 
> that I know whether or not it can be used as a tx or rx interface for 
> whatever MoonGen script I want to run.
> 
> Is there an easy way to do that with an existing dpdk application, or does 
> one need to be an super uber programmer type (which I am not anywhere close 
> to being :)) and write some application to be able to do that?
> 
> Not sure if it matters, but I?m using an Intel 82599 6 port SFP+. I?m using 
> v2.2.0 (I think?  Whatever the version is that is retrieved from git when I 
> build MoonGen), Debian 8.4.
> 
> Sorry for sounding dumb.  I?m not a programmer in the least :(
> 
> Thanks in advance!



[dpdk-users] Link status?

2016-05-25 Thread Jason Lixfeld
Hi,

I?m messing around with MoonGen and trying to simplify some basic diagnostics 
before calling whatever MoonGen script I wanted to call.  Right now, I?m trying 
to find a way to report back the status of a link to see if it?s up so that I 
know whether or not it can be used as a tx or rx interface for whatever MoonGen 
script I want to run.

Is there an easy way to do that with an existing dpdk application, or does one 
need to be an super uber programmer type (which I am not anywhere close to 
being :)) and write some application to be able to do that?

Not sure if it matters, but I?m using an Intel 82599 6 port SFP+. I?m using 
v2.2.0 (I think?  Whatever the version is that is retrieved from git when I 
build MoonGen), Debian 8.4.

Sorry for sounding dumb.  I?m not a programmer in the least :(

Thanks in advance!


[dpdk-users] Link Status App

2016-04-27 Thread Gadre Nayan
Dear All,

I have started with DPDK library. I have some terminology related questions.

1. What are "lcores":
   My system has 2 sockets and 6 cores per socket. Are these internal
cores --> lcores?
   So then my system will have 12 lcores?

2. I am trying to work on the Link status change application.

I am confused with the terminology, having not much experience, So
here is the confusion.

I have the compiled application: link_status.

./link_status -c f -n 4-- -q 8 -p 0x0f

Here I am setting the portmask as 0x0F as I am going to use 4 ports.
Next -q NQ: A number of queues (=ports) per lcore (default is 1)

So I donot get the ( number of queues = ports ) statement here.

Network cards have RX and TX queues, I have a card which has 7 RX and
TX queues. Also my NIC has 4 ports. So each port will have 7 RX and TX
queues.

So how is this statement (number of queues = ports) per lcore (default
is 1) valid. What should be the argument in my case.

Please explain.

Thanks
GNA


[dpdk-users] Link Status App

2016-04-27 Thread De Lara Guarch, Pablo
Hi GNA,

> -Original Message-
> From: users [mailto:users-bounces at dpdk.org] On Behalf Of Gadre Nayan
> Sent: Wednesday, April 27, 2016 3:08 PM
> To: users at dpdk.org
> Subject: [dpdk-users] Link Status App
> 
> Dear All,
> 
> I have started with DPDK library. I have some terminology related questions.
> 
> 1. What are "lcores":
>My system has 2 sockets and 6 cores per socket. Are these internal
> cores --> lcores?
>So then my system will have 12 lcores?

If your system has Hyperthreading (considering it is Intel), your CPU will have 
two logical cores per physical core
(so you can run two threads simultaneously per physical core).
In your case, you have logical 24 cores (2 sockets x 6 cores/socket x 2 logical 
cores/physical core).

> 
> 2. I am trying to work on the Link status change application.
> 
> I am confused with the terminology, having not much experience, So
> here is the confusion.
> 
> I have the compiled application: link_status.
> 
> ./link_status -c f -n 4-- -q 8 -p 0x0f
> 
> Here I am setting the portmask as 0x0F as I am going to use 4 ports.
> Next -q NQ: A number of queues (=ports) per lcore (default is 1)

As stated in the help, "q" parameter sets the number of queues that will be 
handled by a single core.
So, if using -q 1 with 4 ports, you will need 4 cores. If you want to use only 
1 core, then you should use -q 4.


[dpdk-users] Link Status and Interrupts in 2.2.0

2016-04-27 Thread Thomas Monjalon
2016-04-25 11:49, martin_curran-gray at keysight.com:
> But if the link was "active" when dpdk and my app starts up,
> then no interrupt is generated, which then means that global
> structure is not filled in

You are describing the case of interrupts enabled but never called.
It has been fixed in DPDK 2.0:
http://dpdk.org/commit/99610782

But a race condition has been seen if interrupt fires during
rte_eth_dev_start() call. The decision was to remove link update if
interrupt is enabled (DPDK 2.2):
http://dpdk.org/commit/d5790b03
This "fix" was a bit strange:
- Is it possible to fix the race condition with link_update in the drivers?
- Is it possible to update the link status in dev_start of each driver
without race condition with the interrupt?
- Why calling link_update() from rte_eth_dev_start() in the polling case?

> I saw a submission to the patchwork 7160, dated Sep 24 2015
> but it was marked as not applicable , archived.

It has been re-submitted and applied (hence the problem):
http://dpdk.org/patch/8112


[dpdk-users] Link Status and Interrupts in 2.2.0

2016-04-26 Thread martin_curran-g...@keysight.com
 > Your application needs to make one call to check for current link state 
 > after device is started. After that all updates can be done from the LSC 
 > interrupt callback.

I made a call from the application, it just keeps getting 0s?

If I change the lsc value to 0, then the call gets the correct value, since 
it's asking the card, not the global value the callback fills in 

I seem to be able to register a handler for the interrupt which gets called, 
even if lsc is 0?

Then I can call that once at startup, then use the callback

Seems a little strange?

Thanks for your help Stephen H.

Martin Curran-Gray



[dpdk-users] Link Status and Interrupts in 2.2.0

2016-04-25 Thread Stephen Hemminger
On Mon, 25 Apr 2016 11:49:52 +
 wrote:

> Hello All,
> 
> Been adding in support for the interrupt handler for the link status for 
> ports on an X710 card.
> 
> Before I changed the lsc field of the intr_conf to 1, I was able to see the 
> link status information correctly.
> 
> The documentation does say that if interrupts are enabled, the 
> rte_eth_link_get function recovers the information from a structure that the 
> interrupt host thread fills in, rather than going to the card it's self.
> 
> This seems reasonable, howeveronce you've had an interrupt then all is 
> good,
> 
> But if the link was "active" when dpdk and my app starts up, then no 
> interrupt is generated, which then means that global structure is not filled 
> in, so I see
> 
> get link status
> status is 0  speed is 0 duplex is 0
> 
> if I turn the lasers on and off on my source I get the expected values, since 
> the interrupt event causes the global data to be populated.
> 
> get link status
> status is 1  speed is 1 duplex is 2
> 
> So the question is, how do I use the LSC interrupts via the 
> "rte_eth_dev_callback_register" function,
> but get the correct values in the link status information if no interrupts 
> occur?
> 
> I saw a submission to the patchwork 7160, dated Sep 24 2015 but it was marked 
> as not applicable , archived.
> 
> Many Thanks
> 
> 
> Martin
> 
> R&D Engineer
> Keysight Technologies UK Ltd

Your application needs to make one call to check for current link state after
device is started. After that all updates can be done from the LSC interrupt 
callback.


[dpdk-users] Link Status and Interrupts in 2.2.0

2016-04-25 Thread martin_curran-g...@keysight.com
Hello All,

Been adding in support for the interrupt handler for the link status for ports 
on an X710 card.

Before I changed the lsc field of the intr_conf to 1, I was able to see the 
link status information correctly.

The documentation does say that if interrupts are enabled, the rte_eth_link_get 
function recovers the information from a structure that the interrupt host 
thread fills in, rather than going to the card it's self.

This seems reasonable, howeveronce you've had an interrupt then all is good,

But if the link was "active" when dpdk and my app starts up, then no interrupt 
is generated, which then means that global structure is not filled in, so I see

get link status
status is 0  speed is 0 duplex is 0

if I turn the lasers on and off on my source I get the expected values, since 
the interrupt event causes the global data to be populated.

get link status
status is 1  speed is 1 duplex is 2

So the question is, how do I use the LSC interrupts via the 
"rte_eth_dev_callback_register" function,
but get the correct values in the link status information if no interrupts 
occur?

I saw a submission to the patchwork 7160, dated Sep 24 2015 but it was marked 
as not applicable , archived.

Many Thanks


Martin

R&D Engineer
Keysight Technologies UK Ltd