Re: [**EXTERNAL**] Re: [vpp-dev] tx-drops with vhost-user interface

2018-08-30 Thread steven luong via Lists.Fd.Io
Chandra,

Would you mind sharing what you found? You’ve piqued my curiosity.

Steven

From: "Chandra Mohan, Vijay Mohan" 
Date: Thursday, August 30, 2018 at 10:18 AM
To: "Yichen Wang (yicwang)" , "Steven Luong (sluong)" 
, "vpp-dev@lists.fd.io" 
Subject: Re: [**EXTERNAL**] Re: [vpp-dev] tx-drops with vhost-user interface

This was my test setup issue which is resolved now able to pass traffic. Thanks 
for all the inputs.

-Vijay


From: "Chandra Mohan, Vijay Mohan" 
Date: Tuesday, August 7, 2018 at 10:01 AM
To: "Yichen Wang (yicwang)" , "Steven Luong (sluong)" 
, "vpp-dev@lists.fd.io" 
Subject: Re: [**EXTERNAL**] Re: [vpp-dev] tx-drops with vhost-user interface

Hi Yichen,

It’s a good question. First thing I checked was if the interface is ‘up’ in VM 
and its up.

Steven,
Thanks for responding back quickly. I am trying to reproduce this issue without 
any changes from my side, just to isolate the issue. Will update the thread 
soon.

-Vijay

From: "Yichen Wang (yicwang)" 
Date: Monday, August 6, 2018 at 2:17 PM
To: "Steven Luong (sluong)" , "Chandra Mohan, Vijay Mohan" 
, "vpp-dev@lists.fd.io" 
Subject: [**EXTERNAL**] Re: [vpp-dev] tx-drops with vhost-user interface

Hi, Vijay,

Sorry to ask dumb question, can you make sure the interface in your VM (either 
Linux Kernel or DPDK) is “UP”?

Regards,
Yichen

From:  on behalf of "steven luong via Lists.Fd.Io" 

Reply-To: "Steven Luong (sluong)" 
Date: Monday, August 6, 2018 at 12:10 PM
To: "Chandra Mohan, Vijay Mohan" , "vpp-dev@lists.fd.io" 

Cc: "vpp-dev@lists.fd.io" 
Subject: Re: [vpp-dev] tx-drops with vhost-user interface

Vijay,

From the show output, I can’t really tell what your problem is. If you could 
provide additional information about your environment, I could try setting it 
up and see what’s wrong. Things I need from you are exact VPP version, VPP 
configuration, qemu startup command line or the XML startup file if you use 
virsh, and the version of the VM distro.

Steven

From:  on behalf of "Chandra Mohan, Vijay Mohan" 

Date: Monday, August 6, 2018 at 10:31 AM
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] tx-drops with vhost-user interface

Hi,

I am trying to pass traffic with vhost-user interface and seeing tx-drops on 
virtual interface. Here is the setup: created a bridge domain with a physical 
interface and a vhost-user interface. Physical interface GigabitEthernet5/0/0 
is connected to traffic generator. As shown below, observing drops on  
VirtualEthernet0/0/0 .

Following is the config and vhost-user commands o/p:

DBGvpp# show bridge-domain 1 detail
  BD-ID   Index   BSN  Age(min)  Learning  U-Forwrd  UU-Flood  Flooding  
ARP-Term  BVI-Intf
1   1  0 offonononon   off  
 N/A

   Interface   If-idx ISN  SHG  BVI  TxFlood
VLAN-Tag-Rewrite
 GigabitEthernet5/0/03 10-  * none
 GigabitEthernet5/0/14 10-  * none
 VirtualEthernet0/0/05 10-  * none

Virtual interface is operationally up. Connected to virtual interface server in 
VM.

DBGvpp# show hardware-interfaces VirtualEthernet0/0/0
  NameIdx   Link  Hardware
VirtualEthernet0/0/0   5 up   VirtualEthernet0/0/0
  Ethernet address 02:fe:98:19:c2:6b

DBGvpp# show interface VirtualEthernet0/0/0

  Name   Idx   State  Counter  Count

VirtualEthernet0/0/0  5 up   tx packets 
1

 tx bytes   
   60

 drops  
