Re: [ovs-dev] Pravin Shelar
On Wed, 2017-12-27 at 10:25 -0800, Ben Pfaff wrote: > On Wed, Dec 27, 2017 at 04:22:55PM +0100, Julia Lawall wrote: > > The email address pshe...@nicira.com listed for Pravin Shelar in > > MAINTAINERS (OPENVSWITCH section) seems to bounce. > > Pravin has used a newer address recently, so I sent out a suggested > update (for OVS): > https://patchwork.ozlabs.org/patch/853232/ As Pravin is still active with acks but not any authored patches in the last year, this should still be updated in the linux-kernel's MAINTAINERS file too. --- diff --git a/MAINTAINERS b/MAINTAINERS index a6e86e20761e..5869e5f0b930 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10137,7 +10137,7 @@ F: drivers/irqchip/irq-ompic.c F: dri vers/irqchip/irq-or1k-* OPENVSWITCH -M: Pravin Shelar+M: Pravin Shelar L: netdev@vge r.kernel.org L: d...@openvswitch.org W: http://openvswitch.org ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH] gre: strip gre-tso offload flags
From: wenxuif the gro enable, ipgre receive a gre-tso package. After pop the gre-tunnel the encapsulation and GSO_ENCAP flags should be striped. or the packet encap again and will be dropped in ovs_iptunnel_handle_offloads Signed-off-by: wenxu --- datapath/linux/compat/ip_gre.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 03c5435..94fdaa9 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -140,6 +140,8 @@ static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi) __be64 tun_id; int err; + if (iptunnel_pull_offloads(skb)) + return PACKET_REJECT; skb_pop_mac_header(skb); flags = tpi->flags & (TUNNEL_CSUM | TUNNEL_KEY); -- 1.8.3.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [no-slow 1/6] ofproto-dpif: Add ability to look up an ofproto by UUID.
> On Dec 26, 2017, at 2:14 PM, Gregory Rosewrote: > > I'll continue to look into it. I looked at this patch more carefully, and I don't see where it would cause issues. It mostly renames a couple of things and adds a new function which isn't used in this patch. Of course it's certainly possible there's a bug, but it seems low risk. Any luck on your end? --Justin ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] which fields should be masked or unmasked while using megaflow match?
On Wed, Dec 27, 2017 at 07:48:30PM +0800, ychen wrote: > HI, is there any policy about which fields should be wildcard when using > megaflow match? ... > my question is why ETH_SRC, ETH_DST is needed when using normal action? eth_dst is needed to ensure that the packet gets forwarded to the right port. eth_src is needed to ensure that MAC learning happens for the packet's source address. > exp 3: > table=0,in_port=1,nw_src=1.1.1.0/24, actions=2 > table=0,in_port=2,nw_src=1.1.1.0/24, actions=1 > then the datapath flow is like that: > recirc_id(0),in_port(3),eth_type(0x0800),ipv4(src=1.1.1.0/255.255.255.0,frag=no), > packets:1863, bytes:182574, used:0.552s, actions:2 > recirc_id(0),in_port(2),eth_type(0x0800),ipv4(src=1.1.1.0/255.255.255.0,frag=no), > packets:1863, bytes:182574, used:0.552s, actions:3 > > > exp 4: > table=0,in_port=1,nw_src=1.1.1.0/24, actions=mod_nw_src:1.1.1.3, output:2 > table=0,in_port=2,actions=1 > > > then the datapath flow is like that: > recirc_id(0),in_port(3),eth_type(0x0800),ipv4(src=1.1.1.2,frag=no), > packets:37, bytes:3626, used:0.332s, actions:set(ipv4(src=1.1.1.3)),2 > recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:37, > bytes:3626, used:0.332s, actions:3 > > > my question is why NW_SRC=1.1.1.2 should be all masked with 0xff, why not > 0xff00 like the rule we created? There may be room for additional optimization here. OpenFlow 1.0 actions like mod_nw_src are special-cased, by the way. You can probably get better optimization by using "set_field" or "load". > in one word, is there any rules to set flow mask when using megaflow match? > which fields should be wildcard? why? > we can extract all fields from packets, and we can find the rule match the > packet, but why the datapath flow match fields is not the same as userspace > rule? You should read our NSDI 2015 paper, "The Design and Implementation of Open vSwitch", for information about megaflows. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH 4/4] ovsdb: ovsdb-dot.in: Replace sys.maxint with sys.maxsize for Python3
There is no sys.maxint anymore on python3. However, sys.maxsize can be used as an integer larger than any practical list or string index. Link: https://docs.python.org/3.1/whatsnew/3.0.html#integers Signed-off-by: Markos Chandras--- ovsdb/ovsdb-dot.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in index 43c50dabd..8eea61724 100755 --- a/ovsdb/ovsdb-dot.in +++ b/ovsdb/ovsdb-dot.in @@ -15,14 +15,14 @@ def printEdge(tableName, type, baseType, label): if type.n_min == 0: if type.n_max == 1: arity = "?" -elif type.n_max == sys.maxint: +elif type.n_max == sys.maxsize: arity = "*" else: arity = "{,%d}" % type.n_max elif type.n_min == 1: if type.n_max == 1: arity = "" -elif type.n_max == sys.maxint: +elif type.n_max == sys.maxsize: arity = "+" else: arity = "{1,%d}" % type.n_max -- 2.15.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH 3/4] ovsdb: ovsdb-dot.in: Change exception semantics for Python3
PEP-3110 changes the semantics for capturing exceptions in Python3 from 'except E,N' to 'except E as N'. This fixes the following problem when building with python3 SyntaxError: invalid syntax File "./ovsdb/ovsdb-dot.in", line 106 except ovs.db.error.Error, e: ^ SyntaxError: invalid syntax Link: https://www.python.org/dev/peps/pep-3110/ Signed-off-by: Markos Chandras--- ovsdb/ovsdb-dot.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in index 7f846836d..43c50dabd 100755 --- a/ovsdb/ovsdb-dot.in +++ b/ovsdb/ovsdb-dot.in @@ -81,7 +81,7 @@ if __name__ == "__main__": options, args = getopt.gnu_getopt(sys.argv[1:], 'hV', ['no-arrows', 'help', 'version',]) -except getopt.GetoptError, geo: +except getopt.GetoptError as geo: sys.stderr.write("%s: %s\n" % (argv0, geo.msg)) sys.exit(1) @@ -103,7 +103,7 @@ if __name__ == "__main__": schemaToDot(args[0], arrows) -except ovs.db.error.Error, e: +except ovs.db.error.Error as e: sys.stderr.write("%s: %s\n" % (argv0, e.msg)) sys.exit(1) -- 2.15.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH 2/4] ovsdb: ovsdb-dot.in: Use print function for Python3
The python2 print statement no longer works in python3 since the latter uses a print function. As such, replace all instances of 'print' with 'print()'. This fixes the following build problem with python3 > ovsdb/ovsdb-client.1.tmp File "./ovsdb/ovsdb-dot.in", line 34 print "\t%s -> %s [%s];" % ( ^ SyntaxError: invalid syntax Signed-off-by: Markos Chandras--- ovsdb/ovsdb-dot.in | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in index f7b7ab0db..7f846836d 100755 --- a/ovsdb/ovsdb-dot.in +++ b/ovsdb/ovsdb-dot.in @@ -31,38 +31,38 @@ def printEdge(tableName, type, baseType, label): options['label'] = '"%s%s"' % (label, arity) if baseType.ref_type == 'weak': options['style'] = 'dotted' -print "\t%s -> %s [%s];" % ( +print ("\t%s -> %s [%s];" % ( tableName, baseType.ref_table_name, -', '.join(['%s=%s' % (k,v) for k,v in options.items()])) +', '.join(['%s=%s' % (k,v) for k,v in options.items()]))) def schemaToDot(schemaFile, arrows): schema = ovs.db.schema.DbSchema.from_json(ovs.json.from_file(schemaFile)) -print "digraph %s {" % schema.name -print '\trankdir=LR;' -print '\tsize="6.5,4";' -print '\tmargin="0";' -print "\tnode [shape=box];" +print ("digraph %s {" % schema.name) +print ('\trankdir=LR;') +print ('\tsize="6.5,4";') +print ('\tmargin="0";') +print ("\tnode [shape=box];") if not arrows: -print "\tedge [dir=none, arrowhead=none, arrowtail=none];" +print ("\tedge [dir=none, arrowhead=none, arrowtail=none];") for tableName, table in schema.tables.items(): options = {} if table.is_root: options['style'] = 'bold' -print "\t%s [%s];" % ( +print ("\t%s [%s];" % ( tableName, -', '.join(['%s=%s' % (k,v) for k,v in options.items()])) +', '.join(['%s=%s' % (k,v) for k,v in options.items()]))) for columnName, column in table.columns.items(): if column.type.value: printEdge(tableName, column.type, column.type.key, "%s key" % columnName) printEdge(tableName, column.type, column.type.value, "%s value" % columnName) else: printEdge(tableName, column.type, column.type.key, columnName) -print "}"; +print ("}"); def usage(): -print """\ +print ("""\ %(argv0)s: compiles ovsdb schemas to graphviz format Prints a .dot file that "dot" can render to an entity-relationship diagram usage: %(argv0)s [OPTIONS] SCHEMA @@ -72,7 +72,7 @@ The following options are also available: --no-arrows omit arrows from diagram -h, --help display this help message -V, --version display version information\ -""" % {'argv0': argv0} +""" % {'argv0': argv0}) sys.exit(0) if __name__ == "__main__": @@ -92,7 +92,7 @@ if __name__ == "__main__": elif key in ['-h', '--help']: usage() elif key in ['-V', '--version']: -print "ovsdb-dot (Open vSwitch) @VERSION@" +print ("ovsdb-dot (Open vSwitch) @VERSION@") else: sys.exit(0) -- 2.15.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH 1/4] ovsdb: Use items() instead of iteritems() for Python3
Python3 removed the iteritems() iterator and replaced it with items() which should also work in Python2. This fixes the following build problem on Python3: Traceback (most recent call last): File "./ovsdb/ovsdb-idlc.in", line 1436, in func(*args[1:]) File "./ovsdb/ovsdb-idlc.in", line 314, in printCIDLHeader for columnName, column in sorted(table.columns.iteritems()): AttributeError: 'dict' object has no attribute 'iteritems' Signed-off-by: Markos Chandras--- ovsdb/ovsdb-dot.in | 4 ++-- ovsdb/ovsdb-idlc.in | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in index 134ce2269..f7b7ab0db 100755 --- a/ovsdb/ovsdb-dot.in +++ b/ovsdb/ovsdb-dot.in @@ -46,14 +46,14 @@ def schemaToDot(schemaFile, arrows): print "\tnode [shape=box];" if not arrows: print "\tedge [dir=none, arrowhead=none, arrowtail=none];" -for tableName, table in schema.tables.iteritems(): +for tableName, table in schema.tables.items(): options = {} if table.is_root: options['style'] = 'bold' print "\t%s [%s];" % ( tableName, ', '.join(['%s=%s' % (k,v) for k,v in options.items()])) -for columnName, column in table.columns.iteritems(): +for columnName, column in table.columns.items(): if column.type.value: printEdge(tableName, column.type, column.type.key, "%s key" % columnName) printEdge(tableName, column.type, column.type.value, "%s value" % columnName) diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in index 96420ca0b..2edb9ef54 100755 --- a/ovsdb/ovsdb-idlc.in +++ b/ovsdb/ovsdb-idlc.in @@ -311,7 +311,7 @@ bool %(s)s_is_updated(const struct %(s)s *, enum %(s)s_column_id); # Table indexes. print("struct %(s)s * %(s)s_index_init_row(struct ovsdb_idl *, const struct ovsdb_idl_table_class *);" % {'s': structName}) print -for columnName, column in sorted(table.columns.iteritems()): +for columnName, column in sorted(table.columns.items()): print('void %(s)s_index_set_%(c)s(const struct %(s)s *,' % {'s': structName, 'c': columnName}) if column.type.is_smap(): args = ['const struct smap *'] @@ -1065,7 +1065,7 @@ void struct %(s)s * %(s)s_index_init_row(struct ovsdb_idl *idl, const struct ovsdb_idl_table_class *class_) {""" % {'s': structName, 't': tableName}) -#for columnName, column in sorted(table.columns.iteritems()): +#for columnName, column in sorted(table.columns.items()): #if column.type.is_smap(): #print "smap_init(>%s);" % columnName print("return (struct %(s)s *) ovsdb_idl_index_init_row(idl, class_);" % {'s': structName, 't': tableName}) @@ -1132,7 +1132,7 @@ struct %(s)s * return %(s)s_cast(ovsdb_idl_index_data(CONST_CAST(struct ovsdb_idl_index_cursor *, cursor))); }""" % { 's' : structName }) # Indexes Set functions -for columnName, column in sorted(table.columns.iteritems()): +for columnName, column in sorted(table.columns.items()): type = column.type comment, members = cMembers(prefix, tableName, columnName, -- 2.15.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH 0/4] ovsdb-dot python3 fixes
Hello, This patchset fixes some python3 issues when running the ovsdb-dot tool with python3. Markos Chandras (4): ovsdb: Use items() instead of iteritems() for Python3 ovsdb: ovsdb-dot.in: Use print function for Python3 ovsdb: ovsdb-dot.in: Change exception semantics for Python3 ovsdb: ovsdb-dot.in: Replace sys.maxint with sys.maxsize for Python3 ovsdb/ovsdb-dot.in | 40 ovsdb/ovsdb-idlc.in | 6 +++--- 2 files changed, 23 insertions(+), 23 deletions(-) -- 2.15.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] Pravin Shelar
On Wed, Dec 27, 2017 at 04:22:55PM +0100, Julia Lawall wrote: > The email address pshe...@nicira.com listed for Pravin Shelar in > MAINTAINERS (OPENVSWITCH section) seems to bounce. Pravin has used a newer address recently, so I sent out a suggested update (for OVS): https://patchwork.ozlabs.org/patch/853232/ ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH 05/12] openvswitch: drop unneeded newline
OVS_NLERR prints a newline at the end of the message string, so the message string does not need to include a newline explicitly. Done using Coccinelle. Signed-off-by: Julia Lawall--- net/openvswitch/conntrack.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index b27c5c6..62f36cc9 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -1266,14 +1266,14 @@ static int parse_nat(const struct nlattr *attr, /* Do not allow flags if no type is given. */ if (info->range.flags) { OVS_NLERR(log, - "NAT flags may be given only when NAT range (SRC or DST) is also specified.\n" + "NAT flags may be given only when NAT range (SRC or DST) is also specified." ); return -EINVAL; } info->nat = OVS_CT_NAT; /* NAT existing connections. */ } else if (!info->commit) { OVS_NLERR(log, - "NAT attributes may be specified only when CT COMMIT flag is also specified.\n" + "NAT attributes may be specified only when CT COMMIT flag is also specified." ); return -EINVAL; } ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH] tests: Flunk OVN tests if populating ARP tables failed.
Hi Ben, On Tue, 26 Dec 2017 09:48:05 -0800 Ben Pfaffwrote: > On Thu, Dec 21, 2017 at 10:43:06AM +0100, Jakub Sitnicki wrote: > > If we cannot talk to ovs-vswitchd process for some reason, e.g. it has > > terminated prematurely, we want to fail the test as soon as possible. > > > > Otherwise the test will likely fail later on due to ARP tables not being > > populated, which will make the troubleshooting the failure harder. > > > > Signed-off-by: Jakub Sitnicki > > --- > > tests/ofproto-macros.at | 7 --- > > tests/ovn.at| 46 +++--- > > 2 files changed, 27 insertions(+), 26 deletions(-) > > > > diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at > > index 55a4e77..1fe0223 100644 > > --- a/tests/ofproto-macros.at > > +++ b/tests/ofproto-macros.at > > @@ -271,23 +271,24 @@ ovn_attach() { > > start_daemon ovn-controller || return 1 > > } > > > > -# ovn_populate_arp > > +# OVN_POPULATE_ARP > > # > > # This pre-populates the ARP tables of all of the OVN instances that have > > been > > # started with ovn_attach(). That means that packets sent from one > > hypervisor > > # to another never get dropped or delayed by ARP resolution, which makes > > # testing easier. > > -ovn_populate_arp() { > > +ovn_populate_arp__() { > > for e1 in $arp_table; do > > set `echo $e1 | sed 's/,/ /g'`; sb1=$1 br1=$2 ip=$3 mac=$4 > > for e2 in $arp_table; do > > set `echo $e2 | sed 's/,/ /g'`; sb2=$1 br2=$2 > > if test $sb1,$br1 != $sb2,$br2; then > > -as $sb2 ovs-appctl tnl/neigh/set $br2 $ip $mac > > +as $sb2 ovs-appctl tnl/neigh/set $br2 $ip $mac || return 1 > > fi > > done > > done > > } > > +m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0], > > [ignore])]) > > Seems like a good idea. > > However, why not just name the macro ovn_populate_arp, so that no > changes are needed outside ofproto-macros.at? I tried to follow here what seems to be a convention in tests, that m4 macro names are all upper case. Thanks, Jakub ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] which fields should be masked or unmasked while using megaflow match?
HI, is there any policy about which fields should be wildcard when using megaflow match? exp 1: table=0, priorIty=0,actions=NORMAL then the datapath flow is like that: recirc_id(0),in_port(3),eth(src=b6:49:dd:5d:3a:a6,dst=2e:b5:7b:d6:52:c2),eth_type(0x0806), packets:0, bytes:0, used:never, actions:2 recirc_id(0),in_port(2),eth(src=2e:b5:7b:d6:52:c2,dst=b6:49:dd:5d:3a:a6),eth_type(0x0800),ipv4(frag=no), packets:12, bytes:1176, used:0.825s, actions:3 exp 2: table=0,in_port=1,actions=2 table=0,in_port=2,actions=1 then the datapath flow is like that: recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:26, bytes:2548, used:0.441s, actions:3 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:26, bytes:2548, used:0.441s, actions:2 my question is why ETH_SRC, ETH_DST is needed when using normal action? exp 3: table=0,in_port=1,nw_src=1.1.1.0/24, actions=2 table=0,in_port=2,nw_src=1.1.1.0/24, actions=1 then the datapath flow is like that: recirc_id(0),in_port(3),eth_type(0x0800),ipv4(src=1.1.1.0/255.255.255.0,frag=no), packets:1863, bytes:182574, used:0.552s, actions:2 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(src=1.1.1.0/255.255.255.0,frag=no), packets:1863, bytes:182574, used:0.552s, actions:3 exp 4: table=0,in_port=1,nw_src=1.1.1.0/24, actions=mod_nw_src:1.1.1.3, output:2 table=0,in_port=2,actions=1 then the datapath flow is like that: recirc_id(0),in_port(3),eth_type(0x0800),ipv4(src=1.1.1.2,frag=no), packets:37, bytes:3626, used:0.332s, actions:set(ipv4(src=1.1.1.3)),2 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:37, bytes:3626, used:0.332s, actions:3 my question is why NW_SRC=1.1.1.2 should be all masked with 0xff, why not 0xff00 like the rule we created? in one word, is there any rules to set flow mask when using megaflow match? which fields should be wildcard? why? we can extract all fields from packets, and we can find the rule match the packet, but why the datapath flow match fields is not the same as userspace rule? ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] The matter that requires your swift response
___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] You will definetely be interested...
Hi Dear, Reading your profile has given me courage in search of a reasponsable and trust worthy Fellow. The past has treated me so awfully but now I am ready to move on despite of my health condition. I will like to have a sincere and important discussion with you that will be in your favor likewise to you and your environment especially to your close family. Endeavor to reply me and I have attached my picture in case you long to know who emailed you. I will be waiting to hear from you as soon as possble. Thanks for paying attention to my mail and will appreciate so much if I receive a reply from you for understable details. Thanks, Mrs. Rania Hassan ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev