#include "netdev.h"
#include "ofpbuf.h"
#include "ofproto.h"
+#include "packets.h"
#include "poll-loop.h"
#include "sflow_api.h"
#include "socket-util.h"
const union odp_action *actions;
struct ofpbuf payload;
size_t n_actions, n_outputs;
+ struct flow flow;
size_t min_size;
- flow_t flow;
size_t i;
/* Get odp_sflow_sample_header. */
n_outputs = 0;
for (i = 0; i < n_actions; i++) {
const union odp_action *a = &actions[i];
+ uint16_t tci;
switch (a->type) {
case ODPAT_OUTPUT:
n_outputs++;
break;
- case ODPAT_SET_VLAN_VID:
- switchElem.flowType.sw.dst_vlan = ntohs(a->vlan_vid.vlan_vid);
- break;
-
- case ODPAT_SET_VLAN_PCP:
- switchElem.flowType.sw.dst_priority = a->vlan_pcp.vlan_pcp;
+ case ODPAT_SET_DL_TCI:
+ tci = a->dl_tci.tci;
+ switchElem.flowType.sw.dst_vlan = vlan_tci_to_vid(tci);
+ switchElem.flowType.sw.dst_priority = vlan_tci_to_pcp(tci);
break;
default: