lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 14 Sep 2007 16:15:19 +0400 From: Evgeniy Polyakov <johnpol@....mipt.ru> To: Krishna Kumar <krkumar2@...ibm.com> Cc: herbert@...dor.apana.org.au, hadi@...erus.ca, kaber@...sh.net, shemminger@...ux-foundation.org, davem@...emloft.net, jagana@...ibm.com, Robert.Olsson@...a.slu.se, peter.p.waskiewicz.jr@...el.com, xma@...ibm.com, gaagaan@...il.com, kumarkr@...ux.ibm.com, rdreier@...co.com, rick.jones2@...com, mcarlson@...adcom.com, jeff@...zik.org, mchan@...adcom.com, general@...ts.openfabrics.org, netdev@...r.kernel.org, tgraf@...g.ch, randy.dunlap@...cle.com, sri@...ibm.com Subject: Re: [PATCH 3/10 REV5] [sched] Modify qdisc_run to support batching Hi Krishna. On Fri, Sep 14, 2007 at 02:31:56PM +0530, Krishna Kumar (krkumar2@...ibm.com) wrote: > +int dev_add_skb_to_blist(struct sk_buff *skb, struct net_device *dev) > +{ > + if (!list_empty(&ptype_all)) > + dev_queue_xmit_nit(skb, dev); > + > + if (netif_needs_gso(dev, skb)) { > + if (unlikely(dev_gso_segment(skb))) { > + kfree_skb(skb); > + return 0; > + } > + > + if (skb->next) { > + int count = 0; > + > + do { > + struct sk_buff *nskb = skb->next; > + > + skb->next = nskb->next; > + __skb_queue_tail(dev->skb_blist, nskb); > + count++; > + } while (skb->next); Could it be list_move()-like function for skb lists? I'm pretty sure if you change first and the last skbs and ke of the queue in one shot, result will be the same. Actually how many skbs are usually batched in your load? > + /* Reset destructor for kfree_skb to work */ > + skb->destructor = DEV_GSO_CB(skb)->destructor; > + kfree_skb(skb); Why do you free first skb in the chain? > + return count; > + } > + } > + __skb_queue_tail(dev->skb_blist, skb); > + return 1; > +} -- Evgeniy Polyakov - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists