On vport ingress we already check for shared SKBs but then later
warn in several other places. In a similar vein, we check every
packet to see if it is LRO but only certain vports can produce
these packets. Remove and consolidate checks to the places where
they are needed.
static struct sk_buff *make_writable(struct sk_buff *skb, unsigned min_headroom, gfp_t gfp)
{
- if (skb_shared(skb) || skb_cloned(skb)) {
+ if (skb_cloned(skb)) {
struct sk_buff *nskb;
unsigned headroom = max(min_headroom, skb_headroom(skb));
OVS_CB(skb)->tun_id = 0;
for (; n_actions > 0; a++, n_actions--) {
- WARN_ON_ONCE(skb_shared(skb));
if (prev_port != -1) {
do_output(dp, skb_clone(skb, gfp), prev_port);
prev_port = -1;
struct odp_flow_key key;
struct tbl_node *flow_node;
- WARN_ON_ONCE(skb_shared(skb));
- skb_warn_if_lro(skb);
-
OVS_CB(skb)->dp_port = p;
if (flow_extract(skb, p ? p->port_no : ODPP_NONE, &key)) {
* (No one comes after us, since we tell handle_bridge() that we took
* the packet.) */
skb = skb_share_check(skb, GFP_ATOMIC);
- if (!skb)
+ if (unlikely(!skb))
return;
+ skb_warn_if_lro(skb);
+
/* Push the Ethernet header back on. */
skb_push(skb, ETH_HLEN);
skb_reset_mac_header(skb);