1





DBGvpp# show errors

   CountNode  Reason

 3l2-output   L2 output packets

 2l2-learnL2 learn packets

 2l2-learnL2 learn misses

 2l2-inputL2 input packets

 3l2-floodL2 flood packets

 1 VirtualEthernet0/0/0-txtx packet drops (no available 
descriptors)


DBGvpp# show vhost-user VirtualEthernet0/0/0
Virtio vhost-user interfaces
Global:
  coalesce frames 32 time 1e-3
  number of rx virtqueues in interrupt mode: 0
Interface: VirtualEthernet0/0/0 (ifindex 5)
virtio_net_hdr_sz 12
features mask (0x):
 features (0x150208000):
   VIRTIO_NET_F_MRG_RXBUF (15)
   VIRTIO_NET_F_GUEST_ANNOUNCE (21)
   VIRTIO_F_INDIRECT_DESC (28)
   VHOST_USER_F_PROTOCOL_FEATURES (30)
   VIRTIO_F_VERSION_1 (32)
  protocol features (0x3)
   VHOST_USER_PROTOCOL_F_MQ (0)
   VHOST_USER_PROTOCOL_F_LOG_SHMFD (1)

socket filename /socket/vnet-0 type client errno "Success"

rx placement:
   thread 0 on vring 1, polling
tx placement: lock-free
   thread 0 on vring 0

Memory 

Re: [**EXTERNAL**] Re: [vpp-dev] tx-drops with vhost-user interface

2018-08-30 Thread Chandra Mohan, Vijay Mohan
This was my test setup issue which is resolved now able to pass traffic. Thanks 
for all the inputs.

-Vijay


From: "Chandra Mohan, Vijay Mohan" 
Date: Tuesday, August 7, 2018 at 10:01 AM
To: "Yichen Wang (yicwang)" , "Steven Luong (sluong)" 
, "vpp-dev@lists.fd.io" 
Subject: Re: [**EXTERNAL**] Re: [vpp-dev] tx-drops with vhost-user interface

Hi Yichen,

It’s a good question. First thing I checked was if the interface is ‘up’ in VM 
and its up.

Steven,
Thanks for responding back quickly. I am trying to reproduce this issue without 
any changes from my side, just to isolate the issue. Will update the thread 
soon.

-Vijay

From: "Yichen Wang (yicwang)" 
Date: Monday, August 6, 2018 at 2:17 PM
To: "Steven Luong (sluong)" , "Chandra Mohan, Vijay Mohan" 
, "vpp-dev@lists.fd.io" 
Subject: [**EXTERNAL**] Re: [vpp-dev] tx-drops with vhost-user interface

Hi, Vijay,

Sorry to ask dumb question, can you make sure the interface in your VM (either 
Linux Kernel or DPDK) is “UP”?

Regards,
Yichen

From:  on behalf of "steven luong via Lists.Fd.Io" 

Reply-To: "Steven Luong (sluong)" 
Date: Monday, August 6, 2018 at 12:10 PM
To: "Chandra Mohan, Vijay Mohan" , "vpp-dev@lists.fd.io" 

Cc: "vpp-dev@lists.fd.io" 
Subject: Re: [vpp-dev] tx-drops with vhost-user interface

Vijay,

From the show output, I can’t really tell what your problem is. If you could 
provide additional information about your environment, I could try setting it 
up and see what’s wrong. Things I need from you are exact VPP version, VPP 
configuration, qemu startup command line or the XML startup file if you use 
virsh, and the version of the VM distro.

Steven

From:  on behalf of "Chandra Mohan, Vijay Mohan" 

Date: Monday, August 6, 2018 at 10:31 AM
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] tx-drops with vhost-user interface

Hi,

I am trying to pass traffic with vhost-user interface and seeing tx-drops on 
virtual interface. Here is the setup: created a bridge domain with a physical 
interface and a vhost-user interface. Physical interface GigabitEthernet5/0/0 
is connected to traffic generator. As shown below, observing drops on  
VirtualEthernet0/0/0 .

Following is the config and vhost-user commands o/p:

