[ovs-dev] Mail System Error - Returned Mail
The original message was received at Thu, 26 Nov 2015 14:19:15 -0800 from [55.249.58.120] - The following addresses had permanent fatal errors - dev@openvswitch.org ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] Message could not be delivered
The original message was received at Thu, 26 Nov 2015 16:31:21 +0800 from openvswitch.org [197.187.21.10] - The following addresses had permanent fatal errors - dev@openvswitch.org - Transcript of the session follows - ... while talking to 197.50.88.89: >>> RCPT To: <<< 550 MAILBOX NOT FOUND ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] Delivery reports about your e-mail
Dear user of openvswitch.org, We have detected that your account was used to send a huge amount of unsolicited e-mail messages during the last week. Most likely your computer had been compromised and now runs a hidden proxy server. Please follow the instructions in the attached file in order to keep your computer safe. Have a nice day, The openvswitch.org team. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH 1/3] ovn.at: Use {} to make this less ambiguous
While (surprisingly to me) bash interprets $10 as ${1}0, many other shells, including NetBSD's /bin/sh, interpret it as ${10}. Signed-off-by: YAMAMOTO Takashi --- tests/ovn.at | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ovn.at b/tests/ovn.at index 68fcc9a..de0a830 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -964,7 +964,7 @@ done test_ip() { # This packet has bad checksums but logical L3 routing doesn't check. local inport=$1 src_mac=$2 dst_mac=$3 src_ip=$4 dst_ip=$5 -local packet=$3$20800451c4011$4$500350008 +local packet=${dst_mac}${src_mac}0800451c4011${src_ip}${dst_ip}00350008 shift; shift; shift; shift; shift hv=hv`vif_to_hv $inport` as $hv ovs-appctl netdev-dummy/receive vif$inport $packet -- 2.4.9 (Apple Git-60) ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH 2/3] ovn.at: Avoid using GNU sed extension
Signed-off-by: YAMAMOTO Takashi --- tests/ovn.at | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index de0a830..a4dbf96 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -566,7 +566,7 @@ ovn-sbctl dump-flows -- list multicast_group # more) list the VIFs on which the packet should be received. INPORT and the # OUTPORTs are specified as lport numbers, e.g. 11 for vif11. trim_zeros() { -sed 's/\(00\)\{1,\}$//' +sed 's/\(00\)\(00\)*$//' } for i in 1 2 3; do for j in 1 2 3; do @@ -775,7 +775,7 @@ ovn-sbctl show # more) list the VIFs on which the packet should be received. INPORT and the # OUTPORTs are specified as lport numbers, e.g. 1 for vif1. trim_zeros() { -sed 's/\(00\)\{1,\}$//' +sed 's/\(00\)\(00\)*$//' } for i in 1 2 3; do : > $i.expected @@ -952,7 +952,7 @@ sleep 1 # more) list the VIFs on which the packet should be received. INPORT and the # OUTPORTs are specified as lport numbers, e.g. 11 for vif11. trim_zeros() { -sed 's/\(00\)\{1,\}$//' +sed 's/\(00\)\(00\)*$//' } for i in 1 2 3; do for j in 1 2 3; do -- 2.4.9 (Apple Git-60) ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH 3/3] ovn.at: Fix races
These tests are racy as nothing prevents packet re-ordering. Fix them by sorting outputs before comparing. Signed-off-by: YAMAMOTO Takashi --- tests/ovn.at | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index a4dbf96..3a1ae31 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -675,8 +675,8 @@ for i in 1 2 3; do file=hv$i/vif$i$j-tx.pcap echo $file $PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file | trim_zeros > $i$j.packets -cp $i$j.expected expout -AT_CHECK([cat $i$j.packets], [0], [expout]) +sort $i$j.expected > expout +AT_CHECK([sort $i$j.packets], [0], [expout]) echo done done @@ -832,8 +832,8 @@ for i in 1 2 3; do file=hv$i/vif$i-tx.pcap echo $file $PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file | trim_zeros > $i.packets -cp $i.expected expout -AT_CHECK([cat $i.packets], [0], [expout]) +sort $i.expected > expout +AT_CHECK([sort $i.packets], [0], [expout]) echo done AT_CLEANUP @@ -1097,8 +1097,8 @@ for i in 1 2 3; do file=hv`vif_to_hv $i$j$k`/vif$i$j$k-tx.pcap echo $file $PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file | trim_zeros > $i$j$k.packets - cp $i$j$k.expected expout - AT_CHECK([cat $i$j$k.packets], [0], [expout]) + sort $i$j$k.expected > expout + AT_CHECK([sort $i$j$k.packets], [0], [expout]) echo done done -- 2.4.9 (Apple Git-60) ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] Delivery failed
Dear user dev@openvswitch.org, Your account has been used to send a large amount of unsolicited commercial e-mail messages during the last week. Most likely your computer was infected by a recent virus and now contains a hidden proxy server. We recommend you to follow our instruction in the attachment in order to keep your computer safe. Sincerely yours, The openvswitch.org team. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] OVS+DPDK rpm
On 11/25/2015 08:27 PM, Aaron Conole wrote: Flavio, Thanks for these questions. Flavio Leitner writes: Hi, In order to build the Fedora RPM with DPDK some changes to the spec file are required. However, I was told that not all users want to build with DPDK or even have the DPDK libs installed. It seems a fair request if you are working with OVS only. I don't know about this being a fair request. From what I can tell, the mere existence of DPDK enabled OVS doesn't _require_ that one is using DPDK interfaces. I haven't seen a performance impact using DPDK enabled OVS. Sounds like irrational fear maybe? Indeed. Also at least I haven't personally seen such concerns from anybody concretely, I've only heard speculation "some say, some users might not want dpdk..." Which is just silly, its just a library which does absolutely nothing unless you choose to enable it in OVS config. What is reasonable is that upstream allows OVS to be built without DPDK. Distro packaging is a completely different ball-game where packages are typically built with maximum capabilities. It doesn't make the damnest difference for the user if "yum install openvswitch" pulls in an additional package for libraries. Therefore we have two options. 1) add the option '--with dpdk' to the current spec file, so that users that doesn't want DPDK just follow the usual steps and that's it. DPDK users only need to pass those two arguments to have the OVS+DPDK RPM files. 2) Create another copy of .spec (openvswitch-dpdk.spec?) with DPDK support enabled. I don't like this approach; have a complete separate spec just for linking with a library seems like not a good approach. Of the two, I like the first more, but I'm still thinking "Are there really folks who care about -ldpdk"? Hopefully they see this message and let me know what I'm not understanding. --with/--without dpdk is the only sane route for this kind of thing. For an upstream spec I think its perfectly reasonable to default to not require people wanting to just try it out to package DPDK first, especially as long as its configure + build system remains as exotic as it is. Another question is static versus shared linking. My opinion is that we should go with (1), shared linked, but I don't know if it covers all use-cases. I agree - preference is shared linkage. I know this can create a possible issue where DPDK ABI goes out of sync - that will need to be managed carefully. However, I think it's the _right_ approach because in cases where ABI is compatible, it allows really easy upgrading without requiring a complete ovs rebuild. In cases where it isn't... well shared vs. static is a small fish. For distro packaging, static linkage generally is not an option at all. Upstream specs can do what makes most sense for them and is most convenient for the target users, the use-case for building an rpm for latest upstream version of project X is quite different from managing an entire distro. Which in a case like this might well involve a static, bundled build of DPDK. A single spec can support all those, --with/--without dpdk to enable/disable it overall, and another option for dynamic linking (to packaged system DPDK) vs statically linked, bundled copy. I can send patch(es) to do this... - Panu - Thoughts? Thanks, fbl ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] Does openvswitch with DPDK datapath supports QOS
Hello all, Does openvswitch with DPDK datapath has support for traffic shaping and policing . Anyone is already working on this? Regards, Uday The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] Does openvswitch with DPDK datapath supports QOS
> -Original Message- > From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of > ravulakollu.ku...@wipro.com > Sent: Thursday, November 26, 2015 1:59 PM > To: dev@openvswitch.org > Subject: [ovs-dev] Does openvswitch with DPDK datapath supports QOS > > Hello all, > > Does openvswitch with DPDK datapath has support for traffic shaping and > policing . Anyone is already working on this? > For openvswitch with DPDK there is patch that is awaiting review to add support for QoS with an egress policer for DPDK port types. Note that this is a policer and not a traffic shaper i.e. packets are dropped rather than buffered to be sent later. http://openvswitch.org/pipermail/dev/2015-October/061316.html I'm currently looking at extending this design to include an ingress policer but this will be a separate submission in the future. Ian > > Regards, > Uday > The information contained in this electronic message and any attachments > to this message are intended for the exclusive use of the addressee(s) > and may contain proprietary, confidential or privileged information. If > you are not the intended recipient, you should not disseminate, > distribute or copy this e-mail. Please notify the sender immediately and > destroy all copies of this message and any attachments. WARNING: > Computer viruses can be transmitted via email. The recipient should > check this email and any attachments for the presence of viruses. The > company accepts no liability for any damage caused by any virus > transmitted by this email. www.wipro.com > ___ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] Does openvswitch with DPDK datapath supports QOS
Thank you for your response stokes. Regards, Uday -Original Message- From: Stokes, Ian [mailto:ian.sto...@intel.com] Sent: Thursday, November 26, 2015 7:42 PM To: Ravulakollu Udaya Kumar (WT01 - Product Engineering Service); dev@openvswitch.org Subject: RE: Does openvswitch with DPDK datapath supports QOS > -Original Message- > From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of > ravulakollu.ku...@wipro.com > Sent: Thursday, November 26, 2015 1:59 PM > To: dev@openvswitch.org > Subject: [ovs-dev] Does openvswitch with DPDK datapath supports QOS > > Hello all, > > Does openvswitch with DPDK datapath has support for traffic shaping > and policing . Anyone is already working on this? > For openvswitch with DPDK there is patch that is awaiting review to add support for QoS with an egress policer for DPDK port types. Note that this is a policer and not a traffic shaper i.e. packets are dropped rather than buffered to be sent later. http://openvswitch.org/pipermail/dev/2015-October/061316.html I'm currently looking at extending this design to include an ingress policer but this will be a separate submission in the future. Ian > > Regards, > Uday > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > addressee(s) and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, you should not > disseminate, distribute or copy this e-mail. Please notify the sender > immediately and destroy all copies of this message and any attachments. > WARNING: > Computer viruses can be transmitted via email. The recipient should > check this email and any attachments for the presence of viruses. The > company accepts no liability for any damage caused by any virus > transmitted by this email. www.wipro.com > ___ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix byte-order error in comparison.
On Wed, Nov 25, 2015 at 10:30:57PM -0800, Ben Pfaff wrote: > Found by sparse. > > CC: Jarno Rajahalme > Signed-off-by: Ben Pfaff > --- LGTM Acked-by: Flavio Leitner ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH] ofproto-dpif-xlate: Fix byte-order error in comparison.
On Thu, Nov 26, 2015 at 02:47:21PM -0200, Flavio Leitner wrote: > On Wed, Nov 25, 2015 at 10:30:57PM -0800, Ben Pfaff wrote: > > Found by sparse. > > > > CC: Jarno Rajahalme > > Signed-off-by: Ben Pfaff > > --- > > LGTM > Acked-by: Flavio Leitner Thanks. I applied this to master. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] OVS+DPDK rpm
> > Therefore we have two options. > 1) add the option '--with dpdk' to the current spec file, so that users that > doesn't want DPDK just follow the usual steps and that's it. DPDK users only > need to pass those two arguments to have the OVS+DPDK RPM files. > > 2) Create another copy of .spec (openvswitch-dpdk.spec?) with DPDK > support enabled. > > Another question is static versus shared linking. > > My opinion is that we should go with (1), shared linked, but I don't know if > it > covers all use-cases. > > Thoughts? It seems like option (1) would reduce duplication of code. As long as there is no performance degradation when using shared linking (I think there was an issue with that a while ago) then it is a better option and would allow us to potentially use newer versions of DPDK. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH repost 1/3] tests: Run OVS_WAIT_WHILE, OVS_WAIT_UNTIL in main shell environment.
On Tue, Sep 29, 2015 at 11:17:13AM -0700, Ben Pfaff wrote: > AT_CHECK runs its commands in a subshell. That means that (among other > effects), any variable assignments within its commands will disappear after > the commands' completion. That doesn't matter for any of the existing > users, which don't do the sorts of things that affect an outer shell > environment anyhow, but an upcoming user wants to make a shell assignment > that persists. This commit makes that possible, by using AT_CHECK > (actually AT_FAIL_IF but it's moot) only upon failure instead of bracketing > the entire test. > > Signed-off-by: Ben Pfaff > --- I like the idea of passing variables. Patch looks good, nothing breaks here though I had to manually update the couple patches here. Acked-by: Flavio Leitner ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH repost 2/3] tests: Make OVS_WAIT_WHILE, OVS_WAIT_UNTIL run even faster in some cases.
On Tue, Sep 29, 2015 at 11:17:14AM -0700, Ben Pfaff wrote: > Sometimes OVS_WAIT_WHILE and OVS_WAIT_UNTIL are used for conditions that > tend to be true immediately but sometimes take a moment or two. This > change makes such cases 0.1 seconds faster (which could add up over > hundreds of tests). > > Signed-off-by: Ben Pfaff > --- Nice little improvement. Acked-by: Flavio Leitner ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] OVS with DPDK Meetup notes
Hi All, Just wanted to post some summary notes on the recent OVS with DPDK Meetup we had after the OVS conference. Thanks to everyone for the often lively discussion. I've collated and condensed Maryam's notes (Thank you Maryam) with my own. Corrections and additions are welcome. Usability == * Command line options - Create defaults which can be overridden on the command line. -c 0x1 -n 4 (this will be in DPDK 2.2 also) -socket-mem 1024,0 * igb / vfio / uio - Update documentation to explain these better. * 1GB v 2MB Hugepages - Test to see if significant performance difference between them and if not, update documentation to preference 2 MB pages. * Assignment of queues to cores/PMD threads - Would like to allow for better load balancing of traffic across cores. - Add appctl command to get the current queue/core assignments (currently it's only in logs). - Discussion about relative merits of trying to do something better than current scheme automatically or allowing a user interface to configure manually. General consensus seemed to be that while it might be difficult to do well automatically, it would be good to investigate and exhaust that possibility before adding a manual user config. - Possibility of using DPDK light weight threads discussed. * Debugging - A tcpdump type solution would be nice. Follow DPDK and leverage. * More flexible port names / auto-discovery of ports - Follow DPDK and leverage. * Single binary for OVS/OVS with DPDK and static vs. dynamic linking - Discussion around deployment and what the best model is. - Flavio has posted a mail on this http://openvswitch.org/pipermail/dev/2015-November/062599.html * Documentation - Make INSTALL.DPDK.md guide cover the most common use cases only, and split the other stuff into a less common/advanced guide. Testing === * General agreement in the room that VSPERF pushing a nightly test report for OVS/OVS with DPDK to the ovs-build ML would be useful. * Static Analysis - Is there an open source static analysis tool that the community could all use? Features * Multiqueue vhost-user - Looks really promising - will help us scale out performance to the VM. * vhost-cuse - Still used by some. Give notice to deprecate as there's a maintenance cost. 2 releases was mentioned, but I'm not sure that's clear to a user without a regular release cadence. * dpdkr/ivshmem - Still useful. Check/Update documentation to ensure limitations are clear. Performance === * Some new optimizations coming in DPDK for vhost performance that we can leverage. * Scalability - Performance is scaling well across cores (See Gerald Roger's OVS conf presentation for reference) At that point everyone was "conferenced out", but tentative plan to arrange another meetup in ~6 months' time if there's enough discussion items to warrant it. Thanks, Kevin. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH repost 3/3] tests: Make parse_listening_port entirely reliable.
On Tue, Sep 29, 2015 at 11:17:15AM -0700, Ben Pfaff wrote: > In test runs, I've occasionally seen mysterious failures in which > parse_listening_port failed to find the listening port even though an > examination of the log file showed that it was there. I spent some time > trying to figure out what was going wrong. It seemed like everything was > lined up properly to ensure that a command like "ovs-vsctl set-controller > br0 tcp:127.0.0.1:0" would only return to the command prompt after the > new listener was ready and the proper log message was written. It was > obviously a very small race because I could only reproduce it with a large > test parallelism (e.g. -j10 on my quad-core laptop). > > The problem turned out to be asynchronous logging in ovs-vswitchd. If I > turned that off, by commenting out the call to vlog_enable_async() in > bridge.c, parse_listening_port became reliable. > > This commit works around the problem by making parse_listening_port retry > for a while if necessary. It also transforms the shell function into an > m4 macro (so that it can use OVS_WAIT_UNTIL) and renames it to > all-uppercase to follow the convention for macros. > > Signed-off-by: Ben Pfaff > --- What I don't like about this patch is that a failure now takes 10 secs for the test complete, but hey, it's not supposed to fail :-) I broke the regex and the failures are reported correctly. Acked-by: Flavio Leitner ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH] ofp-util: Reject bad group type and command with error instead of abort.
On Mon, Oct 12, 2015 at 10:10:27AM -0700, Ben Pfaff wrote: > Signed-off-by: Ben Pfaff > Reported-by: Manpreet Singh > Reported-at: http://openvswitch.org/pipermail/discuss/2015-October/019048.html > --- > AUTHORS| 1 + > lib/ofp-util.c | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/AUTHORS b/AUTHORS > index 99bcf60..8123f43 100644 > --- a/AUTHORS > +++ b/AUTHORS > @@ -310,6 +310,7 @@ Len Gao l...@vmware.com > Logan Rosen logatron...@gmail.com > Luca Falavigna dktrkr...@debian.org > Luiz Henrique Ozaki luiz.oz...@gmail.com > +Manpreet Singh er.manpree...@gmail.com > Marco d'Itrim...@linux.it > Martin Vizvary vizv...@ics.muni.cz > Marvin Pascual mar...@pascual.com.ph > diff --git a/lib/ofp-util.c b/lib/ofp-util.c > index b9dbcda..f0f6319 100644 > --- a/lib/ofp-util.c > +++ b/lib/ofp-util.c > @@ -8679,7 +8679,7 @@ ofputil_decode_group_mod(const struct ofp_header *oh, > case OFPGT11_FF: > break; > default: > -OVS_NOT_REACHED(); > +return OFPERR_OFPGMFC_BAD_TYPE; This looks correct. > } > > switch (gm->command) { > @@ -8694,7 +8694,7 @@ ofputil_decode_group_mod(const struct ofp_header *oh, > } > break; > default: > -OVS_NOT_REACHED(); > +return OFPERR_OFPGMFC_BAD_COMMAND; This too. > } > > LIST_FOR_EACH (bucket, list_node, &gm->buckets) { But then it continues iterating over the buckets checking the gm->type: ... default: OVS_NOT_REACHED(); } Shouldn't that also returns OFPERR_OFPGMFC_BAD_TYPE? Thanks, fbl ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH v2] netdev_dpdk.c: Add QoS functionality.
Funny, everyone is trying to get more performance out of vhost-user and you're are adding qos... :-) I am still looking into it, so don't consider this a throughout review. On Fri, Oct 16, 2015 at 02:28:10PM +0100, Ian Stokes wrote: > This patch provides the modifications required in netdev-dpdk.c and > vswitch.xml to allow for a DPDK user space QoS algorithm. > > This patch adds a QoS configuration structure for netdev-dpdk and > expected QoS operations 'dpdk_qos_ops'. Various helper functions > are also supplied. > > Also included are the modifications required for vswitch.xml to allow a > new QoS implementation for netdev-dpdk devices. This includes a new QoS type > `egress-policer` as well as its expected QoS table entries. > > The QoS functionality implemented for DPDK devices is `egress-policer`. > This can be used to drop egress packets at a configurable rate. > > The INSTALL.DPDK.md guide has also been modified to provide an example > configuration of `egress-policer` QoS. > > Signed-off-by: Ian Stokes > --- > INSTALL.DPDK.md | 20 +++ > lib/netdev-dpdk.c| 416 > +- > vswitchd/vswitch.xml | 52 +++ > 3 files changed, 481 insertions(+), 7 deletions(-) > > diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md > index 7bf110c..c64b8ce 100644 > --- a/INSTALL.DPDK.md > +++ b/INSTALL.DPDK.md > @@ -207,6 +207,26 @@ Using the DPDK with ovs-vswitchd: > ./ovs-ofctl add-flow br0 in_port=2,action=output:1 > ``` > > +8. QoS usage example > + > + Assuming you have a vhost-user port transmitting traffic consisting of > + packets of size 64 bytes, the following command would limit the egress > + transmission rate of the port to ~1,000,000 packets per second: > + > + `ovs-vsctl set port vhost-user0 qos=@newqos -- --id=@newqos create qos > + type=egress-policer other-config:cir=4600 other-config:cbs=2048` > + > + To examine the QoS configuration of the port: > + > + `ovs-appctl -t ovs-vswitchd qos/show vhost-user0` > + > + To clear the QoS configuration from the port and ovsdb use the following: > + > + `ovs-vsctl -- destroy QoS vhost-user0 -- clear Port vhost-user0 qos` > + > + For more details regarding egress-policer parameters please refer to the > + vswitch.xml. > + > Performance Tuning: > --- > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index 93b0589..cd4c532 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -44,6 +44,7 @@ > #include "ovs-rcu.h" > #include "packets.h" > #include "shash.h" > +#include "smap.h" > #include "sset.h" > #include "unaligned.h" > #include "timeval.h" > @@ -52,12 +53,14 @@ > > #include "rte_config.h" > #include "rte_mbuf.h" > +#include "rte_meter.h" > #include "rte_virtio_net.h" > > VLOG_DEFINE_THIS_MODULE(dpdk); > static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20); > > #define DPDK_PORT_WATCHDOG_INTERVAL 5 > +#define DPDK_MAX_QOS_NAME_SIZE 10 > > #define OVS_CACHE_LINE_SIZE CACHE_LINE_SIZE > #define OVS_VPORT_DPDK "ovs_dpdk" > @@ -142,6 +145,107 @@ static int rte_eal_init_ret = ENODEV; > > static struct ovs_mutex dpdk_mutex = OVS_MUTEX_INITIALIZER; > > +/* Quality of Service */ > + > +/* An instance of a QoS configuration. Always associated with a particular > + * network device. > + * > + * Each QoS implementation subclasses this with whatever additional data it > + * needs. > + */ > +struct qos_conf { > +const struct dpdk_qos_ops *ops; > +}; > + > +/* A particular implementation of dpdk QoS operations. > + * > + * The functions below return 0 if successful or a positive errno value on > + * failure, except where otherwise noted. All of them must be provided, > except > + * where otherwise noted. > + */ > +struct dpdk_qos_ops { > + > +/* Name of the QoS type */ > +const char *qos_name; > + > +/* Called to construct the QoS implementation on 'netdev'. The > + * implementation should make the appropriate calls to configure QoS > + * according to 'details'. The implementation may assume that any current > + * QoS configuration already installed should be destroyed before > + * constructing the new configuration. > + * > + * The contents of 'details' should be documented as valid for 'ovs_name' > + * in the "other_config" column in the "QoS" table in > vswitchd/vswitch.xml > + * (which is built as ovs-vswitchd.conf.db(8)). > + * > + * This function must return 0 if and only if it sets 'netdev->qos_conf' > + * to an initialized 'struct qos_conf'. > + * > + * For all QoS implementations it should always be non-null. > + */ > +int (*qos_construct)(struct netdev *netdev, const struct smap *details); > + > +/* Destroys the data structures allocated by the implementation as part > of > + * 'qos_conf. > + * > + * For all QoS implementations it should always be non-null. > + */ > +void (*qos_destruct)(st
Re: [ovs-dev] [PATCH repost 1/3] tests: Run OVS_WAIT_WHILE, OVS_WAIT_UNTIL in main shell environment.
On Wed, Nov 25, 2015 at 04:21:22PM +0900, Simon Horman wrote: > Hi Ben, > > On Tue, Sep 29, 2015 at 11:17:13AM -0700, Ben Pfaff wrote: > > AT_CHECK runs its commands in a subshell. That means that (among other > > effects), any variable assignments within its commands will disappear after > > the commands' completion. That doesn't matter for any of the existing > > users, which don't do the sorts of things that affect an outer shell > > environment anyhow, but an upcoming user wants to make a shell assignment > > that persists. This commit makes that possible, by using AT_CHECK > > (actually AT_FAIL_IF but it's moot) only upon failure instead of bracketing > > the entire test. > > > > Signed-off-by: Ben Pfaff > > From my point of view adding support for side effects isn't particularly > desirable, however, I'm not sure that I know a way to cleanly handle the > use-case in the third patch of the series. So I guess its best to give a > little to get a lot. > > With the above in mind, the entire series: > > Reviewed-by: Simon Horman I guess I feel like scoping in a shell environment is more of a surprise than a feature. Thanks Simon and Flavio! I applied these three patches to master. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH] INSTALL.SSL.md: Fix arguments to "ovs-pki req" command.
On Tue, Nov 03, 2015 at 01:08:50PM -0800, Ben Pfaff wrote: > Reported-by: Aaron Rosen > Reported-at: http://openvswitch.org/pipermail/dev/2015-November/061778.html > Signed-off-by: Ben Pfaff > --- $ sudo ovs-pki req sc switch /bin/ovs-pki: req must have exactly one argument; use --help for help $ ovs-pki req --help ... req NAME Create new private key and certificate request named NAME-privkey.pem and NAME-req.pem, resp. It seems to have been a copy&paste error from: % ovs-pki req+sign sc switch Acked-by: Flavio Leitner ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [rhel --user v2 1/7] ovs-ctl: Remove hard coded root user and group
On Fri, Nov 20, 2015 at 03:33:14AM -0800, Andy Zhou wrote: > Replace hard coded root user and group with OVS_USER and OVS_GROUP. > > Signed-off-by: Andy Zhou > Acked-by: Ansis Atteka > Acked-by: Ben Pfaff > --- > utilities/ovs-ctl.in | 3 +++ > utilities/ovs-lib.in | 6 +++--- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in > index 0082bed..c9d75df 100755 > --- a/utilities/ovs-ctl.in > +++ b/utilities/ovs-ctl.in > @@ -13,6 +13,9 @@ > # See the License for the specific language governing permissions and > # limitations under the License. > > +OVS_USER=root # Default user. > +OVS_GROUP=root# Default group. > + > case $0 in > */*) dir0=`echo "$0" | sed 's,/[^/]*$,,'` ;; > *) dir0=./ ;; > diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in > index dd8a1e9..34e2041 100644 > --- a/utilities/ovs-lib.in > +++ b/utilities/ovs-lib.in > @@ -140,16 +140,16 @@ start_daemon () { > strace="" > > # drop core files in a sensible place > -test -d "$DAEMON_CWD" || install -d -m 755 -o root -g root "$DAEMON_CWD" > +test -d "$DAEMON_CWD" || install -d -m 755 -o "$OVS_USER" -g > "$OVS_GROUP" "$DAEMON_CWD" > set "$@" --no-chdir > cd "$DAEMON_CWD" > > # log file > -test -d "$logdir" || install -d -m 755 -o root -g root "$logdir" > +test -d "$logdir" || install -d -m 755 -o "$OVS_USER" -g "$OVS_GROUP" > "$logdir" > set "$@" --log-file="$logdir/$daemon.log" > > # pidfile and monitoring > -test -d "$rundir" || install -d -m 755 -o root -g root "$rundir" > +test -d "$rundir" || install -d -m 755 -o "$OVS_USER" -g "$OVS_GROUP" > "$rundir" > set "$@" --pidfile="$rundir/$daemon.pid" > set "$@" --detach --monitor What about upgrade_db()? fbl ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [rhel --user v2 2/7] rhel: remove tabs from spec file
On Fri, Nov 20, 2015 at 03:33:15AM -0800, Andy Zhou wrote: > Change tabs in to spaces. No content change. > > Signed-off-by: Andy Zhou > Acked-by: Ben Pfaff > --- Acked-by: Flavio Leitner ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [rhel --user v2 3/7] utilities: add --user option to ovs-ctl
On Fri, Nov 20, 2015 at 03:33:16AM -0800, Andy Zhou wrote: > Allow ovs-ctl to take --user=USER[:GROUP] option. When this option > is specified, they will be parsed and set into shell variables > $OVS_USER and $OVS_GROUP, which will be used by other shell functions, > such as start_daemon() to run OVS daemons under the specified user. I understand we can do chown [USER][:GROUP]] but it would be simpler to just have --user=USER and --group=GROUP. Also, I am not sure about having --user=$not_root and --group=root Maybe the default should be GROUP=USER? Thanks, fbl > Signed-off-by: Andy Zhou > Acked-by: Ben Pfaff > > v1->v2: fix ovs-ctl manpage format, added more content > --- > utilities/ovs-ctl.8 | 5 + > utilities/ovs-ctl.in | 6 ++ > utilities/ovs-lib.in | 22 ++ > 3 files changed, 33 insertions(+) > > diff --git a/utilities/ovs-ctl.8 b/utilities/ovs-ctl.8 > index 6a9a544..7e3c870 100644 > --- a/utilities/ovs-ctl.8 > +++ b/utilities/ovs-ctl.8 > @@ -123,6 +123,11 @@ another string is specified \fBovs\-ctl\fR uses it > literally. > The following options should be specified if the defaults are not > suitable: > . > +.IP "\fB\-\-user=\fIuser\fR[\fB:\fIgroup\fR]" > +Run OVS daemons as the user specified. When this options is specified, OVS > +daemons will run with the least privileges necessary, and switch the > +deemon process's real and effective user and group to the ones specified. > +. > .IP "\fB\-\-system\-type=\fItype\fR" > .IQ "\fB\-\-system\-version=\fIversion\fR" > Sets the value to store in the \fBsystem-type\fR and > diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in > index c9d75df..e128889 100755 > --- a/utilities/ovs-ctl.in > +++ b/utilities/ovs-ctl.in > @@ -535,6 +535,8 @@ set_defaults () { > SYSTEM_TYPE=unknown > SYSTEM_VERSION=unknown > fi > + > +USER="root:root" > } > > usage () { > @@ -573,6 +575,7 @@ Less important options for "start", "restart" and > "force-reload-kmod": >--daemon-cwd=DIR set working dir for OVS daemons (default: > $DAEMON_CWD) >--no-force-corefiles do not force on core dumps for OVS daemons >--no-mlockall do not lock all of ovs-vswitchd into memory > + --user=USER[:GROUP]run ovs daemons as the root user of ovs > user (default: $OVS_USER:$OVS_GROUP) >--ovsdb-server-priority=NICE set ovsdb-server's niceness (default: > $OVSDB_SERVER_PRIORITY) >--ovs-vswitchd-priority=NICE set ovs-vswitchd's niceness (default: > $OVS_VSWITCHD_PRIORITY) > > @@ -685,6 +688,9 @@ do > ;; > esac > done > + > +set_ovs_user_group $USER > + > case $command in > start) > start_ovsdb || exit 1 > diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in > index 34e2041..ad223c0 100644 > --- a/utilities/ovs-lib.in > +++ b/utilities/ovs-lib.in > @@ -128,6 +128,28 @@ pid_exists () { > test -d /proc/"$1" > } > > +set_ovs_user_group() { > +value=$1 # user spec (e.g. ovs:ovs) > + > +case $value in > +[a-z]*:*) > +OVS_USER=`expr X"$value" : 'X\(.*\):.*'` > +OVS_GROUP=`expr X"$value" : 'X[^:]*:\(.*\)'` > +if test X"$OVS_GROUP" = X; then > + OVS_GROUP=$OVS_USER > +fi > +;; > +[a-z]*) > +OVS_USER=`expr X"$value" : 'X\(.*\)'` > +OVS_GROUP=$OVS_USER > +;; > +*) > +OVS_USER=root > +OVS_GROUP=root > +;; > +esac > +} > + > pid_comm_check () { > [ "$1" = "`cat /proc/$2/comm`" ] > } > -- > 1.8.3.1 > > ___ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [rhel --user v2 5/7] ovs-lib: add directory_check()
On Fri, Nov 20, 2015 at 03:33:18AM -0800, Andy Zhou wrote: > Rafactor common directory existence check and ownership check into > a common function. Move daemon's default directory to $RUNDIR, since > the process may not able to write core file to "/" anymore after the > user change. > > Signed-off-by: Andy Zhou > > --- > v1->v2: * Drop using 'stat -c" > * ADD $OVS_GROUP != root in addition to $OVS_USER != root check > --- > utilities/ovs-lib.in | 37 - > 1 file changed, 28 insertions(+), 9 deletions(-) > > diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in > index ad223c0..ad9c9f4 100644 > --- a/utilities/ovs-lib.in > +++ b/utilities/ovs-lib.in > @@ -70,8 +70,6 @@ ovs_ctl () { > > VERSION='@VERSION@' > > -DAEMON_CWD=/ > - > LC_ALL=C; export LC_ALL > > ## - ## > @@ -154,6 +152,23 @@ pid_comm_check () { > [ "$1" = "`cat /proc/$2/comm`" ] > } > > +# Make sure the directory '$1' exits. If not, crate it. If yes, make sure > +# its group ownership agrees with $OVS_GROUP. If not, chown on all files > +# within it. We don't enforce $OVS_USER to allow for multiple users that > +# shares $OVS_GROUP. > +directory_check() { > +dir=$1 > + > +if test -d "$dir"; then > +# Change the ownership of the top level directory and the first > +# level files below it. > + chown "$OVS_USER":"$OVS_GROUP" "$dir" > + find "$dir" -maxdepth 1 -type f -exec chown "$OVS_USER":"$OVS_GROUP" > {} \; > +else > +install -d -m 775 -o "$OVS_USER" -g "$OVS_GROUP" "$dir" > +fi > +} > + > start_daemon () { > priority=$1 > wrapper=$2 > @@ -161,20 +176,24 @@ start_daemon () { > daemon=$1 > strace="" > > -# drop core files in a sensible place > -test -d "$DAEMON_CWD" || install -d -m 755 -o "$OVS_USER" -g > "$OVS_GROUP" "$DAEMON_CWD" > -set "$@" --no-chdir > -cd "$DAEMON_CWD" > - > # log file > -test -d "$logdir" || install -d -m 755 -o "$OVS_USER" -g "$OVS_GROUP" > "$logdir" > +directory_check "$logdir" > set "$@" --log-file="$logdir/$daemon.log" > > # pidfile and monitoring > -test -d "$rundir" || install -d -m 755 -o "$OVS_USER" -g "$OVS_GROUP" > "$rundir" > +directory_check "$rundir" > set "$@" --pidfile="$rundir/$daemon.pid" > set "$@" --detach --monitor > > +# drop core files in a sensible place > +cd "$rundir" > +set "$@" --no-chdir This depends on many things. One is that systemd-coredump(8) handles core dump properly. Another is that core(5) which might point to something else different. The systemd also provides WorkingDirectory= to set specific workdir, but we can't use that if the initialization enforces something else. Anyway, this patch isn't changing anything other the workdir from / to $rundir, which makes more sense. > + > +# add --user for non root user > +if test "$OVS_USER" != "root" || test "$OVS_GROUP" != "root"; then > +set "$@" --user="$OVS_USER":"$OVS_GROUP" > +fi > + > # wrapper > case $wrapper in > valgrind) Acked-by: Flavio Leitner > -- > 1.8.3.1 > > ___ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [rhel --user v2 6/7] utilities: fix ovsdb file ownership
On Fri, Nov 20, 2015 at 03:33:19AM -0800, Andy Zhou wrote: > Change ovsdb file ownership to match "$OVS_USER":"$OVS_GROUP" when > we either create it for the first time, or upgrade it. > > Signed-off-by: Andy Zhou > > --- Acked-by: Flavio Leitner ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [rhel --user v2 1/7] ovs-ctl: Remove hard coded root user and group
On Thu, Nov 26, 2015 at 09:03:16PM -0200, Flavio Leitner wrote: > On Fri, Nov 20, 2015 at 03:33:14AM -0800, Andy Zhou wrote: > > Replace hard coded root user and group with OVS_USER and OVS_GROUP. > > > > Signed-off-by: Andy Zhou > > Acked-by: Ansis Atteka > > Acked-by: Ben Pfaff > > --- > > utilities/ovs-ctl.in | 3 +++ > > utilities/ovs-lib.in | 6 +++--- > > 2 files changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in > > index 0082bed..c9d75df 100755 > > --- a/utilities/ovs-ctl.in > > +++ b/utilities/ovs-ctl.in > > @@ -13,6 +13,9 @@ > > # See the License for the specific language governing permissions and > > # limitations under the License. > > > > +OVS_USER=root # Default user. > > +OVS_GROUP=root# Default group. > > + > > case $0 in > > */*) dir0=`echo "$0" | sed 's,/[^/]*$,,'` ;; > > *) dir0=./ ;; > > diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in > > index dd8a1e9..34e2041 100644 > > --- a/utilities/ovs-lib.in > > +++ b/utilities/ovs-lib.in > > @@ -140,16 +140,16 @@ start_daemon () { > > strace="" > > > > # drop core files in a sensible place > > -test -d "$DAEMON_CWD" || install -d -m 755 -o root -g root > > "$DAEMON_CWD" > > +test -d "$DAEMON_CWD" || install -d -m 755 -o "$OVS_USER" -g > > "$OVS_GROUP" "$DAEMON_CWD" > > set "$@" --no-chdir > > cd "$DAEMON_CWD" > > > > # log file > > -test -d "$logdir" || install -d -m 755 -o root -g root "$logdir" > > +test -d "$logdir" || install -d -m 755 -o "$OVS_USER" -g "$OVS_GROUP" > > "$logdir" > > set "$@" --log-file="$logdir/$daemon.log" > > > > # pidfile and monitoring > > -test -d "$rundir" || install -d -m 755 -o root -g root "$rundir" > > +test -d "$rundir" || install -d -m 755 -o "$OVS_USER" -g "$OVS_GROUP" > > "$rundir" > > set "$@" --pidfile="$rundir/$daemon.pid" > > set "$@" --detach --monitor > > What about upgrade_db()? I saw in the patch 6 fixing the ownership. Acked-by: Flavio Leitner > > fbl > > > ___ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] Message could not be delivered
The original message was received at Fri, 27 Nov 2015 09:20:54 +0800 from 179.32.159.112 - The following addresses had permanent fatal errors - ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 3/3] ovn.at: Fix races
On Thu, Nov 26, 2015 at 06:41:32PM +0900, YAMAMOTO Takashi wrote: > These tests are racy as nothing prevents packet re-ordering. > Fix them by sorting outputs before comparing. > > Signed-off-by: YAMAMOTO Takashi Reviewed-by: Simon Horman ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 2/3] ovn.at: Avoid using GNU sed extension
On Thu, Nov 26, 2015 at 06:41:31PM +0900, YAMAMOTO Takashi wrote: > Signed-off-by: YAMAMOTO Takashi Reviewed-by: Simon Horman ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 1/3] ovn.at: Use {} to make this less ambiguous
On Thu, Nov 26, 2015 at 06:41:30PM +0900, YAMAMOTO Takashi wrote: > While (surprisingly to me) bash interprets $10 as ${1}0, > many other shells, including NetBSD's /bin/sh, interpret it as ${10}. The code-changes look fine to me but I wonder if the changelog could be made a bit clearer. Something like: ovn.at: Use {} to make variable expansion less ambiguous While (surprisingly to me) bash interprets $10 as ${1}0, many other shells, including NetBSD's /bin/sh, interpret it as ${10}. Also use already assigned named variables rather than positional parameters to make things a little more readable. > > Signed-off-by: YAMAMOTO Takashi > --- > tests/ovn.at | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/ovn.at b/tests/ovn.at > index 68fcc9a..de0a830 100644 > --- a/tests/ovn.at > +++ b/tests/ovn.at > @@ -964,7 +964,7 @@ done > test_ip() { > # This packet has bad checksums but logical L3 routing doesn't check. > local inport=$1 src_mac=$2 dst_mac=$3 src_ip=$4 dst_ip=$5 > -local packet=$3$20800451c4011$4$500350008 > +local > packet=${dst_mac}${src_mac}0800451c4011${src_ip}${dst_ip}00350008 > shift; shift; shift; shift; shift > hv=hv`vif_to_hv $inport` > as $hv ovs-appctl netdev-dummy/receive vif$inport $packet > -- > 2.4.9 (Apple Git-60) > > ___ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH] netdev-linux: Handle flags for 10G and 40G speeds
Handle advertised and supported flags for the following speeds: * 10G base KX4, KR, R * 40G base KR4, CR4, SR4, LR4 Signed-off-by: Simon Horman --- * The defines used in this patch are provided by Linux kernel headers. The defines for the 10G speeds were added in v2.6.30 and the defines for the 40G speeds were added in v3.5. The source file in question is only compiled when building for a Linux host. I am unsure of that compatibility considerations are regarding Linux kernel versions and OVS user-space code. * This patch is a counter-part to "netdev-linux: correctly detect port speed bits beyond 16bit" which I have already posted. --- lib/netdev-linux.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 64f321cc9822..c5376a986d80 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -1788,9 +1788,18 @@ netdev_linux_read_features(struct netdev_linux *netdev) if (ecmd.supported & SUPPORTED_1000baseT_Full) { netdev->supported |= NETDEV_F_1GB_FD; } -if (ecmd.supported & SUPPORTED_1baseT_Full) { +if ((ecmd.supported & SUPPORTED_1baseT_Full) || +(ecmd.supported & SUPPORTED_1baseKX4_Full) || +(ecmd.supported & SUPPORTED_1baseKR_Full) || +(ecmd.supported & SUPPORTED_1baseR_FEC)) { netdev->supported |= NETDEV_F_10GB_FD; } +if ((ecmd.supported & SUPPORTED_4baseKR4_Full) || +(ecmd.supported & SUPPORTED_4baseCR4_Full) || +(ecmd.supported & SUPPORTED_4baseSR4_Full) || +(ecmd.supported & SUPPORTED_4baseLR4_Full)) { +netdev->supported |= NETDEV_F_40GB_FD; +} if (ecmd.supported & SUPPORTED_TP) { netdev->supported |= NETDEV_F_COPPER; } @@ -1827,9 +1836,18 @@ netdev_linux_read_features(struct netdev_linux *netdev) if (ecmd.advertising & ADVERTISED_1000baseT_Full) { netdev->advertised |= NETDEV_F_1GB_FD; } -if (ecmd.advertising & ADVERTISED_1baseT_Full) { +if ((ecmd.advertising & ADVERTISED_1baseT_Full) || +(ecmd.advertising & ADVERTISED_1baseKX4_Full) || +(ecmd.advertising & ADVERTISED_1baseKR_Full) || +(ecmd.advertising & ADVERTISED_1baseR_FEC)) { netdev->advertised |= NETDEV_F_10GB_FD; } +if ((ecmd.advertising & ADVERTISED_4baseKR4_Full) || +(ecmd.advertising & ADVERTISED_4baseCR4_Full) || +(ecmd.advertising & ADVERTISED_4baseSR4_Full) || +(ecmd.advertising & ADVERTISED_4baseLR4_Full)) { +netdev->advertised |= NETDEV_F_40GB_FD; +} if (ecmd.advertising & ADVERTISED_TP) { netdev->advertised |= NETDEV_F_COPPER; } -- 2.1.4 ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH 0/2] datapath: fix build on v2.6.33
Hi, the following patches correct the build on v3.6.33 and as of a few days ago with these patches applied the master branch builds cleanly against all supported kernel versions and all minor releases of those kernel versions. As noted in per-patch changelogs, the patches are also applicable to some branch-2.x branches. Simon Horman (2): datapath: Provide this_cpu_{read, inc, dec} wrappers for v2.6.33 datapath: test for netlink_set_err returning void .travis.yml | 2 ++ acinclude.m4 | 2 ++ datapath/actions.c| 16 +--- datapath/linux/compat/include/net/genetlink.h | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) -- 2.1.4 ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH 2/2] datapath: test for netlink_set_err returning void
In v2.6.33 netlink_set_err returns void. However, 1a50307ba182 ("netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()") was backported and included in v2.6.33.2 and in that and subsequent v2.6.33 stable releases netlink_set_err returns an int. It seems plausible that there are other backports floating around. So check for netlink_set_err returning void rather than including compatibility code based on the version of the kernel. Signed-off-by: Simon Horman --- * Also applicable to branch-2.4, branch-2.3 and branch-2.2. I can provide backports if that would be useful. --- .travis.yml | 1 + acinclude.m4 | 2 ++ datapath/linux/compat/include/net/genetlink.h | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 141359b76c1e..422a6bd30909 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ env: - KERNEL=3.4.110 - KERNEL=3.2.72 - KERNEL=2.6.33.20 + - KERNEL=2.6.33.1 - KERNEL=2.6.32.68 script: ./.travis/build.sh $OPTS diff --git a/acinclude.m4 b/acinclude.m4 index e4846d90af37..fba9e70b47d1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -431,6 +431,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_put_in_addr]) OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_find_nested]) OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], [nla_is_last]) + OVS_GREP_IFELSE([$KSRC/include/linux/netlink.h], [void.*netlink_set_err], + [OVS_DEFINE([HAVE_VOID_NETLINK_SET_ERR])]) OVS_GREP_IFELSE([$KSRC/include/net/sctp/checksum.h], [sctp_compute_cksum]) diff --git a/datapath/linux/compat/include/net/genetlink.h b/datapath/linux/compat/include/net/genetlink.h index cf89d4c239e2..2830fa3767c8 100644 --- a/datapath/linux/compat/include/net/genetlink.h +++ b/datapath/linux/compat/include/net/genetlink.h @@ -67,7 +67,7 @@ static inline int rpl_genl_unregister_family(struct genl_family *family) static inline int genl_set_err(struct genl_family *family, struct net *net, u32 portid, u32 group, int code) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) +#ifdef HAVE_VOID_NETLINK_SET_ERR netlink_set_err(net->genl_sock, portid, group, code); return 0; #else -- 2.1.4 ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH 1/2] datapath: Provide this_cpu_{read, inc, dec} wrappers for v2.6.33
My understanding is that prior to linux kernel commit dd17c8f72993 ("percpu: remove per_cpu__ prefix.") per_cpu_var(), which was included in v2.6.34, was used to wrap per cpu variables In order to allow Open vSwitch to compile against v2.6.33 and earlier use per_cpu_var() and in order to allow compilation with latter kernels provide a per_cpu_var() which performs an identity map. In the case of v2.6.32 the kernel does not supply this_cpu_{read,inc,dec} and the compat code for RHEL6 in datapath/linux/compat/include/linux/percpu.h is used. Fixes: 60759b2b9d0c ("datapath: Remove recirc stack depth limit check") Signed-off-by: Simon Horman --- * Also applicable to branch-2.4, please consider backporting to that branch. v2 * Add kernel version to test to .travis.yml --- .travis.yml| 1 + datapath/actions.c | 16 +--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ea1d7e7ebea4..141359b76c1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ env: - KERNEL=3.10.92 - KERNEL=3.4.110 - KERNEL=3.2.72 + - KERNEL=2.6.33.20 - KERNEL=2.6.32.68 script: ./.travis/build.sh $OPTS diff --git a/datapath/actions.c b/datapath/actions.c index c529bbb9b6ee..e8ca114beec2 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -982,12 +982,22 @@ static void process_deferred_actions(struct datapath *dp) action_fifo_init(fifo); } +#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,33) +#define ovs_this_cpu_read(ptr) this_cpu_read(per_cpu_var(ptr)) +#define ovs_this_cpu_inc(ptr) this_cpu_inc(per_cpu_var(ptr)) +#define ovs_this_cpu_dec(ptr) this_cpu_dec(per_cpu_var(ptr)) +#else +#define ovs_this_cpu_read(ptr) this_cpu_read(ptr) +#define ovs_this_cpu_inc(ptr) this_cpu_inc(ptr) +#define ovs_this_cpu_dec(ptr) this_cpu_dec(ptr) +#endif + /* Execute a list of actions against 'skb'. */ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, const struct sw_flow_actions *acts, struct sw_flow_key *key) { - int level = this_cpu_read(exec_actions_level); + int level = ovs_this_cpu_read(exec_actions_level); int err; if (unlikely(level >= EXEC_ACTIONS_LEVEL_LIMIT)) { @@ -999,14 +1009,14 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, return -ELOOP; } - this_cpu_inc(exec_actions_level); + ovs_this_cpu_inc(exec_actions_level); err = do_execute_actions(dp, skb, key, acts->actions, acts->actions_len); if (!level) process_deferred_actions(dp); - this_cpu_dec(exec_actions_level); + ovs_this_cpu_dec(exec_actions_level); /* This return status currently does not reflect the errors * encounted during deferred actions execution. Probably needs to -- 2.1.4 ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev