Re: [ovs-discuss] Linking of OFPROTO and NETDEV libraries to OVS

2018-01-22 Thread Ben Pfaff
On Mon, Jan 22, 2018 at 07:06:59AM +0530, Aravind Prasad wrote:
> Hi Ben,
> 
> > I don't understand the question.  These are always linked together.
> 
> I want to write a new ofproto provider and netdev provider and have them as
> dynamic libraries. The requirement is to have the implementation of the
> provider Apis  contained in a separate dynamic library and not modify ovs
> code base by adding private patches to register providers.
> Hence, with this, I can download the OVS-Package, replace the dynamic
> library for registering providers and start using OVS without touching the
> OVS code base.
> 
> Is the above possible today? Thanks for the response and support.

OVS doesn't support that.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Q: Using netfilter to classify packets in OVS ?

2018-01-22 Thread Jean Tourrilhes
On Sun, Jan 21, 2018 at 05:52:50PM +0330, sougol gheissi wrote:
> Hello Jean,
> Can you describe a little how you could implement that?
> How you made netfilter ran on the packets before OVS? I have tried
> netfilter, ebtales in both mode pre-routing and pos-routing, but got
> nothing.
> Thanks in advance.

It work for me because I have a two stage process where
I first do routing, then I do OVS. It goes like :
eth0 -> routing -> br0 -> OVS -> VxLAN -> eth1

Some config :

echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
./ovs-vsctl add-br br52
ifconfig br52 10.1.1.2 netmask 255.255.255.0
./ovs-vsctl add-port br52 vx1 -- set interface vx1 type=vxlan 
options:remote_ip=10.0.0.2 options:key=flow
./ovs-ofctl add-flow tcp:127.0.0.1:6634 
"priority=32771,idle_timeout=0,in_port=local,pkt_mark=2,ip,ip_dst=10.10.10.0/255.255.255.0,action=set_field:0->tun_id,output:1"
ip route add 10.10.10.0/24 via 10.1.1.2
ip -6 route add fd00:10::/64 dev br52 via fd00:1:1::2
iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-option XX -j MARK 
--set-mark 2
ip6tables -t mangle -A PREROUTING -p tcp -m tcp --tcp-option XX -j MARK 
--set-mark 2

Good luck...

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


Re: [ovs-discuss] vPort state

2018-01-22 Thread Ben Pfaff
On Thu, Jan 18, 2018 at 11:37:57AM +, Nitin Katiyar wrote:
> Can someone help in understanding the reason for not allowing the
> vport state to DOWN.  Presently, if we try to bring down tunnel ports
> (or vPorts) using "ovs-ofctl mod-port" command then OVS rejects it as
> "not supported".

I think it just isn't implemented.  I don't know a reason we wouldn't
accept an implementation.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Lost in translation! OFP to DPDK datapath OVS actions?

2018-01-22 Thread Ben Pfaff
Actions that just set fields don't emit ODP actions to do that
immediately because controllers often change fields multiple times
between outputs, so that it would be wasteful to emit the changes
multiple times.  Instead, at the time of emitting an output (or other
visible side effect), OVS emits all changes to fields in one group.

On Sat, Jan 13, 2018 at 09:11:50AM +0100, Alan Kayahan wrote:
> Indeed. My custom action works when I put nl_msg_put_flag(ctx->odp_actions,
> OVS_ACTION_ATTR_MY_ACTION); however none of the other cases follow this
> pattern. They all set flow->xxx from the struct casted ofpact instead.
> Since both setting ctx->odp_actions and flow->xxx works, I have the
> following questions
> 
> 1) Where do the actions defined in ctx->odp_actions get actuated?
> 2) Where do the actions for the struct flow get actuated, and how does the
> actuator know what OVS actions to actuate?
> 3) Can we say that do_xlate_actions() is currently being used outside the
> purpose that its name implies, because all it does is to set the fields of
> the struct flow to those set in ofpact struct?
> 
> Thanks
> 
> 2018-01-12 18:36 GMT+01:00 Ben Pfaff :
> 
> > On Fri, Jan 12, 2018 at 11:39:44AM +0100, Alan Kayahan wrote:
> > > Hello,
> > >
> > > Per my understanding from /ovs-discuss/2015-May/037313.html,
> > > ofproto-dpif-xlate translates OFP actions into Netlink format, which is
> > > useful for datapath actions implemented in the kernel module. Does that
> > > hold for OFP to DPDK datapath actions too?
> >
> > Yes.
> >
> > > I couldn't find a connection from ofproto-dpif-xlate to
> > > odp_execute_actions. Where does the translation of ofpact structs into
> > > OVS actions implemented in DPDK datapath take place?
> >
> > ofproto-dpif-xlate does the translation for both datapaths, in the same
> > way.
> >
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] ONIE installer for OVS

2018-01-22 Thread Shivaram Mysore
Hi,
Is there a ONIE installer for OVS?

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


Re: [ovs-discuss] Windows test: 1077. ofproto-dpif.at:1663: testing ofproto-dpif - controller action without megaflows

2018-01-22 Thread Ben Pfaff
Certainly these are odd results showing that on Windows an extra packet
passes through the rate limiter.  Do you have any leads on a possible
solution?  Does timing work somehow different on Windows?

