~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to ofproto/pinsched.c

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <arpa/inet.h>
22
22
#include <stdint.h>
23
23
#include <stdlib.h>
 
24
#include "flow.h"
24
25
#include "hash.h"
25
26
#include "hmap.h"
26
27
#include "ofpbuf.h"
35
36
 
36
37
struct pinqueue {
37
38
    struct hmap_node node;      /* In struct pinsched's 'queues' hmap. */
38
 
    uint16_t port_no;           /* Port number. */
 
39
    ofp_port_t port_no;           /* Port number. */
39
40
    struct list packets;        /* Contains "struct ofpbuf"s. */
40
41
    int n;                      /* Number of packets in 'packets'. */
41
42
};
101
102
}
102
103
 
103
104
static struct pinqueue *
104
 
pinqueue_get(struct pinsched *ps, uint16_t port_no)
 
105
pinqueue_get(struct pinsched *ps, ofp_port_t port_no)
105
106
{
106
 
    uint32_t hash = hash_int(port_no, 0);
 
107
    uint32_t hash = hash_ofp_port(port_no);
107
108
    struct pinqueue *q;
108
109
 
109
110
    HMAP_FOR_EACH_IN_BUCKET (q, node, hash, &ps->queues) {
184
185
}
185
186
 
186
187
void
187
 
pinsched_send(struct pinsched *ps, uint16_t port_no,
 
188
pinsched_send(struct pinsched *ps, ofp_port_t port_no,
188
189
              struct ofpbuf *packet, pinsched_tx_cb *cb, void *aux)
189
190
{
190
191
    if (!ps) {