Re: [PATCH]pktgen oops when used with balance-tlb bonding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 22, 2006 at 07:11:21PM -0400, Tien ChenLi wrote:
> I fixed a bug in pktgen so it won't cause oops when used with
> balance-tlb or balance-alb bonding driver:
> 
> --- linux-2.6.17.4/net/core/pktgen.c.orig       2006-07-06 
> 16:02:28.000000000 -0
> 400
> +++ linux-2.6.17.4/net/core/pktgen.c    2006-07-10 16:40:47.000000000 -0400
> @@ -2149,6 +2149,9 @@
>        skb->mac.raw = ((u8 *) iph) - 14 - pkt_dev->nr_labels*sizeof(u32);
>        skb->dev = odev;
>        skb->pkt_type = PACKET_HOST;
> +       skb->mac.raw = eth;
          ^^^^^^^^^^^^
Are you sure about this ? I don't understand why you change skb->mac.raw
here while it's still assigned 3 lines above. Either of those is unneeded
and/or erroneous.

> +       skb->nh.iph = iph;
> +       skb->h.uh = udph;
> 
>        if (pkt_dev->nfrags <= 0)
>                pgh = (struct pktgen_hdr *)skb_put(skb, datalen);
> 
> The root cause is that the bond_alb_xmit in bonding will peek the
> destination address in packet via the skb->nh.iph pointer, generally
> this will be filled by upper layer network driver, but the packet
> generated by pktgen will be sent to device driver so it will need to
> set this pointer correctly. The other two pointers are not necessary
> for now, they are set to avoid similar problem.

Fine. Please confirm your intention about mac.raw above, and as David
said, please sign-off the patch and check your mailer for unexpected
tabs/spaces conversions.

> Chen-Li Tien

Thanks in advance,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux