search for: skb_share

Displaying 5 results from an estimated 5 matches for "skb_share".

Did you mean: skb_shared
2007 Apr 18
1
[Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged{I,AR}P packets
...03-02-25 15:23:09.000000000 >+0100 >+++ linux-2.4/net/8021q/vlan_dev.c 2003-10-07 16:01:29.000000000 +0200 >@@ -75,7 +75,12 @@ > static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff >*skb) > { > if (VLAN_DEV_INFO(skb->dev)->flags & 1) { >- skb = skb_share_check(skb, GFP_ATOMIC); >+ if (skb_shared(skb) || skb_cloned(skb)) { >+ struct sk_buff *nskb; >+ nskb = skb_copy(skb, GFP_ATOMIC); >+ kfree_skb(skb); >+ skb = nskb; >+ } > if (skb) { > /* Lifted from Gleb's VLAN code... */ > memmove(skb->data - ET...
2009 May 29
3
[PATCH 1/4] net: skb_orphan on dev_hard_start_xmit
...ly a - * good thing. We also run them without holding our Tx queue lock, - * unlike what reclaim_completed_tx() would otherwise do. - * - * Run the destructor before telling the DMA engine about the packet - * to make sure it doesn't complete and get freed prematurely. - */ - if (likely(!skb_shared(skb))) - skb_orphan(skb); - write_tx_pkt_wr(adap, skb, pi, pidx, gen, q, ndesc, compl); check_ring_tx_db(adap, q); return NETDEV_TX_OK; diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -72,8 +72,6 @@ static int loopbac...
2009 May 29
3
[PATCH 1/4] net: skb_orphan on dev_hard_start_xmit
...ly a - * good thing. We also run them without holding our Tx queue lock, - * unlike what reclaim_completed_tx() would otherwise do. - * - * Run the destructor before telling the DMA engine about the packet - * to make sure it doesn't complete and get freed prematurely. - */ - if (likely(!skb_shared(skb))) - skb_orphan(skb); - write_tx_pkt_wr(adap, skb, pi, pidx, gen, q, ndesc, compl); check_ring_tx_db(adap, q); return NETDEV_TX_OK; diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -72,8 +72,6 @@ static int loopbac...
2007 Apr 18
5
[Bridge] RFC: [PATCH] bridge vlan integration
...int untagged) +{ + struct sk_buff *skb = *pskb; + + if (skb->vlan == 0) /* don't touch the frame */ + return 0; + + if (skb->vlan == untagged) { + /* frame should be untagged */ + if (eth_hdr(skb)->h_proto == htons(ETH_P_8021Q)) { + /* remove VLAN tag */ + if (skb_cloned(skb) || skb_shared(skb)) { + struct sk_buff *new_skb; + + new_skb = skb_copy(skb, GFP_ATOMIC); + kfree_skb(skb); + if (!new_skb) + return 1; + *pskb = skb = new_skb; + } + + skb->mac.raw += VLAN_HLEN; + memmove(skb->mac.raw, skb->data, ETH_ALEN * 2); + skb_pull(skb, VLAN_HLEN); +...
2007 Apr 18
1
[Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged{I,AR}P packets
>-----Original Message----- >From: Ben Greear [mailto:greearb@candelatech.com] >Sent: Monday, October 06, 2003 10:24 PM >To: Bart De Schuymer >Cc: netdev@oss.sgi.com; vlan@wanfear.com; bridge >Subject: [VLAN] Re: [PATCH/RFC] Let {ip,arp}tables "see" bridged VLAN >tagged{I,AR}P packets > > >Bart De Schuymer wrote: >> - add some code in