From patchwork Mon Apr 1 21:25:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 2372791 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E124E3FD40 for ; Mon, 1 Apr 2013 21:25:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758175Ab3DAVZc (ORCPT ); Mon, 1 Apr 2013 17:25:32 -0400 Received: from mail-qe0-f53.google.com ([209.85.128.53]:48131 "EHLO mail-qe0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756623Ab3DAVZb (ORCPT ); Mon, 1 Apr 2013 17:25:31 -0400 Received: by mail-qe0-f53.google.com with SMTP id q19so1467889qeb.40 for ; Mon, 01 Apr 2013 14:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=NJ0q8BGUBW5FGqkn6l/SGsWYV2ducySkMeVE8uDrQ7Y=; b=U8IWsw7Q3OsY1ZqVNBD9dy/9aTiA+8BGPqNDxFfVlVsRvtWve2EBzHxgzVpHRkiQ7c daewGI6COLE3z1WiIE6Ub7Y8WAH6Q3Br/B+wliVlRx/VgYJpOHoy4pW7tQ7SUmk4xKcH h7bGgDJy4zAPmEnj5q27/0EH/Z6RqH44BMpe0zRKfPg0WQi6rmwh9H3vw1rUEdfdGrOA NRWpUuD/P6GkO5wlpIvHMbozQC73odJKlvy0s2qZENIo3oGgWrVj9Tnj16KwU/de7YfX 3xKTxl+LnMNZF95dTmcIdEK+wdKZ5cnvLIbt0tJV0osbutLlplI7Qmvj/4qzQYiMd+ss nZ9g== MIME-Version: 1.0 X-Received: by 10.49.127.116 with SMTP id nf20mr15703451qeb.2.1364851530595; Mon, 01 Apr 2013 14:25:30 -0700 (PDT) Received: by 10.49.30.226 with HTTP; Mon, 1 Apr 2013 14:25:30 -0700 (PDT) In-Reply-To: <3fde29b99442969e59a7a9cf4f63a26858f00a0a.1364315061.git.dledford@redhat.com> References: <3fde29b99442969e59a7a9cf4f63a26858f00a0a.1364315061.git.dledford@redhat.com> Date: Tue, 2 Apr 2013 00:25:30 +0300 Message-ID: Subject: Re: [PATCH] ipoib: fix hard_header return value From: Or Gerlitz To: Doug Ledford , Erez Shitrit Cc: linux-rdma , Roland Dreier , Vladimir Sokolovsky , Yevgeny Petrilin Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Doug Ledford wrote: > If you have a patched up dhcp server (and dhclient), Could you be more specific, I assume you refer to the ISC dhcp bits, which version and which patches? AFAIK they don't give you access to their source repo but rather only to drops plus possibly patches which is a bit more tedious to follow, oh wel... > they will use AF_PACKET/SOCK_DGRAM pair to send dhcp packets over IPoIB. > This has worked since forever if you use OFED kernels or one of the distribution > kernels. However, when testing an upstream kernel, it has been broken > for a very long time (I tested 2.6.34, 2.6.38, 3.0, 3.1, 3.8, HEAD). IMO doesn't seem relevant to the upstream commit message > It turns out that the hard_header routine in ipoib is not following > the API and is returning 0 even when it pushed data onto the skb. This > then causes af_packet.c to overwrite the header just pushed with data > from user space. This header is immediately referenced in the > ipoib_start_xmit routine cool, I assume we want this fix to go for -stable after spending some time upstream, e.g probably by the time 3.9 is released and some more testing is done on the patch (I'll advocate for that @ MLNX, copied some folks now) get that to -stable too. Erez, in the code we use internally which is based on upstream 3.7 do we have DHCP/IPoIB working without this patch? > so I'm wondering how this ever worked in > distro/ofed kernels that also have this bug, but fixing the bug here > makes things work in upstream kernels. same for the last three lines Signed-off-by: Doug Ledford --- drivers/infiniband/ulp/ipoib/ ipoib_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 8534afd..31dd2a7 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -828,7 +828,7 @@ static int ipoib_hard_header(struct sk_buff *skb, */ memcpy(cb->hwaddr, daddr, INFINIBAND_ALEN); - return 0; + return sizeof *header; } static void ipoib_set_mcast_list(struct net_device *dev)