From patchwork Sun Mar 8 12:50:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Blakey X-Patchwork-Id: 1251023 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48b1Rg4N07z9sNg for ; Sun, 8 Mar 2020 23:50:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C77A020483; Sun, 8 Mar 2020 12:50:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QLgHgeSuaVCp; Sun, 8 Mar 2020 12:50:36 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 69F5E203E1; Sun, 8 Mar 2020 12:50:36 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 57698C1D7E; Sun, 8 Mar 2020 12:50:36 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id CF412C0177 for ; Sun, 8 Mar 2020 12:50:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B7D6B87EE0 for ; Sun, 8 Mar 2020 12:50:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T4QLwxBkq74g for ; Sun, 8 Mar 2020 12:50:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by whitealder.osuosl.org (Postfix) with ESMTP id DEF4887C20 for ; Sun, 8 Mar 2020 12:50:32 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE2 (envelope-from paulb@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2020 14:50:28 +0200 Received: from reg-r-vrt-019-120.mtr.labs.mlnx (reg-r-vrt-019-120.mtr.labs.mlnx [10.213.19.120]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 028CoS92016854; Sun, 8 Mar 2020 14:50:28 +0200 From: Paul Blakey To: Paul Blakey , dev@openvswitch.org Date: Sun, 8 Mar 2020 14:50:23 +0200 Message-Id: <1583671823-14350-1-git-send-email-paulb@mellanox.com> X-Mailer: git-send-email 1.8.4.3 Subject: [ovs-dev] [PATCH] tc: Fix nat port range when offloading ct action X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Port range struct is currently union so the last min/max port assignment wins, and kernel doesn't receive the range. Change it to struct type. Fixes: 2bf6ffb76ac6 ("netdev-offload-tc: Add conntrack nat support") Signed-off-by: Paul Blakey Acked-by: Roi Dayan --- lib/tc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tc.h b/lib/tc.h index d31c095..24a4994 100644 --- a/lib/tc.h +++ b/lib/tc.h @@ -235,7 +235,7 @@ struct tc_action { } ipv6; }; - union { + struct { ovs_be16 min; ovs_be16 max; } port;