On packet recv OVS CB is initialized in multiple function.
Following patch moves all these initialization to
ovs_vport_receive().
This patch also save a check in execute actions.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
goto out_loop;
}
- if (!recirc)
- ovs_skb_init_inner_protocol(skb);
-
OVS_CB(skb)->tun_info = NULL;
error = do_execute_actions(dp, skb, acts->actions, acts->actions_len);
}
/* Must be called with rcu_read_lock. */
-void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
+void ovs_dp_process_received_packet(struct sk_buff *skb)
{
int error;
struct sw_flow_key key;
- OVS_CB(skb)->input_vport = p;
-
/* Extract flow from 'skb' into 'key'. */
- error = ovs_flow_extract(skb, p->port_no, &key);
+ error = ovs_flow_extract(skb, OVS_CB(skb)->input_vport->port_no, &key);
if (unlikely(error)) {
kfree_skb(skb);
return;
extern struct genl_family dp_vport_genl_family;
extern struct genl_multicast_group ovs_dp_vport_multicast_group;
-void ovs_dp_process_received_packet(struct vport *, struct sk_buff *);
+void ovs_dp_process_received_packet(struct sk_buff *);
void ovs_dp_process_packet_with_key(struct sk_buff *,
struct sw_flow_key *pkt_key, bool recirc);
void ovs_dp_detach_port(struct vport *);
#include <net/net_namespace.h>
#include "datapath.h"
+#include "gso.h"
#include "vport.h"
#include "vport-internal_dev.h"
stats->rx_bytes += skb->len;
u64_stats_update_end(&stats->syncp);
+ ovs_skb_init_inner_protocol(skb);
OVS_CB(skb)->tun_info = tun_info;
- ovs_dp_process_received_packet(vport, skb);
+ OVS_CB(skb)->input_vport = vport;
+ ovs_dp_process_received_packet(skb);
}
/**