Re: [ovs-discuss] OFPFC_DELETE and OFPFC_DELETE_STRICT commands don't delete openflow rules

2021-07-14 Thread Ben Pfaff
On Wed, Jul 14, 2021 at 06:34:46PM +0200, Alejandro Llorens Carrodeguas wrote:
> We’re having trouble deleting OpenFlow rules using the OFPFC_DELETE or
> OFPFC_DELETE_STRICT commands that send a Ryu controller to the OVS switch.

Thanks for the report.

So far, you've just told us that these commands don't work for your
case.  I can assure you that they do work in the cases we know about.
So, we will need an example or a way to reproduce the problem.  The
easiest you make it for us, the easier it will be to understand the
problem you're seeing and either explain why your expectations are wrong
or to fix the problem.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] How to use masked_set_action?

2021-07-14 Thread Ben Pfaff
On Wed, Jul 14, 2021 at 08:51:44AM +0800, taoyunupt wrote:
> Hi,
>  I found some info from vswitch.xml,it says "Masked data can improve 
> performance by allowing megaflows to match on fewer fields."  
>  I do not know What kinds of flow atcion will use 'masked_set_action'.   
> Can you give some demo flows and situation? 

Anything that sets some fields in a header but not others.  For example,
setting the IP destination address (but not other IP fields) will use
it.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] [ovn/ovs] OVS hardware offloading

2021-07-14 Thread Ammad Syed
Hi,

I am using OVN with openstack neutron on ubuntu 20.04. I want to enable
hardware offloading on ovs. I have used below command to to enable offload.

ovs-vsctl set Open_vSwitch . other_config:hw-offload=true

By reviewing below URL.

https://www.openvswitch.org/support/ovscon2019/day2/0951-hw_offload_ovs_con_19-Oz-Mellanox.pdf

I just want to enable kernel offload using tc.

I am using Broadcom BCM57504 NetXtreme-E and below firmware and driver
details.

driver: bnxt_en
version: 1.10.0
firmware-version: 218.0.169.2/pkg 21.80.16.95
expansion-rom-version:
bus-info: :63:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: no
supports-priv-flags: no

I have checked with ethtool -k with on NIC, hw-tc-offload: on  is on.

When I have enabled offloading. I have started seeing below errors.

[ 1197.506839] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id
0x1282 error 0x2
[ 1197.507086] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow:
cookie=0x9fe730da8000 error=-22
[ 1197.516042] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id
0x127f error 0x2
[ 1197.525717] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow:
cookie=0x9fe730da8000 error=-22
[ 1227.522630] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id
0x12f7 error 0x2
[ 1227.531524] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22
[ 1227.540403] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id
0x12f4 error 0x2
[ 1227.548676] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22
[ 1257.563517] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id
0x136c error 0x2
[ 1257.572898] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22
[ 1257.583457] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id
0x1369 error 0x2
[ 1257.591647] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22

Please advise how to fix it.
-- 
Regards,

Ammad
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] [OVN] OVN NB "NAT" to accept CIDRs in logical_ip

2021-07-14 Thread Rodolfo Alonso Hernandez
Hello all:

First of all, a bit of context. This question/request is related to [1].
The problem we have in OpenStack is that we are trying to create a VIP but
not with a /32 IP address but with a CIDR.

Since [2][3], is it possible to define VIPs in Neutron using OVN by
creating an unassigned port. This port will provide the VIP. When this VIP
is set to a bound port as "allowed_address_pairs", we set the LSP port type
to "virtual".

In Neutron we can assign a CIDR to a port as an "allowed_address_pairs".
For example:
$ openstack port show port10 | grep allowed_address_pairs
allowed_address_pairs   | ip_address='1.2.3.0/24',
mac_address='fa:16:3e:7d:ca:e4'

The problem is that OVN, to set the virtual LSP chassis and thus create the
OpenFlow rules in the selected OVS, is expecting an ARP from the exact IP
address that matches with the VIP IP address. Any other IP address in the
CIDR '1.2.3.0/24' (following the example provided), won't trigger the rule
creation.

Is there any mechanism to provide support for a virtual CIDR instead of a
VIP? If not, are there any plans for this?

