lkml.org 
[lkml]   [1999]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] fixed af_packet to not lose frames and made us crazy in
On 14 Mar 1999, Andi Kleen wrote:

>statistics. Note that only intrumenting af_packet is not enough, you have
>to cover all the OOM cases in net/core/dev.c as well.

void dev_queue_xmit_nit(struct sk_buff *skb, struct device *dev)
{
struct packet_type *ptype;
get_fast_time(&skb->stamp);

for (ptype = ptype_all; ptype!=NULL; ptype = ptype->next)
{
/* Never send packets back to the socket
* they originated from - MvS (miquels@drinkel.ow.org)
*/
if ((ptype->dev == dev || !ptype->dev) &&
((struct sock *)ptype->data != skb->sk))
{
struct sk_buff *skb2;
if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
break;

Yes, and looks like only one.

A counter seems a best choice than a printk. Agreed.

Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.180 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site