- nskb = skb->next;
- skb->next = NULL;
-
- len = sizeof(struct odp_packet);
- len += nla_total_size(4); /* ODP_PACKET_ATTR_TYPE. */
- len += nla_total_size(skb->len);
- len += nla_total_size(FLOW_BUFSIZE);
- if (upcall_info->userdata)
- len += nla_total_size(8);
- if (upcall_info->sample_pool)
- len += nla_total_size(4);
- if (upcall_info->actions_len)
- len += nla_total_size(upcall_info->actions_len);
-
- user_skb = alloc_skb(len, GFP_ATOMIC);
- if (!user_skb)
- goto err_kfree_skbs;
-
- upcall = (struct odp_packet *)__skb_put(user_skb, sizeof(*upcall));
- upcall->dp_idx = dp->dp_idx;
-
- nla_put_u32(user_skb, ODP_PACKET_ATTR_TYPE, upcall_info->type);
-
- nla = nla_nest_start(user_skb, ODP_PACKET_ATTR_KEY);
- flow_to_nlattrs(upcall_info->key, user_skb);
- nla_nest_end(user_skb, nla);
-
- if (upcall_info->userdata)
- nla_put_u64(user_skb, ODP_PACKET_ATTR_USERDATA, upcall_info->userdata);
- if (upcall_info->sample_pool)
- nla_put_u32(user_skb, ODP_PACKET_ATTR_SAMPLE_POOL, upcall_info->sample_pool);
- if (upcall_info->actions_len) {
- const struct nlattr *actions = upcall_info->actions;
- u32 actions_len = upcall_info->actions_len;
-
- nla = nla_nest_start(user_skb, ODP_PACKET_ATTR_ACTIONS);
- memcpy(__skb_put(user_skb, actions_len), actions, actions_len);
- nla_nest_end(user_skb, nla);
+ if (skb == segs && gso_type & SKB_GSO_UDP) {
+ /* The initial flow key extracted by ovs_flow_extract()
+ * in this case is for a first fragment, so we need to
+ * properly mark later fragments.
+ */
+ later_key = *upcall_info->key;
+ later_key.ip.frag = OVS_FRAG_TYPE_LATER;
+
+ later_info = *upcall_info;
+ later_info.key = &later_key;
+ upcall_info = &later_info;