Lines Matching full:skb

43 	struct sk_buff *skb;  member
130 static struct deferred_action *add_deferred_actions(struct sk_buff *skb, in add_deferred_actions() argument
141 da->skb = skb; in add_deferred_actions()
160 static int clone_execute(struct datapath *dp, struct sk_buff *skb,
166 static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
170 static int push_mpls(struct sk_buff *skb, struct sw_flow_key *key, in push_mpls() argument
175 err = skb_mpls_push(skb, mpls_lse, mpls_ethertype, mac_len, !!mac_len); in push_mpls()
186 static int pop_mpls(struct sk_buff *skb, struct sw_flow_key *key, in pop_mpls() argument
191 err = skb_mpls_pop(skb, ethertype, skb->mac_len, in pop_mpls()
203 static int set_mpls(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_mpls() argument
210 if (!pskb_may_pull(skb, skb_network_offset(skb) + MPLS_HLEN)) in set_mpls()
213 stack = mpls_hdr(skb); in set_mpls()
215 err = skb_mpls_update_lse(skb, lse); in set_mpls()
223 static int pop_vlan(struct sk_buff *skb, struct sw_flow_key *key) in pop_vlan() argument
227 err = skb_vlan_pop(skb); in pop_vlan()
228 if (skb_vlan_tag_present(skb)) { in pop_vlan()
237 static int push_vlan(struct sk_buff *skb, struct sw_flow_key *key, in push_vlan() argument
242 if (skb_vlan_tag_present(skb)) { in push_vlan()
248 err = skb_vlan_push(skb, vlan->vlan_tpid, in push_vlan()
250 skb_reset_mac_len(skb); in push_vlan()
266 static int set_eth_addr(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_eth_addr() argument
272 err = skb_ensure_writable(skb, ETH_HLEN); in set_eth_addr()
276 skb_postpull_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2); in set_eth_addr()
278 ether_addr_copy_masked(eth_hdr(skb)->h_source, key->eth_src, in set_eth_addr()
280 ether_addr_copy_masked(eth_hdr(skb)->h_dest, key->eth_dst, in set_eth_addr()
283 skb_postpush_rcsum(skb, eth_hdr(skb), ETH_ALEN * 2); in set_eth_addr()
285 ether_addr_copy(flow_key->eth.src, eth_hdr(skb)->h_source); in set_eth_addr()
286 ether_addr_copy(flow_key->eth.dst, eth_hdr(skb)->h_dest); in set_eth_addr()
293 static int pop_eth(struct sk_buff *skb, struct sw_flow_key *key) in pop_eth() argument
297 err = skb_eth_pop(skb); in pop_eth()
307 static int push_eth(struct sk_buff *skb, struct sw_flow_key *key, in push_eth() argument
312 err = skb_eth_push(skb, ethh->addresses.eth_dst, in push_eth()
323 static noinline_for_stack int push_nsh(struct sk_buff *skb, in push_nsh() argument
335 err = nsh_push(skb, nh); in push_nsh()
345 static int pop_nsh(struct sk_buff *skb, struct sw_flow_key *key) in pop_nsh() argument
349 err = nsh_pop(skb); in pop_nsh()
354 if (skb->protocol == htons(ETH_P_TEB)) in pop_nsh()
362 static void update_ip_l4_checksum(struct sk_buff *skb, struct iphdr *nh, in update_ip_l4_checksum() argument
365 int transport_len = skb->len - skb_transport_offset(skb); in update_ip_l4_checksum()
372 inet_proto_csum_replace4(&tcp_hdr(skb)->check, skb, in update_ip_l4_checksum()
376 struct udphdr *uh = udp_hdr(skb); in update_ip_l4_checksum()
378 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ip_l4_checksum()
379 inet_proto_csum_replace4(&uh->check, skb, in update_ip_l4_checksum()
388 static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh, in set_ip_addr() argument
391 update_ip_l4_checksum(skb, nh, *addr, new_addr); in set_ip_addr()
393 skb_clear_hash(skb); in set_ip_addr()
394 ovs_ct_clear(skb, NULL); in set_ip_addr()
398 static void update_ipv6_checksum(struct sk_buff *skb, u8 l4_proto, in update_ipv6_checksum() argument
401 int transport_len = skb->len - skb_transport_offset(skb); in update_ipv6_checksum()
405 inet_proto_csum_replace16(&tcp_hdr(skb)->check, skb, in update_ipv6_checksum()
409 struct udphdr *uh = udp_hdr(skb); in update_ipv6_checksum()
411 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ipv6_checksum()
412 inet_proto_csum_replace16(&uh->check, skb, in update_ipv6_checksum()
420 inet_proto_csum_replace16(&icmp6_hdr(skb)->icmp6_cksum, in update_ipv6_checksum()
421 skb, addr, new_addr, true); in update_ipv6_checksum()
434 static void set_ipv6_addr(struct sk_buff *skb, u8 l4_proto, in set_ipv6_addr() argument
439 update_ipv6_checksum(skb, l4_proto, addr, new_addr); in set_ipv6_addr()
441 skb_clear_hash(skb); in set_ipv6_addr()
442 ovs_ct_clear(skb, NULL); in set_ipv6_addr()
446 static void set_ipv6_dsfield(struct sk_buff *skb, struct ipv6hdr *nh, u8 ipv6_tclass, u8 mask) in set_ipv6_dsfield() argument
452 if (skb->ip_summed == CHECKSUM_COMPLETE) in set_ipv6_dsfield()
453 csum_replace(&skb->csum, (__force __wsum)(old_ipv6_tclass << 12), in set_ipv6_dsfield()
459 static void set_ipv6_fl(struct sk_buff *skb, struct ipv6hdr *nh, u32 fl, u32 mask) in set_ipv6_fl() argument
471 if (skb->ip_summed == CHECKSUM_COMPLETE) in set_ipv6_fl()
472 csum_replace(&skb->csum, (__force __wsum)htonl(ofl), (__force __wsum)htonl(fl)); in set_ipv6_fl()
475 static void set_ipv6_ttl(struct sk_buff *skb, struct ipv6hdr *nh, u8 new_ttl, u8 mask) in set_ipv6_ttl() argument
479 if (skb->ip_summed == CHECKSUM_COMPLETE) in set_ipv6_ttl()
480 csum_replace(&skb->csum, (__force __wsum)(nh->hop_limit << 8), in set_ipv6_ttl()
485 static void set_ip_ttl(struct sk_buff *skb, struct iphdr *nh, u8 new_ttl, in set_ip_ttl() argument
494 static int set_ipv4(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_ipv4() argument
502 err = skb_ensure_writable(skb, skb_network_offset(skb) + in set_ipv4()
507 nh = ip_hdr(skb); in set_ipv4()
517 set_ip_addr(skb, nh, &nh->saddr, new_addr); in set_ipv4()
525 set_ip_addr(skb, nh, &nh->daddr, new_addr); in set_ipv4()
534 set_ip_ttl(skb, nh, key->ipv4_ttl, mask->ipv4_ttl); in set_ipv4()
546 static int set_ipv6(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_ipv6() argument
553 err = skb_ensure_writable(skb, skb_network_offset(skb) + in set_ipv6()
558 nh = ipv6_hdr(skb); in set_ipv6()
571 set_ipv6_addr(skb, flow_key->ip.proto, saddr, masked, in set_ipv6()
588 recalc_csum = (ipv6_find_hdr(skb, &offset, in set_ipv6()
593 set_ipv6_addr(skb, flow_key->ip.proto, daddr, masked, in set_ipv6()
600 set_ipv6_dsfield(skb, nh, key->ipv6_tclass, mask->ipv6_tclass); in set_ipv6()
604 set_ipv6_fl(skb, nh, ntohl(key->ipv6_label), in set_ipv6()
610 set_ipv6_ttl(skb, nh, key->ipv6_hlimit, mask->ipv6_hlimit); in set_ipv6()
616 static int set_nsh(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_nsh() argument
634 if (!pskb_may_pull(skb, skb_network_offset(skb) + NSH_BASE_HDR_LEN)) in set_nsh()
637 nh = nsh_hdr(skb); in set_nsh()
641 err = skb_ensure_writable(skb, skb_network_offset(skb) + in set_nsh()
646 nh = nsh_hdr(skb); in set_nsh()
647 skb_postpull_rcsum(skb, nh, length); in set_nsh()
675 skb_postpush_rcsum(skb, nh, length); in set_nsh()
679 /* Must follow skb_ensure_writable() since that can move the skb data. */
680 static void set_tp_port(struct sk_buff *skb, __be16 *port, in set_tp_port() argument
683 ovs_ct_clear(skb, NULL); in set_tp_port()
684 inet_proto_csum_replace2(check, skb, *port, new_port, false); in set_tp_port()
688 static int set_udp(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_udp() argument
696 err = skb_ensure_writable(skb, skb_transport_offset(skb) + in set_udp()
701 uh = udp_hdr(skb); in set_udp()
706 if (uh->check && skb->ip_summed != CHECKSUM_PARTIAL) { in set_udp()
708 set_tp_port(skb, &uh->source, src, &uh->check); in set_udp()
712 set_tp_port(skb, &uh->dest, dst, &uh->check); in set_udp()
723 ovs_ct_clear(skb, NULL); in set_udp()
726 skb_clear_hash(skb); in set_udp()
731 static int set_tcp(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_tcp() argument
739 err = skb_ensure_writable(skb, skb_transport_offset(skb) + in set_tcp()
744 th = tcp_hdr(skb); in set_tcp()
747 set_tp_port(skb, &th->source, src, &th->check); in set_tcp()
752 set_tp_port(skb, &th->dest, dst, &th->check); in set_tcp()
755 skb_clear_hash(skb); in set_tcp()
760 static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key, in set_sctp() argument
764 unsigned int sctphoff = skb_transport_offset(skb); in set_sctp()
769 err = skb_ensure_writable(skb, sctphoff + sizeof(struct sctphdr)); in set_sctp()
773 sh = sctp_hdr(skb); in set_sctp()
775 old_correct_csum = sctp_compute_cksum(skb, sctphoff); in set_sctp()
780 new_csum = sctp_compute_cksum(skb, sctphoff); in set_sctp()
785 skb_clear_hash(skb); in set_sctp()
786 ovs_ct_clear(skb, NULL); in set_sctp()
795 struct sk_buff *skb) in ovs_vport_output() argument
800 if (skb_cow_head(skb, data->l2_len) < 0) { in ovs_vport_output()
801 kfree_skb_reason(skb, SKB_DROP_REASON_NOMEM); in ovs_vport_output()
805 __skb_dst_copy(skb, data->dst); in ovs_vport_output()
806 *OVS_CB(skb) = data->cb; in ovs_vport_output()
807 skb->inner_protocol = data->inner_protocol; in ovs_vport_output()
809 __vlan_hwaccel_put_tag(skb, data->vlan_proto, data->vlan_tci & ~VLAN_CFI_MASK); in ovs_vport_output()
811 __vlan_hwaccel_clear_tag(skb); in ovs_vport_output()
814 skb_push(skb, data->l2_len); in ovs_vport_output()
815 memcpy(skb->data, &data->l2_data, data->l2_len); in ovs_vport_output()
816 skb_postpush_rcsum(skb, skb->data, data->l2_len); in ovs_vport_output()
817 skb_reset_mac_header(skb); in ovs_vport_output()
819 if (eth_p_mpls(skb->protocol)) { in ovs_vport_output()
820 skb->inner_network_header = skb->network_header; in ovs_vport_output()
821 skb_set_network_header(skb, data->network_offset); in ovs_vport_output()
822 skb_reset_mac_len(skb); in ovs_vport_output()
825 ovs_vport_send(vport, skb, data->mac_proto); in ovs_vport_output()
843 static void prepare_frag(struct vport *vport, struct sk_buff *skb, in prepare_frag() argument
846 unsigned int hlen = skb_network_offset(skb); in prepare_frag()
850 data->dst = skb->_skb_refdst; in prepare_frag()
852 data->cb = *OVS_CB(skb); in prepare_frag()
853 data->inner_protocol = skb->inner_protocol; in prepare_frag()
855 if (skb_vlan_tag_present(skb)) in prepare_frag()
856 data->vlan_tci = skb_vlan_tag_get(skb) | VLAN_CFI_MASK; in prepare_frag()
859 data->vlan_proto = skb->vlan_proto; in prepare_frag()
862 memcpy(&data->l2_data, skb->data, hlen); in prepare_frag()
864 memset(IPCB(skb), 0, sizeof(struct inet_skb_parm)); in prepare_frag()
865 skb_pull(skb, hlen); in prepare_frag()
869 struct sk_buff *skb, u16 mru, in ovs_fragment() argument
875 if (eth_p_mpls(skb->protocol)) { in ovs_fragment()
876 orig_network_offset = skb_network_offset(skb); in ovs_fragment()
877 skb->network_header = skb->inner_network_header; in ovs_fragment()
880 if (skb_network_offset(skb) > MAX_L2_LEN) { in ovs_fragment()
890 prepare_frag(vport, skb, orig_network_offset, in ovs_fragment()
896 orig_dst = skb->_skb_refdst; in ovs_fragment()
897 skb_dst_set_noref(skb, &ovs_rt.dst); in ovs_fragment()
898 IPCB(skb)->frag_max_size = mru; in ovs_fragment()
900 ip_do_fragment(net, skb->sk, skb, ovs_vport_output); in ovs_fragment()
906 prepare_frag(vport, skb, orig_network_offset, in ovs_fragment()
913 orig_dst = skb->_skb_refdst; in ovs_fragment()
914 skb_dst_set_noref(skb, &ovs_rt.dst); in ovs_fragment()
915 IP6CB(skb)->frag_max_size = mru; in ovs_fragment()
917 ipv6_stub->ipv6_fragment(net, skb->sk, skb, ovs_vport_output); in ovs_fragment()
929 ovs_kfree_skb_reason(skb, reason); in ovs_fragment()
932 static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port, in do_output() argument
940 u16 mru = OVS_CB(skb)->mru; in do_output()
941 u32 cutlen = OVS_CB(skb)->cutlen; in do_output()
944 if (skb->len - cutlen > ovs_mac_header_len(key)) in do_output()
945 pskb_trim(skb, skb->len - cutlen); in do_output()
947 pskb_trim(skb, ovs_mac_header_len(key)); in do_output()
951 (skb->len <= mru + vport->dev->hard_header_len))) { in do_output()
952 ovs_vport_send(vport, skb, ovs_key_mac_proto(key)); in do_output()
956 ovs_fragment(net, vport, skb, mru, key); in do_output()
958 kfree_skb_reason(skb, SKB_DROP_REASON_PKT_TOO_BIG); in do_output()
961 kfree_skb_reason(skb, SKB_DROP_REASON_DEV_READY); in do_output()
965 static int output_userspace(struct datapath *dp, struct sk_buff *skb, in output_userspace() argument
976 upcall.mru = OVS_CB(skb)->mru; in output_userspace()
1003 err = dev_fill_metadata_dst(vport->dev, skb); in output_userspace()
1005 upcall.egress_tun_info = skb_tunnel_info(skb); in output_userspace()
1021 return ovs_dp_upcall(dp, skb, key, &upcall, cutlen); in output_userspace()
1024 static int dec_ttl_exception_handler(struct datapath *dp, struct sk_buff *skb, in dec_ttl_exception_handler() argument
1032 return clone_execute(dp, skb, key, 0, nla_data(actions), in dec_ttl_exception_handler()
1035 ovs_kfree_skb_reason(skb, OVS_DROP_IP_TTL); in dec_ttl_exception_handler()
1039 /* When 'last' is true, sample() should always consume the 'skb'.
1040 * Otherwise, sample() should keep 'skb' intact regardless what
1043 static int sample(struct datapath *dp, struct sk_buff *skb, in sample() argument
1059 init_probability = OVS_CB(skb)->probability; in sample()
1064 ovs_kfree_skb_reason(skb, OVS_DROP_LAST_ACTION); in sample()
1068 OVS_CB(skb)->probability = arg->probability; in sample()
1071 err = clone_execute(dp, skb, key, 0, actions, rem, last, in sample()
1075 OVS_CB(skb)->probability = init_probability; in sample()
1080 /* When 'last' is true, clone() should always consume the 'skb'.
1081 * Otherwise, clone() should keep 'skb' intact regardless what
1084 static int clone(struct datapath *dp, struct sk_buff *skb, in clone() argument
1098 return clone_execute(dp, skb, key, 0, actions, rem, last, in clone()
1102 static void execute_hash(struct sk_buff *skb, struct sw_flow_key *key, in execute_hash() argument
1110 hash = skb_get_hash(skb); in execute_hash()
1115 hash = __skb_get_hash_symmetric(skb); in execute_hash()
1125 static int execute_set_action(struct sk_buff *skb, in execute_set_action() argument
1133 skb_dst_drop(skb); in execute_set_action()
1135 skb_dst_set(skb, (struct dst_entry *)tun->tun_dst); in execute_set_action()
1145 static int execute_masked_set_action(struct sk_buff *skb, in execute_masked_set_action() argument
1153 OVS_SET_MASKED(skb->priority, nla_get_u32(a), in execute_masked_set_action()
1155 flow_key->phy.priority = skb->priority; in execute_masked_set_action()
1159 OVS_SET_MASKED(skb->mark, nla_get_u32(a), *get_mask(a, u32 *)); in execute_masked_set_action()
1160 flow_key->phy.skb_mark = skb->mark; in execute_masked_set_action()
1169 err = set_eth_addr(skb, flow_key, nla_data(a), in execute_masked_set_action()
1174 err = set_nsh(skb, flow_key, a); in execute_masked_set_action()
1178 err = set_ipv4(skb, flow_key, nla_data(a), in execute_masked_set_action()
1183 err = set_ipv6(skb, flow_key, nla_data(a), in execute_masked_set_action()
1188 err = set_tcp(skb, flow_key, nla_data(a), in execute_masked_set_action()
1193 err = set_udp(skb, flow_key, nla_data(a), in execute_masked_set_action()
1198 err = set_sctp(skb, flow_key, nla_data(a), in execute_masked_set_action()
1203 err = set_mpls(skb, flow_key, nla_data(a), get_mask(a, in execute_masked_set_action()
1220 static int execute_recirc(struct datapath *dp, struct sk_buff *skb, in execute_recirc() argument
1229 err = ovs_flow_key_update(skb, key); in execute_recirc()
1236 return clone_execute(dp, skb, key, recirc_id, NULL, 0, last, true); in execute_recirc()
1239 static int execute_check_pkt_len(struct datapath *dp, struct sk_buff *skb, in execute_check_pkt_len() argument
1243 struct ovs_skb_cb *ovs_cb = OVS_CB(skb); in execute_check_pkt_len()
1255 len = ovs_cb->mru ? ovs_cb->mru + skb->mac_len : skb->len; in execute_check_pkt_len()
1258 if ((skb_is_gso(skb) && skb_gso_validate_mac_len(skb, max_len)) || in execute_check_pkt_len()
1274 return clone_execute(dp, skb, key, 0, nla_data(actions), in execute_check_pkt_len()
1278 static int execute_dec_ttl(struct sk_buff *skb, struct sw_flow_key *key) in execute_dec_ttl() argument
1282 if (skb->protocol == htons(ETH_P_IPV6)) { in execute_dec_ttl()
1285 err = skb_ensure_writable(skb, skb_network_offset(skb) + in execute_dec_ttl()
1290 nh = ipv6_hdr(skb); in execute_dec_ttl()
1296 } else if (skb->protocol == htons(ETH_P_IP)) { in execute_dec_ttl()
1300 err = skb_ensure_writable(skb, skb_network_offset(skb) + in execute_dec_ttl()
1305 nh = ip_hdr(skb); in execute_dec_ttl()
1318 static void execute_psample(struct datapath *dp, struct sk_buff *skb, in execute_psample() argument
1341 md.in_ifindex = OVS_CB(skb)->input_vport->dev->ifindex; in execute_psample()
1342 md.trunc_size = skb->len - OVS_CB(skb)->cutlen; in execute_psample()
1345 rate = OVS_CB(skb)->probability ? OVS_CB(skb)->probability : U32_MAX; in execute_psample()
1347 psample_sample_packet(&psample_group, skb, rate, &md); in execute_psample()
1350 static void execute_psample(struct datapath *dp, struct sk_buff *skb, in execute_psample() argument
1355 /* Execute a list of actions against 'skb'. */
1356 static int do_execute_actions(struct datapath *dp, struct sk_buff *skb, in do_execute_actions() argument
1368 trace_ovs_do_execute_action(dp, skb, key, a, rem); in do_execute_actions()
1370 /* Actions that rightfully have to consume the skb should do it in do_execute_actions()
1379 * of 'skb', In case the output action is the in do_execute_actions()
1383 do_output(dp, skb, port, key); in do_execute_actions()
1384 /* 'skb' has been used for output. in do_execute_actions()
1389 clone = skb_clone(skb, GFP_ATOMIC); in do_execute_actions()
1392 OVS_CB(skb)->cutlen = 0; in do_execute_actions()
1399 if (skb->len > trunc->max_len) in do_execute_actions()
1400 OVS_CB(skb)->cutlen = skb->len - trunc->max_len; in do_execute_actions()
1405 output_userspace(dp, skb, key, a, attr, in do_execute_actions()
1406 len, OVS_CB(skb)->cutlen); in do_execute_actions()
1407 OVS_CB(skb)->cutlen = 0; in do_execute_actions()
1409 consume_skb(skb); in do_execute_actions()
1415 execute_hash(skb, key, a); in do_execute_actions()
1421 err = push_mpls(skb, key, mpls->mpls_lse, in do_execute_actions()
1422 mpls->mpls_ethertype, skb->mac_len); in do_execute_actions()
1430 mac_len = skb->mac_len; in do_execute_actions()
1432 err = push_mpls(skb, key, mpls->mpls_lse, in do_execute_actions()
1437 err = pop_mpls(skb, key, nla_get_be16(a)); in do_execute_actions()
1441 err = push_vlan(skb, key, nla_data(a)); in do_execute_actions()
1445 err = pop_vlan(skb, key); in do_execute_actions()
1451 err = execute_recirc(dp, skb, key, a, last); in do_execute_actions()
1453 /* If this is the last action, the skb has in do_execute_actions()
1463 err = execute_set_action(skb, key, nla_data(a)); in do_execute_actions()
1468 err = execute_masked_set_action(skb, key, nla_data(a)); in do_execute_actions()
1474 err = sample(dp, skb, key, a, last); in do_execute_actions()
1483 err = ovs_flow_key_update(skb, key); in do_execute_actions()
1488 err = ovs_ct_execute(ovs_dp_get_net(dp), skb, key, in do_execute_actions()
1497 err = ovs_ct_clear(skb, key); in do_execute_actions()
1501 err = push_eth(skb, key, nla_data(a)); in do_execute_actions()
1505 err = pop_eth(skb, key); in do_execute_actions()
1509 err = push_nsh(skb, key, nla_data(a)); in do_execute_actions()
1513 err = pop_nsh(skb, key); in do_execute_actions()
1517 if (ovs_meter_execute(dp, skb, key, nla_get_u32(a))) { in do_execute_actions()
1518 ovs_kfree_skb_reason(skb, OVS_DROP_METER); in do_execute_actions()
1526 err = clone(dp, skb, key, a, last); in do_execute_actions()
1536 err = execute_check_pkt_len(dp, skb, key, a, last); in do_execute_actions()
1544 err = execute_dec_ttl(skb, key); in do_execute_actions()
1546 return dec_ttl_exception_handler(dp, skb, in do_execute_actions()
1555 ovs_kfree_skb_reason(skb, reason); in do_execute_actions()
1560 execute_psample(dp, skb, a); in do_execute_actions()
1561 OVS_CB(skb)->cutlen = 0; in do_execute_actions()
1563 consume_skb(skb); in do_execute_actions()
1570 ovs_kfree_skb_reason(skb, OVS_DROP_ACTION_ERROR); in do_execute_actions()
1575 ovs_kfree_skb_reason(skb, OVS_DROP_LAST_ACTION); in do_execute_actions()
1580 * execution does not affect the original 'skb' nor the original 'key'.
1585 static int clone_execute(struct datapath *dp, struct sk_buff *skb, in clone_execute() argument
1593 skb = last ? skb : skb_clone(skb, GFP_ATOMIC); in clone_execute()
1594 if (!skb) { in clone_execute()
1614 err = do_execute_actions(dp, skb, clone, in clone_execute()
1621 ovs_dp_process_packet(skb, clone); in clone_execute()
1627 da = add_deferred_actions(skb, key, actions, len); in clone_execute()
1634 /* Out of per CPU action FIFO space. Drop the 'skb' and in clone_execute()
1637 ovs_kfree_skb_reason(skb, OVS_DROP_DEFERRED_LIMIT); in clone_execute()
1663 struct sk_buff *skb = da->skb; in process_deferred_actions() local
1669 do_execute_actions(dp, skb, key, actions, actions_len); in process_deferred_actions()
1671 ovs_dp_process_packet(skb, key); in process_deferred_actions()
1678 /* Execute a list of actions against 'skb'. */
1679 int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb, in ovs_execute_actions() argument
1689 ovs_kfree_skb_reason(skb, OVS_DROP_RECURSION_LIMIT); in ovs_execute_actions()
1694 OVS_CB(skb)->acts_origlen = acts->orig_len; in ovs_execute_actions()
1695 err = do_execute_actions(dp, skb, key, in ovs_execute_actions()