From patchwork Wed Aug 24 19:37:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12953934 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 822D8C3F6B0 for ; Wed, 24 Aug 2022 19:37:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238726AbiHXTh5 (ORCPT ); Wed, 24 Aug 2022 15:37:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238302AbiHXTh4 (ORCPT ); Wed, 24 Aug 2022 15:37:56 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 676FB792CD for ; Wed, 24 Aug 2022 12:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661369875; x=1692905875; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GBMUVO5SJrFf+c3wHtRDGdNq1vDaJRcApKC/pNJzKmg=; b=Zpf669+FLXriCVgpb2KjcVp/BJy4OowUFT7hxNAHkrhERMqxQQelN7Su mQQRg+Rb9Yzr7d+JvK7PXa5NhoWB/h27g+wxzlgYJ60lQ1uPbagYiWUW8 oWMSPUpShLAHF28cED/YnfktSiM92ha+/fUpK2jjQ9eTJ7+/FJMOoaSU5 jKZoXFpqZ62fI2tx6anR5KdWxphA6cnIxVmGm2tBnwCr+bn0Q/fCHEpuW 4GtDCvUtRRJmdKazK25PK4hPvsH15Dtx0UV19CTuBrKdgrPCS4nYWk7gy DgFOhy7zU2L9JITXZ4CvaP8eKZ4jJkjf1RgmVt6QlbsKpNjRWx4/LGjgE w==; X-IronPort-AV: E=McAfee;i="6500,9779,10449"; a="380351205" X-IronPort-AV: E=Sophos;i="5.93,261,1654585200"; d="scan'208";a="380351205" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2022 12:37:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,261,1654585200"; d="scan'208";a="785742652" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga005.jf.intel.com with ESMTP; 24 Aug 2022 12:37:53 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com Cc: Sylwester Dziedziuch , netdev@vger.kernel.org, anthony.l.nguyen@intel.com, Gurucharan Subject: [PATCH net 2/2] i40e: Fix incorrect address type for IPv6 flow rules Date: Wed, 24 Aug 2022 12:37:47 -0700 Message-Id: <20220824193748.874343-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220824193748.874343-1-anthony.l.nguyen@intel.com> References: <20220824193748.874343-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sylwester Dziedziuch It was not possible to create 1-tuple flow director rule for IPv6 flow type. It was caused by incorrectly checking for source IP address when validating user provided destination IP address. Fix this by changing ip6src to correct ip6dst address in destination IP address validation for IPv6 flow type. Fixes: efca91e89b67 ("i40e: Add flow director support for IPv6") Signed-off-by: Sylwester Dziedziuch Tested-by: Gurucharan (A Contingent worker at Intel) Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index 156e92c43780..e9cd0fa6a0d2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -4485,7 +4485,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi, (struct in6_addr *)&ipv6_full_mask)) new_mask |= I40E_L3_V6_DST_MASK; else if (ipv6_addr_any((struct in6_addr *) - &usr_ip6_spec->ip6src)) + &usr_ip6_spec->ip6dst)) new_mask &= ~I40E_L3_V6_DST_MASK; else return -EOPNOTSUPP;