>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/