#include <net/rtnetlink.h>
#include <net/sock.h>
#include <linux/virtio_net.h>
-#include <net/flow_keys.h>
/*
* A macvtap queue is the central object of this driver, it connects
int vnet_hdr_len = 0;
int copylen = 0;
bool zerocopy = false;
- struct flow_keys keys;
if (q->flags & IFF_VNET_HDR) {
vnet_hdr_len = q->vnet_hdr_sz;
goto err_kfree;
}
- if (skb->ip_summed == CHECKSUM_PARTIAL)
- skb_set_transport_header(skb, skb_checksum_start_offset(skb));
- else if (skb_flow_dissect(skb, &keys))
- skb_set_transport_header(skb, keys.thoff);
- else
- skb_set_transport_header(skb, ETH_HLEN);
+ skb_probe_transport_header(skb, ETH_HLEN);
rcu_read_lock_bh();
vlan = rcu_dereference_bh(q->vlan);
#include <net/sock.h>
#include <asm/uaccess.h>
-#include <net/flow_keys.h>
/* Uncomment to enable debugging */
/* #define TUN_DEBUG 1 */
bool zerocopy = false;
int err;
u32 rxhash;
- struct flow_keys keys;
if (!(tun->flags & TUN_NO_PI)) {
if ((len -= sizeof(pi)) > total_len)
}
skb_reset_network_header(skb);
-
- if (skb->ip_summed == CHECKSUM_PARTIAL)
- skb_set_transport_header(skb, skb_checksum_start_offset(skb));
- else if (skb_flow_dissect(skb, &keys))
- skb_set_transport_header(skb, keys.thoff);
- else
- skb_reset_transport_header(skb);
+ skb_probe_transport_header(skb, 0);
rxhash = skb_get_rxhash(skb);
netif_rx_ni(skb);
#include <linux/udp.h>
#include <net/tcp.h>
-#include <net/flow_keys.h>
#include <xen/xen.h>
#include <xen/events.h>
continue;
}
- if (!skb_transport_header_was_set(skb)) {
- struct flow_keys keys;
-
- if (skb_flow_dissect(skb, &keys))
- skb_set_transport_header(skb, keys.thoff);
- else
- skb_reset_transport_header(skb);
- }
+ skb_probe_transport_header(skb, 0);
vif->dev->stats.rx_bytes += skb->len;
vif->dev->stats.rx_packets++;
#include <linux/virtio_net.h>
#include <linux/errqueue.h>
#include <linux/net_tstamp.h>
-#include <net/flow_keys.h>
#ifdef CONFIG_INET
#include <net/inet_common.h>
__be16 proto = 0;
int err;
int extra_len = 0;
- struct flow_keys keys;
/*
* Get and verify the address.
if (unlikely(extra_len == 4))
skb->no_fcs = 1;
- if (skb_flow_dissect(skb, &keys))
- skb_set_transport_header(skb, keys.thoff);
- else
- skb_reset_transport_header(skb);
+ skb_probe_transport_header(skb, 0);
dev_queue_xmit(skb);
rcu_read_unlock();
struct page *page;
void *data;
int err;
- struct flow_keys keys;
ph.raw = frame;
skb_reserve(skb, hlen);
skb_reset_network_header(skb);
-
- if (skb_flow_dissect(skb, &keys))
- skb_set_transport_header(skb, keys.thoff);
- else
- skb_reset_transport_header(skb);
+ skb_probe_transport_header(skb, 0);
if (po->tp_tx_has_off) {
int off_min, off_max, off;
unsigned short gso_type = 0;
int hlen, tlen;
int extra_len = 0;
- struct flow_keys keys;
/*
* Get and verify the address.
len += vnet_hdr_len;
}
- if (skb->ip_summed == CHECKSUM_PARTIAL)
- skb_set_transport_header(skb, skb_checksum_start_offset(skb));
- else if (skb_flow_dissect(skb, &keys))
- skb_set_transport_header(skb, keys.thoff);
- else
- skb_set_transport_header(skb, reserve);
+ skb_probe_transport_header(skb, reserve);
if (unlikely(extra_len == 4))
skb->no_fcs = 1;