aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-10-24datapath: Enable RT Kernel supportHEADmasterViresh Kumar
I found these files where there can be some issues on RT kernel: - datapath/datapath.c - datapath/vport.c - datapath/linux/compat/workqueue.c Important calls here are (that doesn't fit well with RT are): - spin_lock_irq{save}() - spin_lock_bh() - local_bh_disable() 1- spin_lock_irq{save}() These are simply converted to spin_lock() in RT and so access to critical sections is guaranteed to be serialized.. And so nothing is required to be fixed for it.. 2- spin_lock_bh() It guarantees code to be serialized and hence shouldn't be a problem.. 2- local_bh_disable() This is how it is implemented: +void local_bh_disable(void) +{ + migrate_disable(); + current->softirq_nestcnt++; +} +EXPORT_SYMBOL(local_bh_disable); And here is the problem: Code currently using local_bh_disable() isn't guaranteed to be serialized and so that is required to be fixed. A simple solution would be to add a spin_lock_bh() for this case which will make it work (efficiently) for both RT and non-RT cases. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-10-23ofp-print: Update a printf format for the recent pin.total_len change.YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23connmgr: Fix an abort.YAMAMOTO Takashi
Fix a problem introduced by commit cfa955b083c5617212a29a03423e063ff6cb350a. (connmgr: Fix packet-in reason for OpenFlow1.3 table-miss flow entries.). ofconn might not be connected here, in that case ofputil_protocol_to_ofp_version aborts. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-21datapath: Per cpu flow stats.Pravin B Shelar
With mega flow implementation ovs flow can be shared between multiple CPUs which makes stats updates highly contended operation. Following patch allocates separate stats for each CPU to make stats update scalable. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
2013-10-23lib/ofp-actions: Enforce action consistency.Jarno Rajahalme
OpenFlow 1.1+ specs encourage switches to verify action consistency at flow setup time. Implement this for OpenFlow 1.1+ only to not break any current OF 1.0 based use. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23ofp-actions: Make union ofp_action more generic.Ben Pfaff
Make union ofp_action more generic by allowing it to be used for all actions. OFP_ACTION_ALIGN (which is 8, as the sizeof(union ofp_action) used to be) is now used where sizeof union ofp_action was used before. On the same note, variable name 'n_actions' is changed to 'max_actions' as the number of actions cannot be simply divided when actions have various sizes. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23Add OF11 SET IP TTL action.Jarno Rajahalme
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23Add OF11 set IPv4 ECN action.Jarno Rajahalme
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23Allow OFPACT_SET_IP_DSCP to act on both IPv4 and IPv6 packets.Ben Pfaff
This removes semantic differences between different OpenFlow versions, making it easier to translate between them. Also, rename OFPACT_SET_IPV4_DSCP to OFPACT_SET_IP_DSCP. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23Fix ovs-ofctl documentation.Jarno Rajahalme
State that if decrementing makes a TTL zero, controller notifications may be sent. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23pinsched: Eliminate function callback in interface.Ben Pfaff
I'm not a fan of function callbacks because I feel that they obscure interfaces. This eliminates the function callback used until now in the pinsched code. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23connmgr: Fix packet-in reason for OpenFlow1.3 table-miss flow entries.YAMAMOTO Takashi
As per spec, make packet-in reason for OpenFlow1.3 table-miss flow entries no_match rather than action. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-23fail-open: Add function to identify fail-open's flows.Ben Pfaff
This seems slightly cleaner than embedding this logic directing into ofproto-dpif, since it is an interface that theoretically could be useful to other ofproto providers. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-22ofp-util: Use correct cookie value in "packet_in"s when no flow involved.Ben Pfaff
OpenFlow 1.3 uses all-1-bits in a packet_in to indicate that the packet_in was not generated by a flow, but Open vSwitch incorrectly used 0. This fixes the problem. For consistency, this commit also changes NXT_PACKET_IN to use all-1-bits for this case, event though NXT_PACKET_IN was previously defined to use zero. This doesn't appear to make a difference for the NVP controller; if it causes a problem for some other controller then I will revert that part of the change. Found by inspection. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-22ofp-util: Improve comments on struct ofputil_packet_in.Ben Pfaff
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-22connmgr: Move send_len from ofputil_packet_in to ofproto_packet_in.Ben Pfaff
send_len is not directly part of the OpenFlow packet_in message, at least given that it is partially redundant with packet_len. send_len is, rather, a request to the connmgr that expresses how many bytes the action requested be sent to the controller, but the connmgr cannot always honor it. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-22connmgr: Move controller_id from ofputil_packet_in to ofproto_packet_in.Ben Pfaff
controller_id isn't part of the OpenFlow message, so it shouldn't be in ofputil_packet_in. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-22ofproto, ofp-util: Begin disentangling packet-in wire format and handling.Ben Pfaff
struct ofputil_packet_in mixes data included in OpenFlow packet_in messages with data that used internally by ofproto and connmgr to queue and route packet_ins. This commit begins disentangling these purposes by adding a new struct ofproto_packet_in that wraps struct ofputil_packet_in. Adding this new level of indirection causes a lot of code churn, so this commit mainly takes care of that to make the remaining changes easier to read. This commit does move the list node used for queuing packet_ins into the new wrapper structure. Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-22datapath: Add backport for __always_unused.Jesse Gross
Reported-by: Ben Pfaff <bpfaff@vmware.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-10-22Update AUTHORSJoe Stringer
Signed-off-by: Joe Stringer <joestringer@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-10-22dpif-linux: collect and display mega flow mask statsAndy Zhou
Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-10-22datapath: collect mega flow mask statsAndy Zhou
Collect mega flow mask stats. ovs-dpctl show command can be used to display them. Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-10-22classifier: Fix a typo.Gurucharan Shetty
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-22ofproto: Fix coding style.Gurucharan Shetty
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-21odp-execute: Fix possible segfault.Alex Wang
In current code, the odp_execute_actions() function does not check the value of "userspace" function pointer before invoking it. This patch adds a check for it. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-21ofp-actions: Distinguish OF1.1/1.2 push_mpls from OF1.3+.Joe Stringer
In OpenFlow 1.1 and 1.2, the push_mpls action pushes the MPLS label after any existing VLAN tag. In OpenFlow 1.3, it pushes the label before any existing VLAN tag. Until now, the action parser didn't distinguish these cases. This commit adds support. Nothing yet actually changes the behavior of push_mpls. enum ofpact_mpls_position contributed by Ben Pfaff. Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-21ofproto: Send only one OFPT_FLOW_REMOVED message when a flow expires.Ben Pfaff
Commit 15aaf59932a3 (ofproto: Add global locking around flow table changes.) introduced doubled messages for expirations. Reported-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
2013-10-18ovs-vtep: Don't flood to multiple 'uknown-dsts'.Gurucharan Shetty
This commit changes VTEP simulator's flooding logic as follows: 1. Traffic coming from a VTEP physical port will only be flooded to all the physical ports in the same VTEP that belongs to that logical switch and to ONLY one of the devices that have been marked as 'unknown-dst' 2. Traffic coming from any device that has 'unknown-dst' marked, will only be flooded by VTEP to its physical ports that belong to that logical switch. Bug #20144. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
2013-10-18configure: check for uuid python moduleAnsis Atteka
After introducing commit a5ae88ff8a276e86c842ac102145432662bf711a "ovsdb-doc: generate vswitch.[pic|gv] files only if dot tool is available" Open vSwitch did not build anymore on hosts that did not have uuid python module installed (for example, we still support XenServer that still uses old python 2.4 and hence does not have uuid). After this commit ./configure will check whether uuid module is present and, if it isn't, then it will add python/compat to the PYTHONPATH. Acked-By: Ben Pfaff <blp@nicira.com> Signed-Off-By: Ansis Atteka <aatteka@nicira.com> Issue: 20476
2013-10-18FAQ: Fix misspelling.Ben Pfaff
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-18FAQ: Add Q&A about bridge compatibility.Ben Pfaff
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-16datapath: Add support for Linux 3.11Pravin B Shelar
Kernel 3.11 has support for extended GRE API required for OVS datapath, But vxlan still needs out of tree tunneling compatibility. Therefore to simplify, all tunneling modules are forced to use compat tunneling. CC: James Page <james.page@ubuntu.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
2013-10-17socket-util: Add symlink based workaround for long pathnames.YAMAMOTO Takashi
The existing /proc workaround only works on Linux. Symlinks are more widely available. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Co-authored-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17OPENFLOW-1.1+: Add an item to improve action translation.Ben Pfaff
Reported-by: Torbjorn Tornkvist <kruskakli@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17xenserver: Add VTEP packaging.Justin Pettit
Add VTEP files so XenServer build doesn't fail. Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-10-17rhel: Add VTEP packaging.Justin Pettit
Add VTEP files so RHEL build doesn't fail. Bug #20487 Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-10-17vswitchd: Use vswitch-specific variable name in automake.mk.Justin Pettit
The variable OVSDB_DOT_DIAGRAM_ARG is describing the vswitch dot file, so use the name VSWITCH_DOT_DIAGRAM_ARG to prevent confusion in the generated makefile. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-17vtep: Add Debian packaging.Justin Pettit
Co-authored-by: David Yang <davidy@vmware.com> Signed-off-by: David Yang <davidy@vmware.com> Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-17vtep: Initial checkin of ovs-vtep.Justin Pettit
ovs-vtep is a VTEP emulator that uses Open vSwitch for forwarding. Co-authored-by: Gurucharan Shetty <gshetty@nicira.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-17vtep: Add vtep-ctl command.Justin Pettit
The vtep-ctl command provides a user interface to manipulate the VTEP OVSDB schema. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-17vtep: Initial checkin of vtep schema.Bruce Davie
The hardware VTEP OVSDB schema specifies relations that a VTEP can use to integrate physical ports into logical switches maintained by a network virtualization controller such as NVP. Co-authored-by: Ben Pfaff <blp@nicira.com> Co-authored-by: Kenneth Duda <kduda@aristanetworks.com> Co-authored-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Bruce Davie <bdavie@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Kenneth Duda <kduda@aristanetworks.com> Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-17ovsdb-dot: Include arrows by default.Ben Pfaff
When ovsdb-dot generates diagrams for use in the manpages, the dot2pic postprocessor makes nicer output if the arrowheads are omitted (dot2pic adds the arrowheads itself). But for other uses that don't go through the postprocessor, we generally want the arrowheads. So this commit adds an option. On the principle that the default should be the least surprising to a naive user, arrowheads are included by default. Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
2013-10-17More accurate wildcarding and fragment handling.Jarno Rajahalme
This patch gets rid of the need for having explicit padding in struct flow as new fields are being added. flow_wildcards_init_exact(), which used to set bits in both compiler generated and explicit padding, is removed. match_wc_init() is now used instead, which generates the mask based on a given flow, setting bits only in fields which make sense. Places where random bits were placed in struct flow have been changed to only set random bits on fields that are significant in the given context. This avoids setting padding bits. - lib/flow: - Properly initialize struct flow also in places we used to zero out padding before. - Add flow_random_hash_fields() used for testing. - Remove flow_wildcards_init_exact() to avoid initializing masks where compiler generated padding has bits set. - lib/match.c match_wc_init(): Wildcard transport layer fields for later fragments, remove match_init_exact(), which used flow_wildcards_init_exact(). - tests/test-flows.c: use match_wc_init() instead of match_init_exact() - tests/flowgen.pl: generate more accurate packets and flows when fragmenting, mark unavailable fields as wildcarded. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17ovsdb-doc: generate vswitch.[pic|gv] files only if dot tool is availableAnsis Atteka
These are auto-generated files, so it would be better not to keep them inside Open vSwitch repository. Behaviour before this patch was that if dot tool was not present on the system, then ovs-vswitchd.conf.db.5 would have used pre-generated vswitch.pic file that was already checked in the git repository. After this patch ovs-vswitchd.conf.db.5 will simply not have a dot diagram, if dot was not present at the time when Open vSwitch was built. Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2013-10-17include/openflow: Move union ofp_action away from headers.Jarno Rajahalme
union ofp_action cannot remain in the OF 1.0 header as it is expanded to include actions from later versions. Also, it is not part of the protocol interface and will be easier to update where it is actually used. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17ovs-dpctl: Add a 'filter' option to match wildcarded 'dump-flows'.Gurucharan Shetty
With mega-flows, many flows in the kernel datapath are wildcarded. For someone that is debugging a system and wants to find a particular flow and its actions, it is a little hard to zero-in on the flow because some fields are wildcarded. With the filter='$filter' option, we can now filter on the o/p of 'ovs-dpctl dump-flows'. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
2013-10-17nx-match: Fix comments.YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17ofp-util: Fix a comment.YAMAMOTO Takashi
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17ofp-actions: Consistently use helper function.YAMAMOTO Takashi
No functional changes. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-10-17ofp-parse: Fix padding parsing write-actions.YAMAMOTO Takashi
For longer term, "nested" variants of some ofpact functions which using ofpbuf->l3 might be desirable. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>