On Sun, Jan 14, 2018 at 05:11:00PM +, Alin Serdean wrote:
> ofproto-dpif
> 
> 1077. ofproto-dpif.at:1663: testing ofproto-dpif - controller action without 
> megaflows ...
> ./ofproto-dpif.at:1664: ovsdb-tool create conf.db 
> $abs_top_srcdir/vswitchd/vswitch.ovsschema
> ./ofproto-dpif.at:1664: ovsdb-server --detach --no-chdir --pidfile --log-file 
> --remote=punix:$OVS_RUNDIR/db.sock
> stderr:
> ./ofproto-dpif.at:1664: sed < stderr '
> /vlog|INFO|opened log file/d
> /ovsdb_server|INFO|ovsdb-server (Open vSwitch)/d'
> ./ofproto-dpif.at:1664: ovs-vsctl --no-wait init
> ./ofproto-dpif.at:1664: ovs-vswitchd --enable-dummy --disable-system  
> --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl
> stderr:
> ./ofproto-dpif.at:1664: sed < stderr '
> /ovs_numa|INFO|Discovered /d
> /vlog|INFO|opened log file/d
> /vswitchd|INFO|ovs-vswitchd (Open vSwitch)/d
> /reconnect|INFO|/d
> /ofproto|INFO|using datapath ID/d
> /netdev_linux|INFO|.*device has unknown hardware address family/d
> /ofproto|INFO|datapath ID changed to fedcba9876543210/d
> /dpdk|INFO|DPDK Disabled - Use other_config:dpdk-init to enable/d
> /netdev: Flow API/d
> /tc: Using policy/d'
> ./ofproto-dpif.at:1664: add_of_br 0
> ovs-vsctl -- add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1
> ./ofproto-dpif.at:1667: ovs-ofctl add-flow br0 in_port=1,action=controller
> ./ofproto-dpif.at:1668: ovs-appctl upcall/disable-megaflows
> ./ofproto-dpif.at:1673: ovs-ofctl monitor br0 65534 invalid_ttl -P 
> nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log
> ./ofproto-dpif.at:1676: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
> ./ofproto-dpif.at:1676: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
> ./ofproto-dpif.at:1682: ovs-appctl dpctl/dump-flows | sed 
> 's/.*\(packets:\)/\1/' | sed 's/used:[0-9].[0-9]*s/used:0.001s/'
> ./ofproto-dpif.at:1687: cat ofctl_monitor.log
> ./ofproto-dpif.at:1694: ovs-appctl revalidator/purge
> ./ofproto-dpif.at:1695: ovs-ofctl monitor br0 65534 invalid_ttl -P 
> nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log
> ./ofproto-dpif.at:1698: ovs-ofctl -O OpenFlow13 add-meter br0 
> 'meter=controller pktps stats bands=type=drop rate=2'
> ./ofproto-dpif.at:1701: ovs-appctl time/warp 1000
> stdout:
> warped
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1704: ovs-appctl netdev-dummy/receive p1 
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x4321)'
> ./ofproto-dpif.at:1707: ovs-appctl dpctl/dump-flows | sed 
> 's/.*\(packets:\)/\1/' | sed 's/used:[0-9].[0-9]*s/used:0.001s/'
> ./ofproto-dpif.at:1712: ovs-appctl time/warp 1
> stdout:
> warped
> ./ofproto-dpif.at:1717: cat ofctl_monitor.log
> --- -   2018-01-14 19:07:32 +0200
> +++ /c/_2018/january/14/ovs/tests/testsuite.dir/at-groups/1077/stdout   
> 2018-01-14 19:07:33 +0200
> @@ -2,4 +2,6 @@
>  
> vlan_tci=0x,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x4321
>  NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via action) 
> data_len=14 (unbuffered)
>  
> vlan_tci=0x,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x4321
> +NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via action) 
> data_len=14 (unbuffered)
> +vlan_tci=0x,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x4321
> ___
> 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] OVS delete port by itself

2018-01-22 Thread netsurfed
Hi all,


When I created a virtual machine using libvirt, with virtualport type was 
openvswitch, and virtual machine creation failed. The Domain XML file the 
 section like this:


I looked at the system log and it looked like an ovs port problem.


And the ovs-vswitchd.log was:


Is there any reason for this problem? Thank you very much.
Below some information about my machine:
ovs_version: "2.8.90"
root@ubuntu-24:~# uname -a
Linux ubuntu-24 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux


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


Re: [ovs-discuss] Linking of OFPROTO and NETDEV libraries to OVS

2018-01-22 Thread Aravind Prasad
Hi Ben,

> OVS doesn't support that.

Thanks a lot for the quick response and support.

Thanks,
Aravind Prasad S

On Mon, Jan 22, 2018 at 10:02 PM, Ben Pfaff  wrote:

> On Mon, Jan 22, 2018 at 07:06:59AM +0530, Aravind Prasad wrote:
> > Hi Ben,
> >
> > > I don't understand the question.  These are always linked together.
> >
> > I want to write a new ofproto provider and netdev provider and have them
> as
> > dynamic libraries. The requirement is to have the implementation of the
> > provider Apis  contained in a separate dynamic library and not modify ovs
> > code base by adding private patches to register providers.
> > Hence, with this, I can download the OVS-Package, replace the dynamic
> > library for registering providers and start using OVS without touching
> the
> > OVS code base.
> >
> > Is the above possible today? Thanks for the response and support.
>
> OVS doesn't support that.
>
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss