On Mon, Sep 15, 2014 at 2:44 AM, ychen <[email protected]> wrote: > Hi: > The first problem has solved. The main problem is that, ovs kernel use > version 1.11.0, and ovs user space use 2.1.2, so they are not match. > when i switched to version 1.11.0, dpctl works correctly. > > but the second question still puzzles me. what's the correct format of > ovs-dpctl add-flow?
I usually do a 'ovs-dpctl -m dump-flows' on a working system with same kernel module version, pick a flow, edit it and add it back. > > > > > > > At 2014-09-11 03:17:47, "ychen" <[email protected]> wrote: > > Hi, > I have met 2 questions about flows installed in kernel. > 1. when I use ovs-ofctl add 2 flows in the userspace, then send packet, > function handle_upcalls() and dpif_linux_operate__()/DPIF_OP_FLOW_PUT and > nl_sock_transact_multiple() were called, and return with no error > but then I use command "ovs-dpctl dump-flows", there is noting > output. The second time I send the the packet, and it was handled by > userspace but no in kernel. > I have no idea what's wrong? anything seems ok, but why kernel can not > create the flows? > Here is the topo:(very simple) > ovs-vsctl add-br br0 > ovs-vsctl add-port br0 p0 -- set interface p0 type=internal -- set port > p0 tag=100 > ovs-vsctl add-port br0 p1 - set interface p1 type=internal -- set port > p1 tag=100 > > ip netns add ns0 > ip netns add ns1 > ip link set p0 netns ns0 > ip netns exec ns0 ip link set dev p0 up > ip netns exec ns0 ip addr add 192.168.1.100/24 dev p0 > ip link set p1 netns ns1 > ip netns exec ns1 ip link set dev p1 up > ip netns exec ns1 ip addr add 192.168.1.200/24 dev p1 > > #port p0=1, port p1=2 > ovs-ofctl add-flow br0 "in_port=1,actions=2" > ovs-ofctl add-flow br0 "in_port=2,actions=1" > > then use ip netns exec ns0 ping 192.168.1.200 > the ovs version is 2.1.2 > > 2. what's the format of ovs-dpctl? > [root@l3vpn2 bin]# ovs-dpctl add-flow system@ovs-system "in_port(1)" "2" > 2014-09-11T15:21:28Z|00001|dpif|WARN|system@ovs-system: failed to > put[create] (Invalid argument) in_port(1), actions:2 > ovs-dpctl: updating flow table (Invalid argument) > I have debuged this command, system has already execute the function > dpif_linux_flow_put(), but error 22 return > so what's the correct format of FLOW and ACTION for dpctl? > > another problem, in function dpctl_put_flow(): > const char *key_s = argv[argc - 2]; > const char *actions_s = argv[argc - 1]; > so if we omit the DP in the dpctl command, the key and action will be > wrongly retrieved > > > > > > > _______________________________________________ > discuss mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/discuss > _______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
