search for: eth_type_tran

Displaying 20 results from an estimated 94 matches for "eth_type_tran".

Did you mean: eth_type_trans
2008 Jun 16
1
[PATCH] virtio_net: Fix skb->csum_start computation (2.6.24, 2.6.25)
...from the start of the ethernet header to the transport layer checksum field. skb->csum_start is the offset from skb->head. skb_partial_csum_set() assumes that skb->data points to the ethernet header - i.e. it computes skb->csum_start by adding the headroom to hdr->csum_start. Since eth_type_trans() skb_pull()s the ethernet header, skb_partial_csum_set() should be called before eth_type_trans(). (Without this patch, GSO packets from a guest to the world outside the host are corrupted). Signed-off-by: Mark McLoughlin <markmc at redhat.com> Acked-by: Herbert Xu <herbert at gondor.a...
2008 Jun 16
1
[PATCH] virtio_net: Fix skb->csum_start computation (2.6.24, 2.6.25)
...from the start of the ethernet header to the transport layer checksum field. skb->csum_start is the offset from skb->head. skb_partial_csum_set() assumes that skb->data points to the ethernet header - i.e. it computes skb->csum_start by adding the headroom to hdr->csum_start. Since eth_type_trans() skb_pull()s the ethernet header, skb_partial_csum_set() should be called before eth_type_trans(). (Without this patch, GSO packets from a guest to the world outside the host are corrupted). Signed-off-by: Mark McLoughlin <markmc at redhat.com> Acked-by: Herbert Xu <herbert at gondor.a...
2008 Jun 19
0
[patch 05/15] virtio_net: Fix skb->csum_start computation
...from the start of the ethernet header to the transport layer checksum field. skb->csum_start is the offset from skb->head. skb_partial_csum_set() assumes that skb->data points to the ethernet header - i.e. it computes skb->csum_start by adding the headroom to hdr->csum_start. Since eth_type_trans() skb_pull()s the ethernet header, skb_partial_csum_set() should be called before eth_type_trans(). (Without this patch, GSO packets from a guest to the world outside the host are corrupted). Signed-off-by: Mark McLoughlin <markmc at redhat.com> Acked-by: Herbert Xu <herbert at gondor.a...
2008 May 29
1
[PATCH 3/3] virtio_net: Fix skb->csum_start computation
...er to the transport layer checksum field. skb->csum_start > is the offset from skb->head. > > skb_partial_csum_set() assumes that skb->data points to the > ethernet header - i.e. it computes skb->csum_start by adding > the headroom to hdr->csum_start. > > Since eth_type_trans() skb_pull()s the ethernet header, > skb_partial_csum_set() should be called before > eth_type_trans(). > > Signed-off-by: Mark McLoughlin <markmc at redhat.com> Good catch! Clearly shows I never ran this across a real Ethernet device :) Acked-by: Herbert Xu <herbert at gon...
2008 May 29
1
[PATCH 3/3] virtio_net: Fix skb->csum_start computation
...er to the transport layer checksum field. skb->csum_start > is the offset from skb->head. > > skb_partial_csum_set() assumes that skb->data points to the > ethernet header - i.e. it computes skb->csum_start by adding > the headroom to hdr->csum_start. > > Since eth_type_trans() skb_pull()s the ethernet header, > skb_partial_csum_set() should be called before > eth_type_trans(). > > Signed-off-by: Mark McLoughlin <markmc at redhat.com> Good catch! Clearly shows I never ran this across a real Ethernet device :) Acked-by: Herbert Xu <herbert at gon...
2008 Jun 08
2
[PATCH 1/4] virtio_net: Fix skb->csum_start computation
...from the start of the ethernet header to the transport layer checksum field. skb->csum_start is the offset from skb->head. skb_partial_csum_set() assumes that skb->data points to the ethernet header - i.e. it computes skb->csum_start by adding the headroom to hdr->csum_start. Since eth_type_trans() skb_pull()s the ethernet header, skb_partial_csum_set() should be called before eth_type_trans(). (Without this patch, GSO packets from a guest to the world outside the host are corrupted). Signed-off-by: Mark McLoughlin <markmc at redhat.com> Acked-by: Herbert Xu <herbert at gondor.a...
2023 Jan 14
2
[PATCH net-next 1/2] virtio_net: Fix short frame length check
...nificant change. > > As such rather than changing out ETH_HLEN for ETH_ZLEN I wonder if we > > should look at maybe making this a "<=" comparison instead since that is the > > only case I can think of where the packet would end up being entirely empty > > after eth_type_trans is called and we would be passing an skb with length 0. > > I likely didn?t understand your comment. > This driver check is before creating the skb for the received packet. > So, purpose is to not even process the packet header or prepare the skb if it not an Ethernet frame. > >...
2011 Jun 10
1
[PATCH] virtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID
...tic void receive_buf(struct net_device *dev, void *buf, unsigned int len) hdr->hdr.csum_start, hdr->hdr.csum_offset)) goto frame_err; + } else if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) { + skb->ip_summed = CHECKSUM_UNNECESSARY; } skb->protocol = eth_type_trans(skb, dev); diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 136040b..970d5a2 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h @@ -63,6 +63,7 @@ struct virtio_net_config { * specify GSO or CSUM features, you can simply ignore the header. */ struc...
2011 Jun 10
1
[PATCH] virtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID
...tic void receive_buf(struct net_device *dev, void *buf, unsigned int len) hdr->hdr.csum_start, hdr->hdr.csum_offset)) goto frame_err; + } else if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID) { + skb->ip_summed = CHECKSUM_UNNECESSARY; } skb->protocol = eth_type_trans(skb, dev); diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 136040b..970d5a2 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h @@ -63,6 +63,7 @@ struct virtio_net_config { * specify GSO or CSUM features, you can simply ignore the header. */ struc...
2009 Feb 10
1
[PATCH 1/2] Fix ixgbe RSS operation
...se { + prefetch(skb->data - NET_IP_ALIGN); } #else prefetch(skb->data - NET_IP_ALIGN); @@ -1135,7 +1133,7 @@ total_rx_bytes += skb->len; total_rx_packets++; #ifdef CONFIG_XEN_NETDEV2_BACKEND - if(!rx_ring->queue_index) + if (skb->data) #endif skb->protocol = eth_type_trans(skb, adapter->netdev); @@ -2907,7 +2905,8 @@ rx_buffer_info = &rx_ring->rx_buffer_info[i]; if (rx_buffer_info->skb) { #ifdef CONFIG_XEN_NETDEV2_BACKEND - if (rx_ring->queue_index) { + if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && + rx_ring->...
2003 Jan 10
7
HTB and ARP
Hi, I discover recently that the arp traffic is managed like any other flow. So you get hang after a moment if you don''t use a default class. Is the any means to avoid this ? Not to have a default class is a way to filter traffic ... One would be to managed to class ARP request with tc but I don''t know if it is possible. Thanks in advance, -- Éric Leblond courriel :
2009 Jan 27
5
[PATCH 2/2] Add VMDq support to ixgbe
...rx_buf_len + NET_IP_ALIGN, @@ -1081,8 +1134,11 @@ static bool ixgbe_clean_rx_irq(struct ix /* probably a little skewed due to removing CRC */ total_rx_bytes += skb->len; total_rx_packets++; +#ifdef CONFIG_XEN_NETDEV2_BACKEND + if(!rx_ring->queue_index) +#endif + skb->protocol = eth_type_trans(skb, adapter->netdev); - skb->protocol = eth_type_trans(skb, adapter->netdev); #ifndef IXGBE_NO_LRO if (ixgbe_lro_ring_queue(rx_ring->lrolist, adapter, skb, staterr, rx_ring, rx_desc) == 0) { @@ -1475,6 +1531,8 @@ static irqreturn_t ixgbe_msix_clean_rx(i r_idx = find_first...
2007 Apr 18
1
[Bridge] A question about modify bridge source
...me("eth0"); ethdev->br_port = (struct net_bridge_port *)br; dev_set_promiscuity(ethdev,1); dev_hold(ethdev); return br; } static void Bridge_passup(struct sk_buff *skb) { skb->dev = &brg->dev; skb->pkt_type = PACKET_HOST; skb_push(skb,ETH_HLEN); skb->protocol = eth_type_trans(skb,&brg->dev); netif_rx(skb); return; } void Bridge_dev_setup(struct net_device *dev) { unsigned char dd[6] = {0x12,0x12,0x12,0x12,0x12,0x12}; memcpy(dev->dev_addr,dd,ETH_ALEN); dev->do_ioctl = NULL; dev->get_stats = NULL; dev->hard_start_xmit = NULL; dev->open = NU...
2018 Sep 06
0
[PATCH net-next 09/11] tuntap: accept an array of XDP buffs through sendmsg()
...(skb, xdp->data - xdp->data_hard_start); + skb_put(skb, xdp->data_end - xdp->data); + + if (virtio_net_hdr_to_skb(skb, gso, tun_is_little_endian(tun))) { + this_cpu_inc(tun->pcpu_stats->rx_frame_errors); + kfree_skb(skb); + err = -EINVAL; + goto out; + } + + skb->protocol = eth_type_trans(skb, tun->dev); + skb_reset_network_header(skb); + skb_probe_transport_header(skb, 0); + + if (skb_xdp) { + err = do_xdp_generic(xdp_prog, skb); + if (err != XDP_PASS) + goto out; + } + + if (!rcu_dereference(tun->steering_prog)) + rxhash = __skb_get_hash_symmetric(skb); + + netif_recei...
2017 Apr 15
0
[PATCH RFC (resend) net-next 3/6] virtio_net: Add basic skeleton for handling vnet header extensions.
...*)skb->cb; } @@ -767,6 +777,12 @@ static int receive_buf(struct virtnet_info *vi, struct receive_queue *rq, goto frame_err; } + if (vi->hdr_ext && + virtio_net_ext_to_skb(skb, + (struct virtio_net_ext_hdr *)(hdr + 1))) { + goto frame_err; + } + skb->protocol = eth_type_trans(skb, dev); pr_debug("Receiving skb proto 0x%04x len %i type %i\n", ntohs(skb->protocol), skb->len, skb->pkt_type); @@ -1106,6 +1122,11 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) if (vi->mergeable_rx_bufs) hdr->num_buffers = 0; + if (vi-...
2013 Mar 28
2
[Bridge] [PATCH v2] net: add ETH_P_802_3_MIN
...ETH_P_802_3_MIN) return eth->h_proto; rawp = skb->data; diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c index 44225b1..83a23af 100644 --- a/drivers/media/dvb-core/dvb_net.c +++ b/drivers/media/dvb-core/dvb_net.c @@ -185,7 +185,7 @@ static __be16 dvb_net_eth_type_trans(struct sk_buff *skb, skb->pkt_type=PACKET_MULTICAST; } - if (ntohs(eth->h_proto) >= 1536) + if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN) return eth->h_proto; rawp = skb->data; @@ -228,9 +228,9 @@ static int ule_test_sndu( struct dvb_net_priv *p ) static int ule_...
2009 Feb 10
3
[PATCH 2/2] Use correct config option for ixgbe VMDq
...page of @@ -1132,7 +1132,7 @@ static bool ixgbe_clean_rx_irq(struct ix /* probably a little skewed due to removing CRC */ total_rx_bytes += skb->len; total_rx_packets++; -#ifdef CONFIG_XEN_NETDEV2_BACKEND +#ifdef CONFIG_XEN_NETDEV2_VMQ if (skb->data) #endif skb->protocol = eth_type_trans(skb, adapter->netdev); @@ -2276,7 +2276,7 @@ static void ixgbe_configure_rx(struct ix adapter->rx_ring[i].head = IXGBE_RDH(j); adapter->rx_ring[i].tail = IXGBE_RDT(j); -#ifndef CONFIG_XEN_NETDEV2_BACKEND +#ifndef CONFIG_XEN_NETDEV2_VMQ if (adapter->flags & IXGBE_FLAG_VMDQ...
2013 Oct 08
1
OT: errors compiling kernel module as a rpm package
...e0cf25 kernel(cpu_possible_mask) = 0x76a495c1 kernel(csum_partial) = 0xe113bbbc kernel(del_timer) = 0x6307fc98 kernel(dev_base_lock) = 0xd1f91bcd kernel(dev_get_by_name) = 0x6edb8870 kernel(dev_queue_xmit) = 0x0d110dab kernel(dev_set_promiscuity) = 0x599a4d52 kernel(dst_release) = 0xec3f0011 kernel(eth_type_trans) = 0xd55704ee kernel(ether_setup) = 0x7f8bdd3a kernel(ethtool_op_get_link) = 0xd4be820d kernel(ethtool_op_get_sg) = 0x14ff9fcb kernel(ethtool_op_get_tso) = 0xcee83622 kernel(ethtool_op_get_tx_csum) = 0xecda447a kernel(ethtool_op_set_sg) = 0x89f397a9 kernel(ethtool_op_set_tso) = 0xbf4e56cf kernel(e...
2007 May 09
3
[patch 7/9] lguest: the net driver
...fo->skb[i]; + fill_slot(dev, i); + + if (length < ETH_HLEN || length > ETH_HLEN + ETH_DATA_LEN) { + pr_debug(KERN_WARNING "%s: unbelievable skb len: %i\n", + dev->name, length); + dev_kfree_skb(skb); + continue; + } + + skb_put(skb, length); + skb->protocol = eth_type_trans(skb, dev); + /* This is a reliable transport. */ + if (dev->features & NETIF_F_NO_CSUM) + skb->ip_summed = CHECKSUM_UNNECESSARY; + pr_debug("Receiving skb proto 0x%04x len %i type %i\n", + ntohs(skb->protocol), skb->len, skb->pkt_type); + + dev->stats.rx_by...
2007 May 09
3
[patch 7/9] lguest: the net driver
...fo->skb[i]; + fill_slot(dev, i); + + if (length < ETH_HLEN || length > ETH_HLEN + ETH_DATA_LEN) { + pr_debug(KERN_WARNING "%s: unbelievable skb len: %i\n", + dev->name, length); + dev_kfree_skb(skb); + continue; + } + + skb_put(skb, length); + skb->protocol = eth_type_trans(skb, dev); + /* This is a reliable transport. */ + if (dev->features & NETIF_F_NO_CSUM) + skb->ip_summed = CHECKSUM_UNNECESSARY; + pr_debug("Receiving skb proto 0x%04x len %i type %i\n", + ntohs(skb->protocol), skb->len, skb->pkt_type); + + dev->stats.rx_by...