DBGvpp# show bridge-domain 1 detail
  BD-ID   Index   BSN  Age(min)  Learning  U-Forwrd  UU-Flood  Flooding  
ARP-Term  BVI-Intf
1   1  0 offonononon   off  
 N/A

   Interface   If-idx ISN  SHG  BVI  TxFlood
VLAN-Tag-Rewrite
 GigabitEthernet5/0/03 10-  * none
 GigabitEthernet5/0/14 10-  * none
 VirtualEthernet0/0/05 10-  * none

Virtual interface is operationally up. Connected to virtual interface server in 
VM.

DBGvpp# show hardware-interfaces VirtualEthernet0/0/0
  NameIdx   Link  Hardware
VirtualEthernet0/0/0   5 up   VirtualEthernet0/0/0
  Ethernet address 02:fe:98:19:c2:6b

DBGvpp# show interface VirtualEthernet0/0/0

  Name   Idx   State  Counter  Count

VirtualEthernet0/0/0  5 up   tx packets 
1

 tx bytes   
   60

 drops  
1





DBGvpp# show errors

   CountNode  Reason

 3l2-output   L2 output packets

 2l2-learnL2 learn packets

 2l2-learnL2 learn misses

 2l2-inputL2 input packets

 3l2-floodL2 flood packets

 1 VirtualEthernet0/0/0-txtx packet drops (no available 
descriptors)


DBGvpp# show vhost-user VirtualEthernet0/0/0
Virtio vhost-user interfaces
Global:
  coalesce frames 32 time 1e-3
  number of rx virtqueues in interrupt mode: 0
Interface: VirtualEthernet0/0/0 (ifindex 5)
virtio_net_hdr_sz 12
features mask (0x):
 features (0x150208000):
   VIRTIO_NET_F_MRG_RXBUF (15)
   VIRTIO_NET_F_GUEST_ANNOUNCE (21)
   VIRTIO_F_INDIRECT_DESC (28)
   VHOST_USER_F_PROTOCOL_FEATURES (30)
   VIRTIO_F_VERSION_1 (32)
  protocol features (0x3)
   VHOST_USER_PROTOCOL_F_MQ (0)
   VHOST_USER_PROTOCOL_F_LOG_SHMFD (1)

socket filename /socket/vnet-0 type client errno "Success"

rx placement:
   thread 0 on vring 1, polling
tx placement: lock-free
   thread 0 on vring 0

Memory regions (total 3)
region fdguest_phys_addrmemory_sizeuserspace_addr 
mmap_offsetmmap_addr
== = == == == 
== ==
  0 500x0001 0x0001c000 0x7fe39360 
0xc000 

Re: [vpp-dev] DSCP support in VPP

2018-08-30 Thread Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES@Cisco) via Lists.Fd.Io
Hi Martin,

DSCP value is currently copied to outer IP header 
https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blob;f=src/vnet/ipsec/esp_encrypt.c;h=4291e946b3644f9d85a0998359799103d25a52f2;hb=HEAD#l253

Based on RFC4301 (section 4.1) DSCP is not traffic selector parameter of SPD 
entry/policy and should be part of SAD entry (section 4.4.2.1.).

Regards,
Matus
 


-Original Message-
From: vpp-dev@lists.fd.io  On Behalf Of Martin Šunal
Sent: Thursday, August 30, 2018 12:54 PM
To: Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at Cisco) 
; vpp-dev@lists.fd.io
Cc: G Wieser 
Subject: Re: [vpp-dev] DSCP support in VPP

Hi Klement,

thank you for answer, I am happy to hear it's not difficult.

The use case is to:
- set DSCP based on some criteria (5-tuple, vlan, etc.)
- copy DSCP to outer header
- forward to IPSec tunnel based on DSCP value. DSCP value may be combined with 
other criteria (like 5-tuple) or may be used alone.

There is another interesting functionality ABF (ACL Based Forwarding) [1].
Would be possible to use ABF for forwarding to IPSec tunnels?
That brings me to another question - how it would behave if ABF and SPD were 
attached to the same input interface?

[1] https://wiki.fd.io/view/VPP/ABF

Thank you,
Martin

