summaryrefslogtreecommitdiff
path: root/ofproto/pinsched.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Move lib/poll-loop.h to include/openvswitchXiao Liang2017-11-031-1/+1
| | | | | | | | Poll-loop is the core to implement main loop. It should be available in libopenvswitch. Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* lib: Move lib/rconn.h to include/openvswitchXiao Liang2017-10-311-1/+1
| | | | | | | | Rconn provides useful features over vconn. Make it available to library users. Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* pinsched: Update next_txq pointer when destroying pinqueue.Tony van der Peet2017-03-081-0/+6
| | | | | | | | When a packet-in queue is destroyed, update next_txq if it is referencing the destroyed queue. NULL is a valid value for next_txq. Signed-off-by: Tony van der Peet <tony.vanderpeet@alliedtelesis.co.nz> Signed-off-by: Ben Pfaff <blp@ovn.org>
* json: Move from lib to include/openvswitch.Terry Wilson2016-07-221-1/+1
| | | | | | | | | | | | | | | To easily allow both in- and out-of-tree building of the Python wrapper for the OVS JSON parser (e.g. w/ pip), move json.h to include/openvswitch. This also requires moving lib/{hmap,shash}.h. Both hmap.h and shash.h were #include-ing "util.h" even though the headers themselves did not use anything from there, but rather from include/openvswitch/util.h. Fixing that required including util.h in several C files mostly due to OVS_NOT_REACHED and things like xmalloc. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* hmap: Add HMAP_FOR_EACH_POP.Daniele Di Proietto2016-04-261-3/+2
| | | | | | | Makes popping each member of the hmap a bit easier. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ben Pfaff <blp@ovn.org>
* Move lib/ofpbuf.h to include/openvswitch directoryBen Warren2016-03-301-1/+1
| | | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* list: Rename all functions in list.h with ovs_ prefix.Ben Warren2016-03-301-8/+8
| | | | | | | This attempts to prevent namespace collisions with other list libraries Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* pinsched: Remove obsolete ofpbuf_trim().Ben Pfaff2016-01-191-10/+3
| | | | | | | | | | | | | This call to ofpbuf_trim() comes from a time when the packets passed to pinsched came directly from a dpif. For some time now that's no longer true--now they are messages generated by ofputil_encode_packet_in(), which generally are well sized and do not benefit from trimming. This is not a bug fix--the code is equally correct either way, it's only the rationale for trimming that's obsolete. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
* lib: Move vconn.h to <openvswitch/vconn.h>Thomas Graf2014-12-151-1/+1
| | | | | | | | Also moves definitions for struct vconn and pvconn to the public header. The provider interface is kept private. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* list: Rename struct list to struct ovs_listThomas Graf2014-12-151-4/+4
| | | | | | | struct list is a common name and can't be used in public headers. Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Move token-bucket.h to <openvswitch/token-bucket.h>Thomas Graf2014-12-151-1/+1
| | | | | Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* ofproto: Report controller rate limiting statistics in database.Ben Pfaff2014-07-171-5/+12
| | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Gurucharan Shetty <gshetty@nicira.com>
* pinsched: Report queued packet count correctly.Ben Pfaff2014-07-171-7/+3
| | | | | | | | | | | 'n_txq' was initialized to 0 and never modified, so pinsched_count_txqlen() always returned 0. Instead, return the correct number. This only affected the results of "ovs-appctl memory/show", and only if controller rate limiting was turned on, so it is not a serious bug. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Gurucharan Shetty <gshetty@nicira.com>
* pinsched: Eliminate function callback in interface.Ben Pfaff2013-10-231-6/+9
| | | | | | | | 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>
* flow: New function hash_ofp_port() and hash_ofp_port().Ethan Jackson2013-06-241-1/+1
| | | | | | | | These functions are used so often, that having an easy to read helper is worth it. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* Create specific types for ofp and odp portAlex Wang2013-06-201-4/+5
| | | | | | | | | | | | Until now, datapath ports and openflow ports were both represented by unsigned integers of various sizes. With implicit conversions, etc., it is easy to mix them up and use one where the other is expected. This commit creates two typedefs, ofp_port_t and odp_port_t. Both of these two types are marked by "__attribute__((bitwise))" so that sparse can be used to detect any misuse. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* token-bucket: New library for generic rate-limiting.Ben Pfaff2012-06-211-56/+30
| | | | | | | This commit converts two rate-limiters in the tree to use the library. I intend to use the library elsewhere in the future. Signed-off-by: Ben Pfaff <blp@nicira.com>
* pinsched: Completely fill the token bucket at initialization.Ben Pfaff2012-06-211-1/+1
| | | | | | | | | This code, which dates to August 2008, initially sets the packet-in scheduler token buckets to 10% full, without any rationale. I suspect that this is just a typo for 100% full, which I think would be more conventional, so this commit switches to that. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Add support for tracking and logging daemon memory usage.Ben Pfaff2012-05-221-1/+9
| | | | Signed-off-by: Ben Pfaff <blp@nicira.com>
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* vconn: Remove unnecessary forward declarations and #includes from header.Ben Pfaff2011-10-041-0/+1
| | | | | This required fix-ups in a few other files that accidentally depended upon vconn.h including those other headers.
* ofproto: Update some comments.Ben Pfaff2011-05-111-3/+3
|
* ofproto: Get rid of archaic "switch status" OpenFlow extension.Ben Pfaff2011-03-161-22/+2
| | | | | | | | | Back in 2008 or so, I introduced this extension as a way to provide information about switch status to the new "switch UI" program. Since then, the switch UI program has been removed and the important information that was provided by the switch status extension is now available in the database, so we might as well get rid of this extension, and that is what this commit does.
* pinsched: Avoid uninitialized variable warning.Jesse Gross2010-12-131-1/+1
| | | | | | Some compilers warn about the variable 'n_longest' in drop_packet() being used uninitialized. This isn't actually possible but explicitly set it to zero to avoid spurious warnings.
* pinsched: Use hmap instead of port_array.Ben Pfaff2010-12-061-36/+77
| | | | | | | | | | This is the last remaining use of port_array in the tree. It wasn't really taking advantage of any of the special features of port_arrays, so it's better to save some time and memory by using an hmap instead. (In addition, OpenFlow 1.1, which we may eventually want to support, has changed from 16-bit to 32-bit port numbers, which would require the port_array code to be rewritten anyhow.)
* queue: Get rid of ovs_queue data structure.Ben Pfaff2010-12-061-14/+19
| | | | | | | ovs_queue doesn't seem very useful; it's just a singly-linked list. It's more generally useful to use a general-purpose "struct list" for lists of packets, so this commit adds such a member to "struct ofpbuf" and shifts the existing users to use it.
* port-array: Add port_array_delete() function.Ben Pfaff2010-06-171-1/+1
| | | | | port_array_delete(pa, idx) is equivalent to port_array_set(pa, idx, NULL), but it never allocates memory and avoids conditionals.
* ofproto: Bundle all controller-related settings into a struct.Ben Pfaff2010-04-201-0/+8
| | | | | | | Many ofproto settings are controller-related. Upcoming commits will add to ofproto the ability to support multiple controllers, so it is important to be able to refer to controller settings as a group. Hence, this commit bundles them into a new "struct ofproto_controller".
* Merge "master" into "next".Ben Pfaff2010-02-241-1/+4
|\
| * Work around bugs in system headers.Ben Pfaff2010-02-121-0/+2
| | | | | | | | | | | | | | On some system, at least, one must include <sys/types.h> before <netinet/in.h>, and <netinet/in.h> before <arpa/inet.h> or <net/if.h>. From Jean Tourrilhes <jt@hpl.hp.com>.
| * Add missing <stdint.h> includes.Ben Pfaff2010-02-121-1/+2
| | | | | | | | Reported-by: Jean Tourrilhes <jt@hpl.hp.com>
* | Add new function xzalloc(n) as a shorthand for xcalloc(1, n).Ben Pfaff2009-11-041-1/+1
|/
* Rename "secchan" to "ofproto" (library) and "ovs-openflowd" (program).Ben Pfaff2009-07-081-0/+284
These names are more meaningful, so we prefer them.