search for: skb_pull

Displaying 20 results from an estimated 27 matches for "skb_pull".

Did you mean: __skb_pull
2023 Mar 10
0
[RFC PATCH v4 2/4] virtio/vsock: remove redundant 'skb_pull()' call
...644 >--- a/net/vmw_vsock/virtio_transport_common.c >+++ b/net/vmw_vsock/virtio_transport_common.c >@@ -465,7 +465,6 @@ static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk, > dequeued_len = err; > } else { > user_buf_len -= bytes_to_copy; >- skb_pull(skb, bytes_to_copy); > } > > spin_lock_bh(&vvs->rx_lock); >-- >2.25.1 >
2023 Mar 06
0
[RFC PATCH v2 2/4] virtio/vsock: remove all data from sk_buff
...of SOCK_SEQPACKET all sk_buffs are used once - after read some >>>>> data from it, it will be removed, so user will never read rest of the >>>>> data. Thus we need to update credit parameters of the socket like whole >>>>> sk_buff is read - so call 'skb_pull()' for the whole buffer. >>>>> >>>>> Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") >>>>> Signed-off-by: Arseniy Krasnov <AVKrasnov at sberdevices.ru> >>>>> --- >>>>> net/vmw_...
2007 Feb 08
0
[PATCH] linux: move back skb_pull_rcsum
The 2.6.17 merge inserted the new skb_pull_rcsum() at a place different from the native file, hence causing needless differences to native and complicating applying the Xen changes to newer kernels. This patch moves it to the place where native has it. I don''t think it is appropriate to add a signed-off-by statement to this kind o...
2023 Mar 09
0
[RFC PATCH v3 0/4] several updates to virtio/vsock
...pped. Next read attempt will use same skbuff and last offset. >>> ? Instead of 'skb_dequeue()', 'skb_peek()' + '__skb_unlink()' are used. >>> ? This behaviour was implemented before skbuff support. >>> 3) For SOCK_SEQPACKET it removes unneeded 'skb_pull()' call, because for >>> ? this type of socket each skbuff is used only once: after removing it >>> ? from socket's queue, it will be freed anyway. >>> >>> Test for 2) also added: >>> Test tries to 'recv()' data to NULL buffer, then does...
2008 May 29
1
[PATCH 3/3] virtio_net: Fix skb->csum_start computation
...rt 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 gondor.apana.or...
2008 May 29
1
[PATCH 3/3] virtio_net: Fix skb->csum_start computation
...rt 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 gondor.apana.or...
2008 Jun 16
1
[PATCH] virtio_net: Fix skb->csum_start computation (2.6.24, 2.6.25)
...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.apana.org.au&...
2008 Jun 16
1
[PATCH] virtio_net: Fix skb->csum_start computation (2.6.24, 2.6.25)
...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.apana.org.au&...
2023 Mar 06
0
[RFC PATCH v2 1/4] virtio/vsock: fix 'rx_bytes'/'fwd_cnt' calculation
...tatic void virtio_transport_dec_rx_pkt(struct virtio_vsock_sock *vvs, > { > int len; > >- len = skb_headroom(skb) - sizeof(struct virtio_vsock_hdr) - skb->len; >+ len = skb_headroom(skb) - sizeof(struct virtio_vsock_hdr); IIUC virtio_transport_dec_rx_pkt() is always called after skb_pull(), so skb_headroom() is returning the amount of space we removed. Looking at the other patches in this series, I think maybe we should change virtio_transport_dec_rx_pkt() and virtio_transport_inc_rx_pkt() by passing the value to subtract or add directly. Since some times we don't remove the w...
2007 Apr 18
4
[Bridge] [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged {I, AR}P packets
...3 @@ static int br_nf_pre_routing_finish_brid skb->pkt_type = PACKET_HOST; skb->nf_bridge->mask |= BRNF_PKT_TYPE; } + skb->nf_bridge->mask ^= BRNF_NF_BRIDGE_PREROUTING; skb->dev = bridge_parent(skb->dev); + if (skb->protocol == __constant_htons(ETH_P_8021Q)) { + skb_pull(skb, VLAN_HLEN); + skb->nh.raw += VLAN_HLEN; + } skb->dst->output(skb); return 0; } @@ -155,6 +172,7 @@ static int br_nf_pre_routing_finish(stru skb->pkt_type = PACKET_OTHERHOST; nf_bridge->mask ^= BRNF_PKT_TYPE; } + nf_bridge->mask ^= BRNF_NF_BRIDGE_PREROUTING;...
2007 Apr 18
1
[Bridge] [BUG/PATCH/RFC] bridge: locally generated broadcast traffic may block sender
...ver +S: Germany + N: Andi Kleen E: ak@muc.de D: network hacker, syncookies diff -urN a/net/bridge/br_device.c b/net/bridge/br_device.c --- a/net/bridge/br_device.c 2002-02-25 20:38:14.000000000 +0100 +++ b/net/bridge/br_device.c 2006-07-04 17:11:20.000000000 +0200 @@ -57,6 +57,7 @@ skb_pull(skb, ETH_HLEN); if (dest[0] & 1) { + skb_orphan(skb); br_flood_deliver(br, skb, 0); return 0; } @@ -67,6 +68,7 @@ return 0; } + skb_orphan(skb); br_flood_deliver(br, skb, 0); return 0;...
2008 Jun 08
2
[PATCH 1/4] virtio_net: Fix skb->csum_start computation
...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.apana.org.au&...
2023 Mar 06
0
[RFC PATCH v2 3/4] virtio/vsock: free skb on data copy failure
..._transport_common.c >+++ b/net/vmw_vsock/virtio_transport_common.c >@@ -379,8 +379,12 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > spin_unlock_bh(&vvs->rx_lock); > > err = memcpy_to_msg(msg, skb->data, bytes); >- if (err) >+ if (err) { >+ skb_pull(skb, skb->len); >+ virtio_transport_dec_rx_pkt(vvs, skb); >+ consume_skb(skb); I'm not sure it's the right thing to do, if we fail to copy the content into the user's buffer, I think we should queue it again. In fact, before commit 71dc9ec9ac7d ("virtio/vsock: replac...
2023 Mar 10
0
[RFC PATCH v4 0/4] several updates to virtio/vsock
...skbuff is > not dropped. Next read attempt will use same skbuff and last offset. > Instead of 'skb_dequeue()', 'skb_peek()' + '__skb_unlink()' are used. > This behaviour was implemented before skbuff support. >3) For SOCK_SEQPACKET it removes unneeded 'skb_pull()' call, because for > this type of socket each skbuff is used only once: after removing it > from socket's queue, it will be freed anyway. thanks for the fixes, I would wait a few days to see if there are any comments and then I think you can send it on net without RFC. @Bobby...
2008 Jun 19
0
[patch 05/15] virtio_net: Fix skb->csum_start computation
...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.apana.org.au&...
2007 Jun 06
0
[Patch] vnet-module
Hallo! The attached patch repair the vnet-module (patch base is xen-3.1.0) - moves the "skb_pull" function from kernel to skb_util.c because pulling in the data will rise a "BUG_ON" in the kernel. - the skb_buff is not always possible to modify. (vnet_forward.c and etherip.c) The code now work''s.. I think with no or less time-penalty. Info for kernel-opt...
2023 Aug 01
0
[PATCH net-next v5 1/4] vsock/virtio/vhost: read data from non-linear skb
...skb_copy_datagram_iter()' handles both types of skb internally - it > just needs an offset from which to copy data from the given skb. This > offset is incremented on each read from skb. This approach allows to > avoid special handling of non-linear skbs: > 1) We can't call 'skb_pull()' on it, because it updates 'data' pointer. > 2) We need to update 'data_len' also on each read from this skb. It looks like the above sentence is a left-over from previous version as, as this patch does not touch data_len. And I think it contradicts the previous one, so it...
2013 Oct 08
1
OT: errors compiling kernel module as a rpm package
...kernel(__dev_get_by_index) = 0x6a6d551b kernel(__init_waitqueue_head) = 0xffc7c184 kernel(__ip_select_ident) = 0x848695b3 kernel(__kmalloc) = 0x5a34a45c kernel(__list_add) = 0x0343a1a8 kernel(__nla_put) = 0x3e2e6f8c kernel(__nla_reserve) = 0x391515a6 kernel(__per_cpu_offset) = 0x32047ad5 kernel(__pskb_pull_tail) = 0xaa1b9b4e kernel(__put_net) = 0xcb27f3de kernel(__secpath_destroy) = 0x430555cc kernel(__skb_checksum_complete) = 0xcf0b750c kernel(__skb_warn_lro_forwarding) = 0x4d288688 kernel(__stack_chk_fail) = 0xf0fdf6cb kernel(__wake_up) = 0x642e54ac kernel(_read_lock) = 0x1a75caa3 kernel(_spin_lock...
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 :
2008 Sep 12
4
Custom build kernel patch fails big time.
...- IPV4_BEET_PHMAXLEN; + skb_push(skb, hdrlen); + iphv6 = skb->nh.ipv6h; + + skb->nh.raw = skb->data; + top_iphv6 = skb->nh.ipv6h; + + protocol = iphv6->nexthdr; + skb->nh.raw = skb_pull(skb, delta); + top_iphv4 = skb->nh.iph; + skb->h.raw = skb->data + hdrlen; + top_iphv4->ihl = (sizeof(struct iphdr) >> 2); + top_iphv4->version = 4; + top_iphv4->id = 0; + top_iphv4-&gt...