struct ovs_skb_cb is full on kernels < 3.11 due to compatibility code.
This patch removes the 'flow' member in order to make room for data
needed by layer 3 flow/port support that will be added in an upcoming
patch. The 'flow' memeber was chosen for removal because it's only used
in ovs_execute_actions().
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
}
/* Execute a list of actions against 'skb'. */
-int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, bool recirc)
+int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb,
+ struct sw_flow_actions *acts, bool recirc)
{
- struct sw_flow_actions *acts = rcu_dereference(OVS_CB(skb)->flow->sf_acts);
const u8 stack_cost = recirc ? RECIRC_STACK_COST : DEFAULT_STACK_COST;
struct loop_counter *loop;
int error;
struct sw_flow_key *pkt_key = OVS_CB(skb)->pkt_key;
struct datapath *dp = p->dp;
struct sw_flow *flow;
+ struct sw_flow_actions *sf_acts;
struct dp_stats_percpu *stats;
u64 *stats_counter;
u32 n_mask_hit;
goto out;
}
- OVS_CB(skb)->flow = flow;
+ ovs_flow_stats_update(flow, pkt_key->tp.flags, skb);
- ovs_flow_stats_update(OVS_CB(skb)->flow, pkt_key->tp.flags, skb);
- ovs_execute_actions(dp, skb, recirc);
+ sf_acts = rcu_dereference(flow->sf_acts);
+ ovs_execute_actions(dp, skb, sf_acts, recirc);
stats_counter = &stats->n_hit;
out:
struct sw_flow_actions *acts;
struct sk_buff *packet;
struct sw_flow *flow;
+ struct sw_flow_actions *sf_acts;
struct datapath *dp;
struct ethhdr *eth;
struct vport *input_vport;
goto err_flow_free;
rcu_assign_pointer(flow->sf_acts, acts);
- OVS_CB(packet)->flow = flow;
OVS_CB(packet)->pkt_key = &flow->key;
OVS_CB(skb)->egress_tun_info = NULL;
packet->priority = flow->key.phy.priority;
goto err_unlock;
OVS_CB(packet)->input_vport = input_vport;
+ sf_acts = rcu_dereference(flow->sf_acts);
local_bh_disable();
- err = ovs_execute_actions(dp, packet, false);
+ err = ovs_execute_actions(dp, packet, sf_acts, false);
local_bh_enable();
rcu_read_unlock();
/**
* struct ovs_skb_cb - OVS data in skb CB
- * @flow: The flow associated with this packet. May be %NULL if no flow.
* @pkt_key: The flow information extracted from the packet. Must be nonnull.
* @egress_tun_info: Tunnel information about this packet on egress path.
* NULL if the packet is not being tunneled.
* when a packet is received by OVS.
*/
struct ovs_skb_cb {
- struct sw_flow *flow;
struct sw_flow_key *pkt_key;
struct ovs_tunnel_info *egress_tun_info;
- struct vport *input_vport;
+ struct vport *input_vport;
};
#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 portid, u32 seq,
u8 cmd);
-int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, bool recirc);
+int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb,
+ struct sw_flow_actions *acts, bool recirc);
void ovs_dp_notify_wq(struct work_struct *work);
#define OVS_NLERR(fmt, ...) \