Thank you in advance.
Rodolfo Alonso (ralon...@redhat.com).

[1]https://bugzilla.redhat.com/show_bug.cgi?id=1970907
[2]
https://github.com/ovn-org/ovn/commit/054f4c85c413e20d893e10ba053ec52ac15db49c
[3]https://review.opendev.org/c/openstack/networking-ovn/+/676223
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] OFPFC_DELETE and OFPFC_DELETE_STRICT commands don't delete openflow rules

2021-07-14 Thread Alejandro Llorens Carrodeguas
Hello,



We’re having trouble deleting OpenFlow rules using the OFPFC_DELETE or
OFPFC_DELETE_STRICT commands that send a Ryu controller to the OVS switch.



What you did that make the problem appear:

The Ryu controller sends OFPFC_DELETE or OFPFC_DELETE_STRICT commands to the
OVS switch in order to delete a flow rule matching certain criteria (e.g.,
outport).



What you expected to happen:

The OVS switch receives the aforementioned command and deletes the flows
that match the criteria.



What actually happened:

The matching criteria flows still appear in the OpenFlow tables. Although, I
can see that apparently a flow was removed in the OVS database.



The Open vSwitch version number:

ovs-vswitchd (Open vSwitch) 2.15.90



The kernel version on which OVS is running:

Linux version 4.15.0-140-generic (buildd@lgw01-amd64-054) (gcc version 7.5.0
(Ubuntu 7.5.0-3ubuntu1~18.04))



The distribution and version number of my OS:

Ubuntu 18.04



The output of ovs-dptcl show:

system@ovs-system:

  lookups: hit:5768706 missed:17566 lost:0

  flows: 2

  masks: hit:5955901 total:1 hit/pkt:1.03

  port 0: ovs-system (internal)

  port 1: br2 (internal)

  port 2: ens4

  port 3: ens5

  port 4: ens6

  port 5: ens7



The output of ovs-ofctl show :

OFPT_FEATURES_REPLY (xid=0x2): dpid:faf67755c143

n_tables:254, n_buffers:0

capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP

actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src
mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst

1(ens4): addr:fa:16:3e:8c:53:97

 config: 0

 state:  0

 speed: 0 Mbps now, 0 Mbps max

2(ens5): addr:fa:16:3e:fd:c0:1a

 config: 0

 state:  0

 speed: 0 Mbps now, 0 Mbps max

3(ens6): addr:fa:16:3e:ba:d2:c0

 config: 0

 state:  0

 speed: 0 Mbps now, 0 Mbps max

4(ens7): addr:fa:16:3e:67:bd:96

 config: 0

 state:  0

 speed: 0 Mbps now, 0 Mbps max

LOCAL(br2): addr:fa:f6:77:55:c1:43

 config: 0

 state:  0

 speed: 0 Mbps now, 0 Mbps max

OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0



A workaround is to establish an SSH connection to the host where OVS is
running and execute ovs-ofctl del-flows  . An automatic
way to do it from the Ryu controller is using the Paramiko library to send
remotely the command.



We attach a screenshot where you can see the information in the OVS database
at the moment the controller sends OFPFC_DELETE or OFPFC_DELETE_STRICT
commands.



Thanks you very much in advance.



Kind regards,



Alejandro Llorens









--
El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
https://www.avast.com/antivirus
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] [ovn/ovs] OVS hardware offloading

2021-07-14 Thread Frode Nordahl
Hello Ammad,

On Wed, Jul 14, 2021 at 9:39 AM Ammad Syed  wrote:
> I am using OVN with openstack neutron on ubuntu 20.04. I want to enable 
> hardware offloading on ovs. I have used below command to to enable offload.
>
> ovs-vsctl set Open_vSwitch . other_config:hw-offload=true
>
> By reviewing below URL.
>
> https://www.openvswitch.org/support/ovscon2019/day2/0951-hw_offload_ovs_con_19-Oz-Mellanox.pdf
>
> I just want to enable kernel offload using tc.
>
> I am using Broadcom BCM57504 NetXtreme-E and below firmware and driver 
> details.
>
> driver: bnxt_en
> version: 1.10.0
> firmware-version: 218.0.169.2/pkg 21.80.16.95
> expansion-rom-version:
> bus-info: :63:00.0
> supports-statistics: yes
> supports-test: yes
> supports-eeprom-access: yes
> supports-register-dump: no
> supports-priv-flags: no

