From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751076AbWGVXLX (ORCPT ); Sat, 22 Jul 2006 19:11:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751079AbWGVXLX (ORCPT ); Sat, 22 Jul 2006 19:11:23 -0400 Received: from nf-out-0910.google.com ([64.233.182.184]:64611 "EHLO nf-out-0910.google.com") by vger.kernel.org with ESMTP id S1751076AbWGVXLX (ORCPT ); Sat, 22 Jul 2006 19:11:23 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=KgBM4U36/FrQVLsJfJ2MTLEz4/5JrKnjd99qJmYp2J2sqavB3JpSRfclrMfBZ5RiA4xuQmitFD6VU3b4zCMDkVv3lNPDQChkHqOSx9XXIxp0i0z1gahypH6iA9Ua/7amLeqo4QaZsl7c+LCfT7noRsRzCdda/i3QU5/LRrQWrO8= Message-ID: Date: Sat, 22 Jul 2006 19:11:21 -0400 From: "Tien ChenLi" To: linux-kernel@vger.kernel.org Subject: [PATCH]pktgen oops when used with balance-tlb bonding MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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; + 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. Chen-Li Tien