From patchwork Tue Dec 5 23:17:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10094101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3712960329 for ; Tue, 5 Dec 2017 23:17:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 289E728334 for ; Tue, 5 Dec 2017 23:17:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14AA7285CE; Tue, 5 Dec 2017 23:17:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF37A28334 for ; Tue, 5 Dec 2017 23:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752781AbdLEXRm (ORCPT ); Tue, 5 Dec 2017 18:17:42 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:45609 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752768AbdLEXRj (ORCPT ); Tue, 5 Dec 2017 18:17:39 -0500 Received: by mail-wm0-f68.google.com with SMTP id 9so4205520wme.4 for ; Tue, 05 Dec 2017 15:17:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sAvXla3qVA2hWr3Ait7Uori0+KVdvws46qlmfe5Gd4I=; b=aOE+Xfif2VAz38/p0mLthejH5Plzd1V5NyONDKCoQXci3irhQ/ULNCIUHHpVHhIM+b nYxCkpAlH7+r29vGWrcNHxAlywbvBnmDxw/cj4cj6MCvvINWuTH761pZ1dFWeNxsYAk6 Afr/x1HpySUtx0I7UKS3ZjGGrKAyjZkBhW2GZ1bnXPri//lg18ZJkq+lRIstEjg60Hnj sC04GqLJSsClo2LN2LoComxzVC70to0yB1hPRSQzllf3I88QtC97RuDrpi0lKh3ZMZ15 fOv/P/dxQYYJVGcwZD7e4YrwDR6goynzUpsBMaE8EvyqSa0sUK1iKRp6Jd3mJYX60AXF 6czw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sAvXla3qVA2hWr3Ait7Uori0+KVdvws46qlmfe5Gd4I=; b=avYNy9UDRrQikzZahvwALD61kjtQdzfSEIVs0PrnZoH3j9rnOlQMvCeRwmnI1iXmHH C9RZH/Yp4DAHJSZpdQYg297Bztmk+YFcThnugt4drdiiwV1LSjTwRcFXbqxctY5UcR0c qKEuTDIK5NgaO0LtAN5ygGU7RcXjDbYfv+DrX+vVH+qsQZqw+a1Qf8H+zG+BJUMgNSkd si+Kx3hwap0pxsBK+0ZMY5SOu9JmlO2hpodeoNxfncWIj6QorqzYdOQK2K1uWKx4kZrH LA0vmVYet9rYjrYG9zVNBZFCZ2AVPTRZ0nqwlbBqhfpXJFuNTD4ioco+cdOdTu5vRzfj HTOQ== X-Gm-Message-State: AKGB3mIb3bIJPQtmUnvMWxNM7Xk3UBO/b3BaYwuHhUM03oJ2047PEyxZ h9ZsMGN03P8obd2rhupl0OFytp3s5hs= X-Google-Smtp-Source: AGs4zMZPaKUdWyo5GWvcPb/Dfnul7J612SwbWYEuBuDcyxvskFFoZwuq7WkGmIKvjydFX9NEPou4xQ== X-Received: by 10.28.196.70 with SMTP id u67mr7831369wmf.100.1512515857707; Tue, 05 Dec 2017 15:17:37 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [70.74.179.152]) by smtp.gmail.com with ESMTPSA id q2sm1594407wma.19.2017.12.05.15.17.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 15:17:34 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1eMMSy-000549-66; Tue, 05 Dec 2017 16:17:32 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH 1/8] verbs: Fix typo in copying IBV_FLOW_SPEC_UDP/TCP 'val' Date: Tue, 5 Dec 2017 16:17:14 -0700 Message-Id: <20171205231721.19410-2-jgg@ziepe.ca> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171205231721.19410-1-jgg@ziepe.ca> References: <20171205231721.19410-1-jgg@ziepe.ca> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe The 'val' is a struct ibv_flow_tcp_udp_filter, not a ipv4_filter. ipv4_filter is 8 bytes while tcp_udp_filter is only 4 bytes. So this does not result in any bug, it is just a mistake. Fixes: 389de6a6ef4e ("Add receive flow steering support") Signed-off-by: Jason Gunthorpe --- libibverbs/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c index 62fcd0e4e2f400..b957550ed6fbdb 100644 --- a/libibverbs/cmd.c +++ b/libibverbs/cmd.c @@ -1844,7 +1844,7 @@ static int ib_spec_to_kern_spec(struct ibv_flow_spec *ib_spec, case IBV_FLOW_SPEC_UDP | IBV_FLOW_SPEC_INNER: kern_spec->tcp_udp.size = sizeof(struct ibv_kern_spec_tcp_udp); memcpy(&kern_spec->tcp_udp.val, &ib_spec->tcp_udp.val, - sizeof(struct ibv_flow_ipv4_filter)); + sizeof(struct ibv_flow_tcp_udp_filter)); memcpy(&kern_spec->tcp_udp.mask, &ib_spec->tcp_udp.mask, sizeof(struct ibv_flow_tcp_udp_filter)); break;