-Original Message-
From: Klement Sekera 
Sent: Thursday, August 30, 2018 12:06 PM
To: Martin Šuňal ; vpp-dev@lists.fd.io
Cc: G Wieser 
Subject: Re: [vpp-dev] DSCP support in VPP

Hi Martin,

Can you describe your use case?

You're looking at the correct place regarding the matching criteria.
Adding the DSCP as additional criteria is not hard. Apart from API functions, 
definition and CLI funtions, it just needs to be added to a couple of 
comparison functions.

Similarly, adding these new actions (as extensions of 'protect'
action), shouldn't be too hard.

Thanks,
Klement

On Mon, 2018-08-27 at 10:48 +, Martin Šuňal wrote:
> Hello VPP devs,
> 
> I am looking at IPSec in VPP and I found it should be possible to 
> match and forward traffic to tunnels based on 5-tuple by SPD entry [1] 
> What I am trying to understand is how difficult is to include DSCP to 
> the SPD entry as additional matching criteria.
> Would be also possible to extend SPD actions with something like "set 
> DSCP" and "copy DSCP to outer-header"?
> Is SPD entry good place for that?
> It looks like DSCP is supported in DPDK [2] but I did not find any 
> reference in VPP.
> 
> 
> [1] https://wiki.fd.io/view/VPP/IPSec_and_IKEv2#SPD_entry_creation
> [2] https://doc.dpdk.org/guides/prog_guide/traffic_management.html?hi
> ghlight=dscp#packet-marking
> 
> Thank you for your help,
> Martin Šuňal
> Technical leader
> Frinx s.r.o.
> Mlynské Nivy 48 / 821 09 Bratislava / Slovakia
> +421 2 20 91 01 41 / msu...@frinx.io / www.fr
> inx.io;
> [cid:image002.png@01D24FBB.70342570]
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10295): https://lists.fd.io/g/vpp-dev/message/102
> 95
> Mute This Topic: https://lists.fd.io/mt/24972491/675704
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [ksek...@cisco.com]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10334): https://lists.fd.io/g/vpp-dev/message/10334
Mute This Topic: https://lists.fd.io/mt/24972491/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] DSCP support in VPP

2018-08-30 Thread Klement Sekera via Lists.Fd.Io
Hi Martin,

Can you describe your use case?

You're looking at the correct place regarding the matching criteria.
Adding the DSCP as additional criteria is not hard. Apart from API
functions, definition and CLI funtions, it just needs to be added to a
couple of comparison functions.

Similarly, adding these new actions (as extensions of 'protect'
action), shouldn't be too hard.

Thanks,
Klement

On Mon, 2018-08-27 at 10:48 +, Martin Šuňal wrote:
> Hello VPP devs,
> 
> I am looking at IPSec in VPP and I found it should be possible to
> match and forward traffic to tunnels based on 5-tuple by SPD entry
> [1]
> What I am trying to understand is how difficult is to include DSCP to
> the SPD entry as additional matching criteria.
> Would be also possible to extend SPD actions with something like "set
> DSCP" and "copy DSCP to outer-header"?
> Is SPD entry good place for that?
> It looks like DSCP is supported in DPDK [2] but I did not find any
> reference in VPP.
> 
> 
> [1] https://wiki.fd.io/view/VPP/IPSec_and_IKEv2#SPD_entry_creation
> [2] https://doc.dpdk.org/guides/prog_guide/traffic_management.html?hi
> ghlight=dscp#packet-marking
> 
> Thank you for your help,
> Martin Šuňal
> Technical leader
> Frinx s.r.o.
> Mlynské Nivy 48 / 821 09 Bratislava / Slovakia
> +421 2 20 91 01 41 / msu...@frinx.io / www.fr
> inx.io;
> [cid:image002.png@01D24FBB.70342570]
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> 
> View/Reply Online (#10295): https://lists.fd.io/g/vpp-dev/message/102
> 95
> Mute This Topic: https://lists.fd.io/mt/24972491/675704
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [ksek...@cisco.com]
> -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10332): https://lists.fd.io/g/vpp-dev/message/10332
Mute This Topic: https://lists.fd.io/mt/24972491/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-