From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id E5DE698 for ; Tue, 24 Jul 2018 18:08:38 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id t6-v6so4691727wrn.7 for ; Tue, 24 Jul 2018 09:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kbgVM6OWRb7e2rh7yGhUQwOa2+635dCE5UYCXRV+BJM=; b=JvD7mlQxdW5kKckEWMcz+ZdmgQoGeZGQmq461uJEnDPjGm9GQpTpLY0aMPWJad7197 Uzl65HD7asUTNhex7AEtitGIPy1v9LzkvnHeiAQ2PQbJJs+OUhL0v9lwuuWaWkuGSP0G SZ9zSKP3aIb22Moam1W0kGCqKFfJqfDlfQAp35veGqGEWr3MFrXyFYezEG7St7cxIgXz K2PGW9VSH1ZstOFhaT2f8DJUJSM+ZIw6HoOzdEcGvMlv1uOdOi9ofGL7SWC0YKZdNNn5 9Bwsr0BXMYHKjWsx6YbCUt/ATYB/sa872NgXI1iz5aHTzba91UQqBEUEXoBpToMp4Afr acgA== 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=kbgVM6OWRb7e2rh7yGhUQwOa2+635dCE5UYCXRV+BJM=; b=FMmujqaGDHkLH7G5LicUHz9sC0oXinwd0UQ/NT97j4rwUIQLBH54mfMM8nLYzyXebp MDI4sgCttJNvl8raVf2rzBwE+rzSb4HAWIhc4Tzahbi64XloO5wLtZVGipkCwIhAf7tj dSe4etCS3xII7VtGCgG3DO1P6qc2IhQ+HkNrIjZYMGhW8SF9QUlEzwud6/HGxaeS2EKr JPVGs/6jZ0JQObfE8L7WJXe1UVBsqkY6m81MqhKCoJdQsSv28b0a0NRJ8Z+fqIN3MGlS O01W7K0h7IW0BBStzF90pKDFLDMAFI/cqjkyTT6W5HEw1KL5c1JSBe0r+acY01cE17If guPA== X-Gm-Message-State: AOUpUlFgicG7QRhpttNY7mmtUO6shWUhkR2QWsxIf3t/+oa7mkAXIVy/ pkpcF2Ihuf0CDJfn/XduvjrsVCN0ZKs= X-Google-Smtp-Source: AAOMgpdXeT5F6aNhED1zPZn1KUuC0WsXaMh4kESj7xOjJoUZGr3kbmAu5HTwMD5lD2Jg+5/DxVhi9w== X-Received: by 2002:adf:ef8c:: with SMTP id d12-v6mr12900362wro.195.1532448518717; Tue, 24 Jul 2018 09:08:38 -0700 (PDT) Received: from localhost ([2a00:23c5:be94:4600:7b12:f8a0:fd52:f87d]) by smtp.gmail.com with ESMTPSA id m207-v6sm2511886wma.31.2018.07.24.09.08.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Jul 2018 09:08:37 -0700 (PDT) From: luca.boccassi@gmail.com To: Wei Zhao Cc: Wenzhuo Lu , dpdk stable Date: Tue, 24 Jul 2018 17:07:29 +0100 Message-Id: <20180724160752.20287-11-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724160752.20287-1-luca.boccassi@gmail.com> References: <20180724160752.20287-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/ixgbe: fix tunnel type set error for FDIR' has been queued to LTS release 16.11.8 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 16:08:39 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 5ec767e444ef4fd4a96aa2dd0ec2efcf5d735eaa Mon Sep 17 00:00:00 2001 From: Wei Zhao Date: Thu, 14 Jun 2018 16:17:28 +0800 Subject: [PATCH] net/ixgbe: fix tunnel type set error for FDIR [ upstream commit 876b450ed99d2c96c5b71360cc84f7b0b8f506f4 ] Tunnel type format should be translated to ixgbe required format before register set in FDIR cloud mode, Ans also some register not useful in cloud mode but only useful in IP mode should be set to zero as datasheet request. Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for X550") Fixes: 11777435c727 ("net/ixgbe: parse flow director filter") Signed-off-by: Wei Zhao Acked-by: Wenzhuo Lu --- drivers/net/ixgbe/ixgbe_ethdev.h | 5 +++++ drivers/net/ixgbe/ixgbe_fdir.c | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h index a4e2996a4..e1a97ea37 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/ixgbe/ixgbe_ethdev.h @@ -113,6 +113,11 @@ #define IXGBE_5TUPLE_MAX_PRI 7 #define IXGBE_5TUPLE_MIN_PRI 1 +/* bit of VXLAN tunnel type | 7 bits of zeros | 8 bits of zeros*/ +#define IXGBE_FDIR_VXLAN_TUNNEL_TYPE 0x8000 +/* bit of NVGRE tunnel type | 7 bits of zeros | 8 bits of zeros*/ +#define IXGBE_FDIR_NVGRE_TUNNEL_TYPE 0x0 + #define IXGBE_RSS_OFFLOAD_ALL ( \ ETH_RSS_IPV4 | \ ETH_RSS_NONFRAG_IPV4_TCP | \ diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c index 351167a64..62955bb75 100644 --- a/drivers/net/ixgbe/ixgbe_fdir.c +++ b/drivers/net/ixgbe/ixgbe_fdir.c @@ -720,8 +720,17 @@ ixgbe_fdir_filter_to_atr_input(const struct rte_eth_fdir_filter *fdir_filter, input->formatted.inner_mac, fdir_filter->input.flow.tunnel_flow.mac_addr.addr_bytes, sizeof(input->formatted.inner_mac)); - input->formatted.tunnel_type = - fdir_filter->input.flow.tunnel_flow.tunnel_type; + if (fdir_filter->input.flow.tunnel_flow.tunnel_type == + RTE_FDIR_TUNNEL_TYPE_VXLAN) + input->formatted.tunnel_type = + IXGBE_FDIR_VXLAN_TUNNEL_TYPE; + else if (fdir_filter->input.flow.tunnel_flow.tunnel_type == + RTE_FDIR_TUNNEL_TYPE_NVGRE) + input->formatted.tunnel_type = + IXGBE_FDIR_NVGRE_TUNNEL_TYPE; + else + PMD_DRV_LOG(ERR, " invalid tunnel type arguments."); + input->formatted.tni_vni = fdir_filter->input.flow.tunnel_flow.tunnel_id >> 8; } @@ -950,8 +959,7 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw, IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(2), 0); } else { /* tunnel mode */ - if (input->formatted.tunnel_type != - RTE_FDIR_TUNNEL_TYPE_NVGRE) + if (input->formatted.tunnel_type) tunnel_type = 0x80000000; tunnel_type |= addr_high; IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(0), addr_low); @@ -959,6 +967,9 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw, IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(2), input->formatted.tni_vni); } + IXGBE_WRITE_REG(hw, IXGBE_FDIRIPSA, 0); + IXGBE_WRITE_REG(hw, IXGBE_FDIRIPDA, 0); + IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, 0); } /* record vlan (little-endian) and flex_bytes(big-endian) */ -- 2.18.0