/*
- * Copyright (c) 2009, 2010 Nicira Networks.
+ * Copyright (c) 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* Actions. */
struct nlattr *actions;
- unsigned int actions_len;
+ size_t actions_len;
};
/* Interface to netdev-based datapath. */
static int dpif_netdev_open(const struct dpif_class *, const char *name,
bool create, struct dpif **);
static int dp_netdev_output_control(struct dp_netdev *, const struct ofpbuf *,
- int queue_no, int port_no, uint32_t arg);
+ int queue_no, int port_no, uint64_t arg);
static int dp_netdev_execute_actions(struct dp_netdev *,
struct ofpbuf *, struct flow *,
const struct nlattr *actions,
- unsigned int actions_len);
+ size_t actions_len);
static struct dpif_class dpif_dummy_class;
static int
dpif_netdev_validate_actions(const struct nlattr *actions,
- unsigned int actions_len, bool *mutates)
+ size_t actions_len, bool *mutates)
{
const struct nlattr *a;
unsigned int left;
static int
dpif_netdev_execute(struct dpif *dpif,
- const struct nlattr *actions, unsigned int actions_len,
+ const struct nlattr *actions, size_t actions_len,
const struct ofpbuf *packet)
{
struct dp_netdev *dp = get_dp_netdev(dpif);
if (!error) {
dp_netdev_port_input(dp, port, &packet);
} else if (error != EAGAIN && error != EOPNOTSUPP) {
- struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
VLOG_ERR_RL(&rl, "error receiving data from %s: %s",
netdev_get_name(port->netdev), strerror(error));
}
}
static void
-dp_netdev_set_nw_addr(struct ofpbuf *packet, struct flow *key,
+dp_netdev_set_nw_addr(struct ofpbuf *packet, const struct flow *key,
const struct nlattr *a)
{
if (is_ip(packet, key)) {
}
static void
-dp_netdev_set_nw_tos(struct ofpbuf *packet, struct flow *key, uint8_t nw_tos)
+dp_netdev_set_nw_tos(struct ofpbuf *packet, const struct flow *key,
+ uint8_t nw_tos)
{
if (is_ip(packet, key)) {
struct ip_header *nh = packet->l3;
}
static void
-dp_netdev_set_tp_port(struct ofpbuf *packet, struct flow *key,
+dp_netdev_set_tp_port(struct ofpbuf *packet, const struct flow *key,
const struct nlattr *a)
{
if (is_ip(packet, key)) {
static int
dp_netdev_output_control(struct dp_netdev *dp, const struct ofpbuf *packet,
- int queue_no, int port_no, uint32_t arg)
+ int queue_no, int port_no, uint64_t arg)
{
struct odp_msg *header;
struct ofpbuf *msg;
dp_netdev_execute_actions(struct dp_netdev *dp,
struct ofpbuf *packet, struct flow *key,
const struct nlattr *actions,
- unsigned int actions_len)
+ size_t actions_len)
{
const struct nlattr *a;
unsigned int left;
case ODPAT_CONTROLLER:
dp_netdev_output_control(dp, packet, _ODPL_ACTION_NR,
- key->in_port, nl_attr_get_u32(a));
+ key->in_port, nl_attr_get_u64(a));
break;
case ODPAT_SET_DL_TCI: