mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
dpif-netdev: Streamline miss handling.
This patch avoids the relatively inefficient miss handling processes dictated by the dpif process, by calling into ofproto-dpif directly through a callback. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -85,14 +85,7 @@ static struct ovs_mutex dp_netdev_mutex = OVS_MUTEX_INITIALIZER;
|
||||
static struct shash dp_netdevs OVS_GUARDED_BY(dp_netdev_mutex)
|
||||
= SHASH_INITIALIZER(&dp_netdevs);
|
||||
|
||||
struct dp_netdev_queue {
|
||||
unsigned int packet_count;
|
||||
|
||||
struct dpif_upcall upcalls[NETDEV_MAX_RX_BATCH];
|
||||
struct ofpbuf bufs[NETDEV_MAX_RX_BATCH];
|
||||
};
|
||||
|
||||
#define DP_NETDEV_QUEUE_INITIALIZER { .packet_count = 0 }
|
||||
static struct vlog_rate_limit upcall_rl = VLOG_RATE_LIMIT_INIT(600, 600);
|
||||
|
||||
/* Datapath based on the network device interface from netdev.h.
|
||||
*
|
||||
@@ -140,7 +133,8 @@ struct dp_netdev {
|
||||
/* Protects access to ofproto-dpif-upcall interface during revalidator
|
||||
* thread synchronization. */
|
||||
struct fat_rwlock upcall_rwlock;
|
||||
exec_upcall_cb *upcall_cb; /* Callback function for executing upcalls. */
|
||||
upcall_callback *upcall_cb; /* Callback function for executing upcalls. */
|
||||
void *upcall_aux;
|
||||
|
||||
/* Forwarding threads. */
|
||||
struct latch exit_latch;
|
||||
@@ -324,12 +318,6 @@ static void do_del_port(struct dp_netdev *dp, struct dp_netdev_port *)
|
||||
OVS_REQUIRES(dp->port_mutex);
|
||||
static int dpif_netdev_open(const struct dpif_class *, const char *name,
|
||||
bool create, struct dpif **);
|
||||
static int dp_netdev_queue_userspace_packet(struct dp_netdev_queue *,
|
||||
struct ofpbuf *, int type,
|
||||
const struct miniflow *,
|
||||
const struct nlattr *);
|
||||
static void dp_netdev_execute_userspace_queue(struct dp_netdev_queue *,
|
||||
struct dp_netdev *);
|
||||
static void dp_netdev_execute_actions(struct dp_netdev *dp,
|
||||
struct dpif_packet **, int c,
|
||||
bool may_steal, struct pkt_metadata *,
|
||||
@@ -478,6 +466,7 @@ create_dp_netdev(const char *name, const struct dpif_class *class,
|
||||
|
||||
/* Disable upcalls by default. */
|
||||
dp_netdev_disable_upcall(dp);
|
||||
dp->upcall_aux = NULL;
|
||||
dp->upcall_cb = NULL;
|
||||
|
||||
ovs_mutex_lock(&dp->port_mutex);
|
||||
@@ -1241,6 +1230,19 @@ dp_netdev_flow_add(struct dp_netdev *dp, struct match *match,
|
||||
classifier_insert(&dp->cls,
|
||||
CONST_CAST(struct cls_rule *, &netdev_flow->cr));
|
||||
|
||||
if (OVS_UNLIKELY(VLOG_IS_DBG_ENABLED())) {
|
||||
struct ds ds = DS_EMPTY_INITIALIZER;
|
||||
|
||||
ds_put_cstr(&ds, "flow_add: ");
|
||||
match_format(match, &ds, OFP_DEFAULT_PRIORITY);
|
||||
ds_put_cstr(&ds, ", actions:");
|
||||
format_odp_actions(&ds, actions, actions_len);
|
||||
|
||||
VLOG_DBG_RL(&upcall_rl, "%s", ds_cstr(&ds));
|
||||
|
||||
ds_destroy(&ds);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1859,6 +1861,48 @@ dp_netdev_count_packet(struct dp_netdev *dp, enum dp_stat_type type, int cnt)
|
||||
ovs_mutex_unlock(&bucket->mutex);
|
||||
}
|
||||
|
||||
static int
|
||||
dp_netdev_upcall(struct dp_netdev *dp, struct dpif_packet *packet_,
|
||||
struct flow *flow, struct flow_wildcards *wc,
|
||||
enum dpif_upcall_type type, const struct nlattr *userdata,
|
||||
struct ofpbuf *actions, struct ofpbuf *put_actions)
|
||||
{
|
||||
struct ofpbuf *packet = &packet_->ofpbuf;
|
||||
|
||||
if (type == DPIF_UC_MISS) {
|
||||
dp_netdev_count_packet(dp, DP_STAT_MISS, 1);
|
||||
}
|
||||
|
||||
if (OVS_UNLIKELY(!dp->upcall_cb)) {
|
||||
return ENODEV;
|
||||
}
|
||||
|
||||
if (OVS_UNLIKELY(!VLOG_DROP_DBG(&upcall_rl))) {
|
||||
struct ds ds = DS_EMPTY_INITIALIZER;
|
||||
struct ofpbuf key;
|
||||
char *packet_str;
|
||||
|
||||
ofpbuf_init(&key, 0);
|
||||
odp_flow_key_from_flow(&key, flow, &wc->masks, flow->in_port.odp_port,
|
||||
true);
|
||||
|
||||
packet_str = ofp_packet_to_string(ofpbuf_data(packet),
|
||||
ofpbuf_size(packet));
|
||||
|
||||
odp_flow_key_format(ofpbuf_data(&key), ofpbuf_size(&key), &ds);
|
||||
|
||||
VLOG_DBG("%s: %s upcall:\n%s\n%s", dp->name,
|
||||
dpif_upcall_type_to_string(type), ds_cstr(&ds), packet_str);
|
||||
|
||||
ofpbuf_uninit(&key);
|
||||
free(packet_str);
|
||||
ds_destroy(&ds);
|
||||
}
|
||||
|
||||
return dp->upcall_cb(packet, flow, type, userdata, actions, wc,
|
||||
put_actions, dp->upcall_aux);
|
||||
}
|
||||
|
||||
struct packet_batch {
|
||||
unsigned int packet_count;
|
||||
unsigned int byte_count;
|
||||
@@ -1913,12 +1957,12 @@ static void
|
||||
dp_netdev_input(struct dp_netdev *dp, struct dpif_packet **packets, int cnt,
|
||||
struct pkt_metadata *md)
|
||||
{
|
||||
struct dp_netdev_queue q = DP_NETDEV_QUEUE_INITIALIZER;
|
||||
struct packet_batch batches[NETDEV_MAX_RX_BATCH];
|
||||
struct netdev_flow_key keys[NETDEV_MAX_RX_BATCH];
|
||||
const struct miniflow *mfs[NETDEV_MAX_RX_BATCH]; /* NULL at bad packets. */
|
||||
struct cls_rule *rules[NETDEV_MAX_RX_BATCH];
|
||||
size_t n_batches, i;
|
||||
bool any_miss;
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (OVS_UNLIKELY(ofpbuf_size(&packets[i]->ofpbuf) < ETH_HEADER_LEN)) {
|
||||
@@ -1932,7 +1976,75 @@ dp_netdev_input(struct dp_netdev *dp, struct dpif_packet **packets, int cnt,
|
||||
mfs[i] = &keys[i].flow;
|
||||
}
|
||||
|
||||
classifier_lookup_miniflow_batch(&dp->cls, mfs, rules, cnt);
|
||||
any_miss = !classifier_lookup_miniflow_batch(&dp->cls, mfs, rules, cnt);
|
||||
if (OVS_UNLIKELY(any_miss) && !fat_rwlock_tryrdlock(&dp->upcall_rwlock)) {
|
||||
uint64_t actions_stub[512 / 8], slow_stub[512 / 8];
|
||||
struct ofpbuf actions, put_actions;
|
||||
struct match match;
|
||||
|
||||
ofpbuf_use_stub(&actions, actions_stub, sizeof actions_stub);
|
||||
ofpbuf_use_stub(&put_actions, slow_stub, sizeof slow_stub);
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
const struct dp_netdev_flow *netdev_flow;
|
||||
struct ofpbuf *add_actions;
|
||||
int error;
|
||||
|
||||
if (OVS_LIKELY(rules[i] || !mfs[i])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* It's possible that an earlier slow path execution installed
|
||||
* the rule this flow needs. In this case, it's a lot cheaper
|
||||
* to catch it here than execute a miss. */
|
||||
netdev_flow = dp_netdev_lookup_flow(dp, mfs[i]);
|
||||
if (netdev_flow) {
|
||||
rules[i] = CONST_CAST(struct cls_rule *, &netdev_flow->cr);
|
||||
continue;
|
||||
}
|
||||
|
||||
miniflow_expand(mfs[i], &match.flow);
|
||||
|
||||
ofpbuf_clear(&actions);
|
||||
ofpbuf_clear(&put_actions);
|
||||
|
||||
error = dp_netdev_upcall(dp, packets[i], &match.flow, &match.wc,
|
||||
DPIF_UC_MISS, NULL, &actions,
|
||||
&put_actions);
|
||||
if (OVS_UNLIKELY(error && error != ENOSPC)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* We can't allow the packet batching in the next loop to execute
|
||||
* the actions. Otherwise, if there are any slow path actions,
|
||||
* we'll send the packet up twice. */
|
||||
dp_netdev_execute_actions(dp, &packets[i], 1, false, md,
|
||||
ofpbuf_data(&actions),
|
||||
ofpbuf_size(&actions));
|
||||
|
||||
add_actions = ofpbuf_size(&put_actions)
|
||||
? &put_actions
|
||||
: &actions;
|
||||
|
||||
ovs_mutex_lock(&dp->flow_mutex);
|
||||
/* XXX: There's a brief race where this flow could have already
|
||||
* been installed since we last did the flow lookup. This could be
|
||||
* solved by moving the mutex lock outside the loop, but that's an
|
||||
* awful long time to be locking everyone out of making flow
|
||||
* installs. If we move to a per-core classifier, it would be
|
||||
* reasonable. */
|
||||
if (OVS_LIKELY(error != ENOSPC)
|
||||
&& !dp_netdev_lookup_flow(dp, mfs[i])) {
|
||||
dp_netdev_flow_add(dp, &match, ofpbuf_data(add_actions),
|
||||
ofpbuf_size(add_actions));
|
||||
}
|
||||
ovs_mutex_unlock(&dp->flow_mutex);
|
||||
}
|
||||
|
||||
ofpbuf_uninit(&actions);
|
||||
ofpbuf_uninit(&put_actions);
|
||||
fat_rwlock_unlock(&dp->upcall_rwlock);
|
||||
}
|
||||
|
||||
n_batches = 0;
|
||||
for (i = 0; i < cnt; i++) {
|
||||
@@ -1940,17 +2052,7 @@ dp_netdev_input(struct dp_netdev *dp, struct dpif_packet **packets, int cnt,
|
||||
struct packet_batch *batch;
|
||||
size_t j;
|
||||
|
||||
if (OVS_UNLIKELY(!mfs[i])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (OVS_UNLIKELY(!rules[i])) {
|
||||
struct ofpbuf *buf = &packets[i]->ofpbuf;
|
||||
|
||||
dp_netdev_count_packet(dp, DP_STAT_MISS, 1);
|
||||
dp_netdev_queue_userspace_packet(&q, buf, DPIF_UC_MISS,
|
||||
mfs[i], NULL);
|
||||
dpif_packet_delete(packets[i]);
|
||||
if (OVS_UNLIKELY(!rules[i] || !mfs[i])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1979,10 +2081,6 @@ dp_netdev_input(struct dp_netdev *dp, struct dpif_packet **packets, int cnt,
|
||||
for (i = 0; i < n_batches; i++) {
|
||||
packet_batch_execute(&batches[i], dp);
|
||||
}
|
||||
|
||||
if (q.packet_count) {
|
||||
dp_netdev_execute_userspace_queue(&q, dp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1996,86 +2094,16 @@ dp_netdev_port_input(struct dp_netdev *dp, struct dpif_packet **packets,
|
||||
dp_netdev_input(dp, packets, cnt, &md);
|
||||
}
|
||||
|
||||
static int
|
||||
dp_netdev_queue_userspace_packet(struct dp_netdev_queue *q,
|
||||
struct ofpbuf *packet, int type,
|
||||
const struct miniflow *key,
|
||||
const struct nlattr *userdata)
|
||||
{
|
||||
if (q->packet_count < NETDEV_MAX_RX_BATCH) {
|
||||
int cnt = q->packet_count;
|
||||
struct dpif_upcall *upcall = &q->upcalls[cnt];
|
||||
struct ofpbuf *buf = &q->bufs[cnt];
|
||||
size_t buf_size;
|
||||
struct flow flow;
|
||||
void *data;
|
||||
|
||||
upcall->type = type;
|
||||
|
||||
/* Allocate buffer big enough for everything. */
|
||||
buf_size = ODPUTIL_FLOW_KEY_BYTES;
|
||||
if (userdata) {
|
||||
buf_size += NLA_ALIGN(userdata->nla_len);
|
||||
}
|
||||
buf_size += ofpbuf_size(packet);
|
||||
ofpbuf_init(buf, buf_size);
|
||||
|
||||
/* Put ODP flow. */
|
||||
miniflow_expand(key, &flow);
|
||||
odp_flow_key_from_flow(buf, &flow, NULL, flow.in_port.odp_port, true);
|
||||
upcall->key = ofpbuf_data(buf);
|
||||
upcall->key_len = ofpbuf_size(buf);
|
||||
|
||||
/* Put userdata. */
|
||||
if (userdata) {
|
||||
upcall->userdata = ofpbuf_put(buf, userdata,
|
||||
NLA_ALIGN(userdata->nla_len));
|
||||
}
|
||||
|
||||
/* We have to perform a copy of the packet, because we cannot send DPDK
|
||||
* mbufs to a non pmd thread. When the upcall processing will be done
|
||||
* in the pmd thread, this copy can be avoided */
|
||||
data = ofpbuf_put(buf, ofpbuf_data(packet), ofpbuf_size(packet));
|
||||
ofpbuf_use_stub(&upcall->packet, data, ofpbuf_size(packet));
|
||||
ofpbuf_set_size(&upcall->packet, ofpbuf_size(packet));
|
||||
|
||||
q->packet_count++;
|
||||
return 0;
|
||||
} else {
|
||||
return ENOBUFS;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dp_netdev_execute_userspace_queue(struct dp_netdev_queue *q,
|
||||
struct dp_netdev *dp)
|
||||
{
|
||||
struct dpif_upcall *upcalls = q->upcalls;
|
||||
struct ofpbuf *bufs = q->bufs;
|
||||
int cnt = q->packet_count;
|
||||
|
||||
if (!fat_rwlock_tryrdlock(&dp->upcall_rwlock)) {
|
||||
ovs_assert(dp->upcall_cb);
|
||||
dp->upcall_cb(dp->dpif, upcalls, bufs, cnt);
|
||||
fat_rwlock_unlock(&dp->upcall_rwlock);
|
||||
} else {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
ofpbuf_uninit(&bufs[i]);
|
||||
ofpbuf_uninit(&upcalls[i].packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct dp_netdev_execute_aux {
|
||||
struct dp_netdev *dp;
|
||||
};
|
||||
|
||||
static void
|
||||
dpif_netdev_register_upcall_cb(struct dpif *dpif, exec_upcall_cb *cb)
|
||||
dpif_netdev_register_upcall_cb(struct dpif *dpif, upcall_callback *cb,
|
||||
void *aux)
|
||||
{
|
||||
struct dp_netdev *dp = get_dp_netdev(dpif);
|
||||
dp->upcall_aux = aux;
|
||||
dp->upcall_cb = cb;
|
||||
}
|
||||
|
||||
@@ -2086,14 +2114,15 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, int cnt,
|
||||
OVS_NO_THREAD_SAFETY_ANALYSIS
|
||||
{
|
||||
struct dp_netdev_execute_aux *aux = aux_;
|
||||
uint32_t *depth = recirc_depth_get();
|
||||
struct dp_netdev *dp = aux->dp;
|
||||
int type = nl_attr_type(a);
|
||||
struct dp_netdev_port *p;
|
||||
uint32_t *depth = recirc_depth_get();
|
||||
int i;
|
||||
|
||||
switch ((enum ovs_action_attr)type) {
|
||||
case OVS_ACTION_ATTR_OUTPUT:
|
||||
p = dp_netdev_lookup_port(aux->dp, u32_to_odp(nl_attr_get_u32(a)));
|
||||
p = dp_netdev_lookup_port(dp, u32_to_odp(nl_attr_get_u32(a)));
|
||||
if (OVS_LIKELY(p)) {
|
||||
netdev_send(p->netdev, packets, cnt, may_steal);
|
||||
} else if (may_steal) {
|
||||
@@ -2103,35 +2132,39 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, int cnt,
|
||||
}
|
||||
break;
|
||||
|
||||
case OVS_ACTION_ATTR_USERSPACE: {
|
||||
const struct nlattr *userdata;
|
||||
struct netdev_flow_key key;
|
||||
struct dp_netdev_queue q = DP_NETDEV_QUEUE_INITIALIZER;
|
||||
case OVS_ACTION_ATTR_USERSPACE:
|
||||
if (!fat_rwlock_tryrdlock(&dp->upcall_rwlock)) {
|
||||
const struct nlattr *userdata;
|
||||
struct ofpbuf actions;
|
||||
struct flow flow;
|
||||
|
||||
userdata = nl_attr_find_nested(a, OVS_USERSPACE_ATTR_USERDATA);
|
||||
userdata = nl_attr_find_nested(a, OVS_USERSPACE_ATTR_USERDATA);
|
||||
ofpbuf_init(&actions, 0);
|
||||
|
||||
miniflow_initialize(&key.flow, key.buf);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
int error;
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
struct ofpbuf *packet;
|
||||
ofpbuf_clear(&actions);
|
||||
|
||||
packet = &packets[i]->ofpbuf;
|
||||
flow_extract(&packets[i]->ofpbuf, md, &flow);
|
||||
error = dp_netdev_upcall(dp, packets[i], &flow, NULL,
|
||||
DPIF_UC_ACTION, userdata, &actions,
|
||||
NULL);
|
||||
if (!error || error == ENOSPC) {
|
||||
dp_netdev_execute_actions(dp, &packets[i], 1, false, md,
|
||||
ofpbuf_data(&actions),
|
||||
ofpbuf_size(&actions));
|
||||
}
|
||||
|
||||
miniflow_extract(packet, md, &key.flow);
|
||||
|
||||
dp_netdev_queue_userspace_packet(&q, packet,
|
||||
DPIF_UC_ACTION, &key.flow,
|
||||
userdata);
|
||||
if (may_steal) {
|
||||
dpif_packet_delete(packets[i]);
|
||||
if (may_steal) {
|
||||
dpif_packet_delete(packets[i]);
|
||||
}
|
||||
}
|
||||
ofpbuf_uninit(&actions);
|
||||
fat_rwlock_unlock(&dp->upcall_rwlock);
|
||||
}
|
||||
|
||||
if (q.packet_count) {
|
||||
dp_netdev_execute_userspace_queue(&q, aux->dp);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case OVS_ACTION_ATTR_HASH: {
|
||||
const struct ovs_action_hash *hash_act;
|
||||
@@ -2185,7 +2218,7 @@ dp_execute_cb(void *aux_, struct dpif_packet **packets, int cnt,
|
||||
/* Hash is private to each packet */
|
||||
recirc_md.dp_hash = packets[i]->dp_hash;
|
||||
|
||||
dp_netdev_input(aux->dp, &recirc_pkt, 1, &recirc_md);
|
||||
dp_netdev_input(dp, &recirc_pkt, 1, &recirc_md);
|
||||
}
|
||||
(*depth)--;
|
||||
|
||||
|
@@ -347,8 +347,9 @@ struct dpif_class {
|
||||
* to register an upcall function and enable / disable upcalls.
|
||||
*
|
||||
* Registers an upcall callback function with 'dpif'. This is only used if
|
||||
* if 'dpif' directly executes upcall functions. */
|
||||
void (*register_upcall_cb)(struct dpif *, exec_upcall_cb *);
|
||||
* if 'dpif' directly executes upcall functions. 'aux' is passed to the
|
||||
* callback on invocation. */
|
||||
void (*register_upcall_cb)(struct dpif *, upcall_callback *, void *aux);
|
||||
|
||||
/* Enables upcalls if 'dpif' directly executes upcall functions. */
|
||||
void (*enable_upcall)(struct dpif *);
|
||||
|
@@ -1254,10 +1254,10 @@ dpif_handlers_set(struct dpif *dpif, uint32_t n_handlers)
|
||||
}
|
||||
|
||||
void
|
||||
dpif_register_upcall_cb(struct dpif *dpif, exec_upcall_cb *cb)
|
||||
dpif_register_upcall_cb(struct dpif *dpif, upcall_callback *cb, void *aux)
|
||||
{
|
||||
if (dpif->dpif_class->register_upcall_cb) {
|
||||
dpif->dpif_class->register_upcall_cb(dpif, cb);
|
||||
dpif->dpif_class->register_upcall_cb(dpif, cb, aux);
|
||||
}
|
||||
}
|
||||
|
||||
|
39
lib/dpif.h
39
lib/dpif.h
@@ -399,12 +399,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
struct dpif;
|
||||
struct ds;
|
||||
struct flow;
|
||||
struct nlattr;
|
||||
struct sset;
|
||||
struct dpif_class;
|
||||
struct dpif_flow;
|
||||
struct ds;
|
||||
struct flow;
|
||||
struct flow_wildcards;
|
||||
struct nlattr;
|
||||
struct sset;
|
||||
|
||||
int dp_register_provider(const struct dpif_class *);
|
||||
int dp_unregister_provider(const char *type);
|
||||
@@ -737,8 +738,33 @@ struct dpif_upcall {
|
||||
struct nlattr *userdata; /* Argument to OVS_ACTION_ATTR_USERSPACE. */
|
||||
};
|
||||
|
||||
typedef void exec_upcall_cb(struct dpif *, struct dpif_upcall *,
|
||||
struct ofpbuf *, int cnt);
|
||||
/* A callback to process an upcall, currently implemented only by dpif-netdev.
|
||||
*
|
||||
* The caller provides the 'packet' and 'flow' to process, the 'type' of the
|
||||
* upcall, and if 'type' is DPIF_UC_ACTION then the 'userdata' attached to the
|
||||
* action.
|
||||
*
|
||||
* The callback must fill in 'actions' with the datapath actions to apply to
|
||||
* 'packet'. 'wc' and 'put_actions' will either be both null or both nonnull.
|
||||
* If they are nonnull, then the caller will install a flow entry to process
|
||||
* all future packets that match 'flow' and 'wc'; the callback must store a
|
||||
* wildcard mask suitable for that purpose into 'wc'. If the actions to store
|
||||
* into the flow entry are the same as 'actions', then the callback may leave
|
||||
* 'put_actions' empty; otherwise it must store the desired actions into
|
||||
* 'put_actions'.
|
||||
*
|
||||
* Returns 0 if successful, ENOSPC if the flow limit has been reached and no
|
||||
* flow should be installed, or some otherwise a positive errno value. */
|
||||
typedef int upcall_callback(const struct ofpbuf *packet,
|
||||
const struct flow *flow,
|
||||
enum dpif_upcall_type type,
|
||||
const struct nlattr *userdata,
|
||||
struct ofpbuf *actions,
|
||||
struct flow_wildcards *wc,
|
||||
struct ofpbuf *put_actions,
|
||||
void *aux);
|
||||
|
||||
void dpif_register_upcall_cb(struct dpif *, upcall_callback *, void *aux);
|
||||
|
||||
int dpif_recv_set(struct dpif *, bool enable);
|
||||
int dpif_handlers_set(struct dpif *, uint32_t n_handlers);
|
||||
@@ -746,7 +772,6 @@ int dpif_recv(struct dpif *, uint32_t handler_id, struct dpif_upcall *,
|
||||
struct ofpbuf *);
|
||||
void dpif_recv_purge(struct dpif *);
|
||||
void dpif_recv_wait(struct dpif *, uint32_t handler_id);
|
||||
void dpif_register_upcall_cb(struct dpif *, exec_upcall_cb *);
|
||||
void dpif_enable_upcall(struct dpif *);
|
||||
void dpif_disable_upcall(struct dpif *);
|
||||
|
||||
|
@@ -246,14 +246,13 @@ static void ukey_delete(struct revalidator *, struct udpif_key *);
|
||||
static enum upcall_type classify_upcall(enum dpif_upcall_type type,
|
||||
const struct nlattr *userdata);
|
||||
|
||||
static void exec_upcalls(struct dpif *, struct dpif_upcall *, struct ofpbuf *,
|
||||
int cnt);
|
||||
|
||||
static int upcall_receive(struct upcall *, const struct dpif_backer *,
|
||||
const struct ofpbuf *packet, enum dpif_upcall_type,
|
||||
const struct nlattr *userdata, const struct flow *);
|
||||
static void upcall_uninit(struct upcall *);
|
||||
|
||||
static upcall_callback upcall_cb;
|
||||
|
||||
static atomic_bool enable_megaflows = ATOMIC_VAR_INIT(true);
|
||||
|
||||
struct udpif *
|
||||
@@ -288,7 +287,7 @@ udpif_create(struct dpif_backer *backer, struct dpif *dpif)
|
||||
atomic_init(&udpif->n_flows_timestamp, LLONG_MIN);
|
||||
ovs_mutex_init(&udpif->n_flows_mutex);
|
||||
|
||||
dpif_register_upcall_cb(dpif, exec_upcalls);
|
||||
dpif_register_upcall_cb(dpif, upcall_cb, udpif);
|
||||
|
||||
return udpif;
|
||||
}
|
||||
@@ -921,77 +920,53 @@ upcall_uninit(struct upcall *upcall)
|
||||
}
|
||||
}
|
||||
|
||||
static struct udpif *
|
||||
find_udpif(struct dpif *dpif)
|
||||
static int
|
||||
upcall_cb(const struct ofpbuf *packet, const struct flow *flow,
|
||||
enum dpif_upcall_type type, const struct nlattr *userdata,
|
||||
struct ofpbuf *actions, struct flow_wildcards *wc,
|
||||
struct ofpbuf *put_actions, void *aux)
|
||||
{
|
||||
struct udpif *udpif;
|
||||
struct udpif *udpif = aux;
|
||||
unsigned int flow_limit;
|
||||
struct upcall upcall;
|
||||
bool megaflow;
|
||||
int error;
|
||||
|
||||
LIST_FOR_EACH (udpif, list_node, &all_udpifs) {
|
||||
if (udpif->dpif == dpif) {
|
||||
return udpif;
|
||||
error = upcall_receive(&upcall, udpif->backer, packet, type, userdata,
|
||||
flow);
|
||||
if (error) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
error = process_upcall(udpif, &upcall, actions);
|
||||
if (error) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (upcall.xout.slow && put_actions) {
|
||||
ofpbuf_put(put_actions, ofpbuf_data(&upcall.put_actions),
|
||||
ofpbuf_size(&upcall.put_actions));
|
||||
}
|
||||
|
||||
if (wc) {
|
||||
atomic_read(&enable_megaflows, &megaflow);
|
||||
if (megaflow) {
|
||||
/* XXX: This could be avoided with sufficient API changes. */
|
||||
*wc = upcall.xout.wc;
|
||||
} else {
|
||||
memset(wc, 0xff, sizeof *wc);
|
||||
flow_wildcards_clear_non_packet_fields(wc);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
exec_upcalls(struct dpif *dpif, struct dpif_upcall *dupcalls,
|
||||
struct ofpbuf *bufs OVS_UNUSED, int cnt)
|
||||
{
|
||||
struct upcall upcalls[UPCALL_MAX_BATCH];
|
||||
struct udpif *udpif;
|
||||
int i, j;
|
||||
|
||||
udpif = find_udpif(dpif);
|
||||
ovs_assert(udpif);
|
||||
|
||||
for (i = 0; i < cnt; i += UPCALL_MAX_BATCH) {
|
||||
size_t n_upcalls = 0;
|
||||
for (j = i; j < MIN(i + UPCALL_MAX_BATCH, cnt); j++) {
|
||||
struct upcall *upcall = &upcalls[n_upcalls];
|
||||
struct dpif_upcall *dupcall = &dupcalls[j];
|
||||
struct pkt_metadata md;
|
||||
struct flow flow;
|
||||
int error;
|
||||
|
||||
dpif_print_packet(dpif, dupcall);
|
||||
|
||||
if (odp_flow_key_to_flow(dupcall->key, dupcall->key_len, &flow)
|
||||
== ODP_FIT_ERROR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
error = upcall_receive(upcall, udpif->backer, &dupcall->packet,
|
||||
dupcall->type, dupcall->userdata, &flow);
|
||||
if (error) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
upcall->key = dupcall->key;
|
||||
upcall->key_len = dupcall->key_len;
|
||||
|
||||
md = pkt_metadata_from_flow(&flow);
|
||||
flow_extract(&dupcall->packet, &md, &flow);
|
||||
|
||||
error = process_upcall(udpif, upcall, NULL);
|
||||
if (error) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
n_upcalls++;
|
||||
continue;
|
||||
|
||||
cleanup:
|
||||
upcall_uninit(upcall);
|
||||
}
|
||||
|
||||
if (n_upcalls) {
|
||||
handle_upcalls(udpif, upcalls, n_upcalls);
|
||||
for (j = 0; j < n_upcalls; j++) {
|
||||
upcall_uninit(&upcalls[j]);
|
||||
}
|
||||
}
|
||||
atomic_read(&udpif->flow_limit, &flow_limit);
|
||||
if (udpif_get_n_flows(udpif) >= flow_limit) {
|
||||
error = ENOSPC;
|
||||
}
|
||||
|
||||
out:
|
||||
upcall_uninit(&upcall);
|
||||
return error;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@@ -9,8 +9,8 @@ m4_define([STRIP_XOUT], [[sed '
|
||||
s/bytes:[0-9]*/bytes:0/
|
||||
' | sort]])
|
||||
m4_define([FILTER_FLOW_INSTALL], [[
|
||||
grep ' put' | sed '
|
||||
s/.*put\[create\] //
|
||||
grep 'flow_add' | sed '
|
||||
s/.*flow_add: //
|
||||
' | sort | uniq]])
|
||||
m4_define([FILTER_FLOW_DUMP], [[
|
||||
grep 'flow_dump ' | sed '
|
||||
@@ -32,7 +32,7 @@ OVS_VSWITCHD_START(
|
||||
fail-mode=secure -- \
|
||||
add-port br1 p2 -- set interface p2 type=dummy options:stream=unix:$OVS_RUNDIR/p0.sock ofport_request=2 -- \
|
||||
add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-ofctl add-flow br1 action=normal])
|
||||
@@ -44,10 +44,10 @@ ovs-appctl time/warp 100
|
||||
sleep 1 # wait for forwarders process packets
|
||||
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3/0.0.0.0,dst=10.0.0.4/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(2),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(8),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3/0.0.0.0,dst=10.0.0.4/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=2,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=8,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
|
||||
])
|
||||
|
||||
OVS_VSWITCHD_STOP
|
||||
@@ -58,7 +58,7 @@ OVS_VSWITCHD_START(
|
||||
[add-port br0 p1 -- set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p0.sock
|
||||
set bridge br0 datapath-type=dummy other-config:datapath-id=1234 \
|
||||
fail-mode=secure])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
@@ -68,7 +68,7 @@ AT_CHECK([cat ovs-vswitchd.log | grep -A 1 'miss upcall' | tail -n 1], [0], [dnl
|
||||
skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)
|
||||
])
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
])
|
||||
|
||||
# Now, the same again without megaflows.
|
||||
@@ -81,8 +81,8 @@ AT_CHECK([cat ovs-vswitchd.log | grep -A 1 'miss upcall' | tail -n 1], [0], [dnl
|
||||
skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)
|
||||
])
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
pkt_mark=0,recirc_id=0,skb_priority=0,icmp,tun_id=0,tun_src=0.0.0.0,tun_dst=0.0.0.0,tun_tos=0,tun_ttl=0,,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,mpls_label=0,mpls_tc=0,mpls_ttl=0,mpls_bos=0,mpls_lse1=0,mpls_lse2=0,icmp_type=8,icmp_code=0, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
])
|
||||
|
||||
OVS_VSWITCHD_STOP
|
||||
@@ -93,7 +93,7 @@ OVS_VSWITCHD_START(
|
||||
[add-port br0 p1 -- set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p0.sock
|
||||
set bridge br0 datapath-type=dummy other-config:datapath-id=1234 \
|
||||
fail-mode=secure])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
|
@@ -23,7 +23,7 @@ OVS_VSWITCHD_START(
|
||||
add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
|
||||
add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
|
||||
WAIT_FOR_DUMMY_PORTS([p3], [p4])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-ofctl add-flow br1 action=normal])
|
||||
@@ -42,13 +42,13 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
ovs-appctl time/warp 200 100
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | grep 'in_port([[348]])' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3/0.0.0.0,dst=10.0.0.4/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(sip=0.0.0.0/0.0.0.0,tip=0.0.0.0/0.0.0.0,op=3/0,sha=50:54:00:00:00:09/00:00:00:00:00:00,tha=50:54:00:00:00:09/00:00:00:00:00:00), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:0b,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(sip=0.0.0.0/0.0.0.0,tip=0.0.0.0/0.0.0.0,op=3/0,sha=50:54:00:00:00:0b/00:00:00:00:00:00,tha=50:54:00:00:00:0b/00:00:00:00:00:00), actions: <del>
|
||||
AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[348]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
recirc_id=0,skb_priority=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0d,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0e,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
|
||||
recirc_id=0,skb_priority=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
@@ -4611,7 +4611,7 @@ AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
|
||||
OVS_VSWITCHD_START([dnl
|
||||
add-port br0 p1 -- set Interface p1 type=dummy
|
||||
])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ON_EXIT([kill `cat ovs-ofctl.pid`])
|
||||
|
||||
AT_CAPTURE_FILE([ofctl_monitor.log])
|
||||
@@ -4635,8 +4635,8 @@ for dl_src in 00 01; do
|
||||
done
|
||||
sleep 1 # wait for the datapath flow installed
|
||||
for dl_src in 00 01; do
|
||||
AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src/" | STRIP_USED], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
|
||||
AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep "$dl_src," | STRIP_USED], [0], [dnl
|
||||
recirc_id=0,skb_priority=0,mpls,in_port=1,dl_src=60:66:66:66:66:$dl_src,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208,mpls_lse2=0, actions:userspace(pid=0,slow_path(controller))
|
||||
])
|
||||
done
|
||||
|
||||
@@ -4648,7 +4648,7 @@ AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
|
||||
OVS_VSWITCHD_START([dnl
|
||||
add-port br0 p1 -- set Interface p1 type=dummy
|
||||
])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ON_EXIT([kill `cat ovs-ofctl.pid`])
|
||||
|
||||
AT_CAPTURE_FILE([ofctl_monitor.log])
|
||||
@@ -4675,8 +4675,8 @@ for dl_src in 00 01; do
|
||||
done
|
||||
sleep 1 # wait for the datapath flow installed
|
||||
for dl_src in 00 01; do
|
||||
AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src/" | STRIP_USED], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
|
||||
AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep "$dl_src," | STRIP_USED], [0], [dnl
|
||||
recirc_id=0,skb_priority=0,mpls,in_port=1,dl_src=60:66:66:66:66:$dl_src,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208,mpls_lse2=0, actions:userspace(pid=0,slow_path(controller))
|
||||
])
|
||||
done
|
||||
|
||||
@@ -4693,7 +4693,7 @@ ADD_OF_PORTS([br0], [2])
|
||||
ADD_OF_PORTS([br1], [3])
|
||||
|
||||
AT_CHECK([ovs-appctl time/stop])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
|
||||
AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
|
||||
AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
|
||||
@@ -4730,8 +4730,8 @@ dummy@ovs-dummy: hit:13 missed:2
|
||||
])
|
||||
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(100),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:101,3,2
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(101),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:100,2,3
|
||||
recirc_id=0,skb_priority=0,ip,in_port=100,nw_frag=no, actions:101,3,2
|
||||
recirc_id=0,skb_priority=0,ip,in_port=101,nw_frag=no, actions:100,2,3
|
||||
])
|
||||
|
||||
AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | FILTER_FLOW_DUMP], [0], [dnl
|
||||
@@ -4778,7 +4778,7 @@ AT_BANNER([ofproto-dpif -- megaflows])
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - port classification])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1 actions=output(2)
|
||||
@@ -4789,14 +4789,14 @@ sleep 1
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - L2 classification])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
|
||||
@@ -4806,15 +4806,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:00:00:00:02,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - L3 classification])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=nw_dst,nw_src], [0], [ignore], [])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
@@ -4825,15 +4825,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.2,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0xff,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=ipv6_dst,ipv6_src], [0], [ignore], [])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
@@ -4844,15 +4844,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1,dst=2001:db8:3c4d:1:2:3:4:1,label=0,proto=99,tclass=0x70,hlimit=64,frag=no)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,dst=fe80::2/::,label=0/0,proto=10/0,tclass=0x70/0,hlimit=128/0,frag=no/0xff), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:0:4::,dst=2001:db8:3c4d:1:2:3:4:1/::,label=0/0,proto=99/0,tclass=0x70/0,hlimit=64/0,frag=no/0xff), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:0:4::,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - L4 classification])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
|
||||
@@ -4863,29 +4863,29 @@ sleep 1
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0xff,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0xff,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - normal])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - mpls])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
|
||||
@@ -4896,8 +4896,8 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
|
||||
recirc_id=0,skb_priority=0,mpls,in_port=1,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1,mpls_lse1=0,mpls_lse2=0, actions: <del>
|
||||
recirc_id=0,skb_priority=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1,mpls_lse1=0,mpls_lse2=0, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
@@ -4908,7 +4908,7 @@ AT_CLEANUP
|
||||
m4_define([CHECK_MEGAFLOW_NETFLOW],
|
||||
[AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
|
||||
dnl NetFlow configuration disables wildcarding relevant fields
|
||||
@@ -4926,8 +4926,8 @@ m4_define([CHECK_MEGAFLOW_NETFLOW],
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/255.255.255.255,proto=1/0xff,tos=0/0xfc,ttl=64/0,frag=no/0xff),icmp(type=8,code=0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/255.255.255.255,proto=1/0xff,tos=0/0xfc,ttl=64/0,frag=no/0xff),icmp(type=8,code=0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del>
|
||||
recirc_id=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP])
|
||||
@@ -4943,15 +4943,15 @@ OVS_VSWITCHD_START(
|
||||
set interface p3 type=dummy ofport_request=3])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
|
||||
])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
@@ -4964,15 +4964,15 @@ OVS_VSWITCHD_START(
|
||||
set interface p3 type=dummy ofport_request=3])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
|
||||
])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
@@ -4999,7 +4999,7 @@ OVS_VSWITCHD_START(
|
||||
|
||||
AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
|
||||
])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [7])
|
||||
AT_CHECK([ovs-ofctl add-flow br0 action=normal])
|
||||
AT_CHECK([ovs-ofctl add-flow br1 action=normal])
|
||||
@@ -5009,15 +5009,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - resubmit port action])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1,ip actions=resubmit(90)
|
||||
@@ -5028,15 +5028,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:00:00:00:02,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - resubmit table action])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1,ip actions=resubmit(,1)
|
||||
@@ -5048,15 +5048,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - goto_table action])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1,ip actions=goto_table(1)
|
||||
@@ -5067,15 +5067,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2], [3])
|
||||
ovs-vsctl \
|
||||
set Bridge br0 mirrors=@m --\
|
||||
@@ -5091,14 +5091,14 @@ sleep 1
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2], [3])
|
||||
ovs-vsctl \
|
||||
set Bridge br0 mirrors=@m --\
|
||||
@@ -5113,15 +5113,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8100),vlan(vid=11/0xfff,pcp=7/0x0,cfi=1/1),encap(eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0)), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - move action])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
|
||||
@@ -5133,15 +5133,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - push action])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
|
||||
@@ -5151,15 +5151,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - learning])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1 actions=load:2->NXM_NX_REG0[[0..15]],learn(table=1,priority=65535,NXM_OF_ETH_SRC[[]],NXM_OF_VLAN_TCI[[0..11]],output:NXM_NX_REG0[[0..15]]),output:2
|
||||
@@ -5178,8 +5178,8 @@ done
|
||||
sleep 1
|
||||
dnl The original flow is missing due to a revalidation.
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
@@ -5187,7 +5187,7 @@ AT_CLEANUP
|
||||
AT_SETUP([ofproto-dpif megaflow - tunnels])
|
||||
OVS_VSWITCHD_START(
|
||||
[add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
|
||||
options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
|
||||
AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
|
||||
@@ -5210,16 +5210,16 @@ sleep 1
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0xfd/0x3,ttl=128/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(3),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0xfd/0xff,ttl=128/0xff,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(3),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0x1/0xff,ttl=64/0xff,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - dec_ttl])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=nw_dst,nw_src], [0], [ignore], [])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
@@ -5230,15 +5230,15 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:
|
||||
AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.2,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8/0,code=0/0), actions: <del>
|
||||
recirc_id=0,skb_priority=0,icmp,in_port=1,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_ecn=0,nw_ttl=64, actions: <del>
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - set dl_dst])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
|
||||
@@ -5258,15 +5258,15 @@ dnl MAC, so both the source and destination MAC addresses are
|
||||
dnl un-wildcarded, since the ODP commit functions update both the source
|
||||
dnl and destination MAC addresses.
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/ff:ff:ff:ff:ff:ff),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:2
|
||||
skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:set(eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a)),2
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
|
||||
recirc_id=0,skb_priority=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions:set(eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a)),2
|
||||
])
|
||||
OVS_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([ofproto-dpif megaflow - disabled])
|
||||
OVS_VSWITCHD_START
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg])
|
||||
AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
|
||||
ADD_OF_PORTS([br0], [1], [2])
|
||||
AT_DATA([flows.txt], [dnl
|
||||
table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
|
||||
@@ -5285,8 +5285,8 @@ for i in 1 2 3 4; do
|
||||
done
|
||||
sleep 1
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
|
||||
skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions:2
|
||||
skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions:drop
|
||||
pkt_mark=0,recirc_id=0,skb_priority=0,icmp,tun_id=0,tun_src=0.0.0.0,tun_dst=0.0.0.0,tun_tos=0,tun_ttl=0,,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,mpls_label=0,mpls_tc=0,mpls_ttl=0,mpls_bos=0,mpls_lse1=0,mpls_lse2=0,icmp_type=8,icmp_code=0, actions:2
|
||||
pkt_mark=0,recirc_id=0,skb_priority=0,icmp,tun_id=0,tun_src=0.0.0.0,tun_dst=0.0.0.0,tun_tos=0,tun_ttl=0,,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_ecn=0,nw_ttl=64,mpls_label=0,mpls_tc=0,mpls_ttl=0,mpls_bos=0,mpls_lse1=0,mpls_lse2=0,icmp_type=8,icmp_code=0, actions:drop
|
||||
])
|
||||
AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
|
||||
skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), packets:3, bytes:180, used:0.0s, actions:2
|
||||
|
Reference in New Issue
Block a user