#include <arpa/inet.h>
#include <stdint.h>
#include <stdlib.h>
+#include "flow.h"
#include "hash.h"
#include "hmap.h"
#include "ofpbuf.h"
struct pinqueue {
struct hmap_node node; /* In struct pinsched's 'queues' hmap. */
- uint16_t port_no; /* Port number. */
+ ofp_port_t port_no; /* Port number. */
struct list packets; /* Contains "struct ofpbuf"s. */
int n; /* Number of packets in 'packets'. */
};
}
static struct pinqueue *
-pinqueue_get(struct pinsched *ps, uint16_t port_no)
+pinqueue_get(struct pinsched *ps, ofp_port_t port_no)
{
- uint32_t hash = hash_int(port_no, 0);
+ uint32_t hash = hash_ofp_port(port_no);
struct pinqueue *q;
HMAP_FOR_EACH_IN_BUCKET (q, node, hash, &ps->queues) {
}
void
-pinsched_send(struct pinsched *ps, uint16_t port_no,
+pinsched_send(struct pinsched *ps, ofp_port_t port_no,
struct ofpbuf *packet, pinsched_tx_cb *cb, void *aux)
{
if (!ps) {