Which kernel version are you using, and which version of OVN?

> I have checked with ethtool -k with on NIC, hw-tc-offload: on  is on.
>
> When I have enabled offloading. I have started seeing below errors.
>
> [ 1197.506839] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id 
> 0x1282 error 0x2
> [ 1197.507086] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow: 
> cookie=0x9fe730da8000 error=-22
> [ 1197.516042] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id 
> 0x127f error 0x2
> [ 1197.525717] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow: 
> cookie=0x9fe730da8000 error=-22
> [ 1227.522630] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id 
> 0x12f7 error 0x2
> [ 1227.531524] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow: 
> cookie=0x9fe731a28800 error=-22
> [ 1227.540403] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id 
> 0x12f4 error 0x2
> [ 1227.548676] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow: 
> cookie=0x9fe731a28800 error=-22
> [ 1257.563517] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id 
> 0x136c error 0x2
> [ 1257.572898] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow: 
> cookie=0x9fe731a28800 error=-22
> [ 1257.583457] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id 
> 0x1369 error 0x2
> [ 1257.591647] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow: 
> cookie=0x9fe731a28800 error=-22
>
> Please advise how to fix it.

I have not had the pleasure of testing this specific NIC myself, but
from cursory view of kernel sources the message indicate that the
driver is attempting an HWRM_CFA_FLOW_ALLOC operation and is getting a
HWRM_ERR_CODE_INVALID_PARAMS error.

My hunch would be there are some flow attributes in use that the
driver/firmware does not support. If this is a 5.4 kernel it might be
conntrack, you could try to disable port security for all networks and
ports (make sure port-security is enabled in Neutron ML2 though,
otherwise you would not be able to disable it properly).

-- 
Frode Nordahl

>
> --
> Regards,
>
>
> Ammad
> ___
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] [ovn/ovs] OVS hardware offloading

2021-07-14 Thread Ammad Syed
Hi,

I am using OVN with openstack neutron on ubuntu 20.04. I want to enable
hardware offloading on ovs. I have used below command to to enable offload.

ovs-vsctl set Open_vSwitch . other_config:hw-offload=true

By reviewing below URL.

https://www.openvswitch.org/support/ovscon2019/day2/0951-hw_offload_ovs_con_19-Oz-Mellanox.pdf

I just want to enable kernel offload using tc.

I am using Broadcom BCM57504 NetXtreme-E and below firmware and driver
details.

driver: bnxt_en
version: 1.10.0
firmware-version: 218.0.169.2/pkg 21.80.16.95
expansion-rom-version:
bus-info: :63:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: no
supports-priv-flags: no

I have checked with ethtool -k with on NIC, hw-tc-offload: on  is on.

When I have enabled offloading. I have started seeing below errors.

[ 1197.506839] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id
0x1282 error 0x2
[ 1197.507086] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow:
cookie=0x9fe730da8000 error=-22
[ 1197.516042] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id
0x127f error 0x2
[ 1197.525717] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow:
cookie=0x9fe730da8000 error=-22
[ 1227.522630] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id
0x12f7 error 0x2
[ 1227.531524] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22
[ 1227.540403] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id
0x12f4 error 0x2
[ 1227.548676] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22
[ 1257.563517] bnxt_en :63:00.0 eth0-tor1: hwrm req_type 0x103 seq id
0x136c error 0x2
[ 1257.572898] bnxt_en :63:00.0 eth0-tor1: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22
[ 1257.583457] bnxt_en :63:00.1 eth0-tor2: hwrm req_type 0x103 seq id
0x1369 error 0x2
[ 1257.591647] bnxt_en :63:00.1 eth0-tor2: Error: bnxt_tc_add_flow:
cookie=0x9fe731a28800 error=-22

Please advise how to fix it.

-- 
Regards,


Ammad
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss