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, 22 Aug 2014 16:17:27 -0700 From: Prashant Sreedharan <prashant@...adcom.com> To: Benjamin Poirier <bpoirier@...e.de> CC: Michael Chan <mchan@...adcom.com>, <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v2 3/3] tg3: Fix tx_pending checks for tg3_tso_bug Benjamin, thanks for the patch. Broadcom QA will be testing the changes. Couple of comments below. > segs = skb_gso_segment(skb, tp->dev->features & > ~(NETIF_F_TSO | NETIF_F_TSO6)); > - if (IS_ERR(segs) || !segs) > + if (IS_ERR_OR_NULL(segs)) > goto tg3_tso_bug_end; > > do { > + unsigned int desc_cnt = skb_shinfo(segs)->nr_frags + 1; > + > nskb = segs; > segs = segs->next; > nskb->next = NULL; > - tg3_start_xmit(nskb, tp->dev); > + > + if (tg3_tx_avail(tnapi) <= segs_remaining - 1 + desc_cnt && > + skb_linearize(nskb)) { > + nskb->next = segs; > + segs = nskb; > + do { > + nskb = segs->next; > + > + dev_kfree_skb_any(segs); > + segs = nskb; > + } while (segs); If skb_linearize() fails need to increment the tp->tx_dropped count > + goto tg3_tso_bug_end; > + } > + segs_remaining--; > + if (segs_remaining) > + __tg3_start_xmit(nskb, tp->dev, segs_remaining); To clarify passing segs_remaining will make sure the queue is never stopped correct ? > + else > + tg3_start_xmit(nskb, tp->dev); > } while (segs); > -- 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