Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp725378pxb; Tue, 2 Feb 2021 16:48:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgkn8lePT0iX5XAeRAhAWAnpk2lTmLhhJEMgKCLszRz5liFL09iUPB8fFk+ydjqvIux3vG X-Received: by 2002:a05:6402:5206:: with SMTP id s6mr651242edd.92.1612313313961; Tue, 02 Feb 2021 16:48:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612313313; cv=none; d=google.com; s=arc-20160816; b=QcX3jA+Ru/H3ldNBkjbvutwhdzjZG8ethXifpi8lh0Qd4qvFGW54j85P5w8vEMNKLD 5/bJZN7UvGx65LVkXbMPbYaAkSbXyntwJzul3izSZ7uzBiv2y3+kDxSZdAnCNUwxnVrp lCLjvaGleOoxqZBJd3MW5YU2FrwQ/60G6N3SKU+m/DKmc7Fptj1bomQfxUnfAUFYUINH /Vw5WGSJ7h4mYVMVoO6XdkcccSEfOVretJhk5vIFQ/X1lJRRrWWr+UD0STHJ/LhVfYOC iG+4F02ZhF4BsNbzphT+HOVts3kl5l1WLPGaSfsMfQ+IuaqpR0QfOgGv45oUDBuS5uQG qY9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bt/mxg2vvvIigEag1PLT562NxYUxTk4IxP1Y7gzy7cQ=; b=cXwZ5glHrGBSIne4gQh3+ZsIBvYBT3nYpnHFH1SAUnN232eKe99ZOrHwz+MZEj4Spk oPKqKPhferSoeBEf8YntTYTo/gTVx/6CSsS8QUwepjy/bJz7MHjsRI9/yVVH7qqiLxl0 03aS6/e3bJYYv09bMZom7kBRTfCpdoNLtGqnS6H9S5jNGSU9y+m7pBzCcvTcD+BLa7ig C3MSwhFOiqfB0fRrfVany1b5gY5cIjO58kfiw53Ur74hIjjwItM5G8/aA0RV/WMMXvKj 9QbE9lzxaTQ4UXH/yf4nlM1jKKbgd+/+VuTbFBrRSXQ/9fFY+iv5Dj2v+wKr7Zsx750q +fQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=udRVu2h5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z11si273135ejj.440.2021.02.02.16.48.08; Tue, 02 Feb 2021 16:48:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=udRVu2h5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240011AbhBBToM (ORCPT + 99 others); Tue, 2 Feb 2021 14:44:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:40458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233268AbhBBNxX (ORCPT ); Tue, 2 Feb 2021 08:53:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E2E9364FC9; Tue, 2 Feb 2021 13:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273441; bh=oHPrG3Zo04+XEM1eUNerAGQWt+ylIArg4kz+BKnOPAU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=udRVu2h55/rEBSEHI5OdFq0YhSNcxuet8IebiC13IJRaoZn83fUJXOF66hrhlEAb+ omAMnHcaRZbhWGJEAAfCcfzG/WwpdO/r05iM7sWWWFx6Yo/Z3zVyiTQTP2+O0UMS4l kHyMYg0yXp6xAwtwl2gtSGn0LPxEgqLCf0+u36+Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Henry Tieman , Paul Menzel , Tony Brelinski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.10 107/142] ice: fix FDir IPv6 flexbyte Date: Tue, 2 Feb 2021 14:37:50 +0100 Message-Id: <20210202133002.123959433@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132957.692094111@linuxfoundation.org> References: <20210202132957.692094111@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Henry Tieman [ Upstream commit 29e2d9eb82647654abff150ff02fa1e07362214f ] The packet classifier would occasionally misrecognize an IPv6 training packet when the next protocol field was 0. The correct value for unspecified protocol is IPPROTO_NONE. Fixes: 165d80d6adab ("ice: Support IPv6 Flow Director filters") Signed-off-by: Henry Tieman Reviewed-by: Paul Menzel Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c index 2d27f66ac8534..192729546bbfc 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c @@ -1576,7 +1576,13 @@ ice_set_fdir_input_set(struct ice_vsi *vsi, struct ethtool_rx_flow_spec *fsp, sizeof(struct in6_addr)); input->ip.v6.l4_header = fsp->h_u.usr_ip6_spec.l4_4_bytes; input->ip.v6.tc = fsp->h_u.usr_ip6_spec.tclass; - input->ip.v6.proto = fsp->h_u.usr_ip6_spec.l4_proto; + + /* if no protocol requested, use IPPROTO_NONE */ + if (!fsp->m_u.usr_ip6_spec.l4_proto) + input->ip.v6.proto = IPPROTO_NONE; + else + input->ip.v6.proto = fsp->h_u.usr_ip6_spec.l4_proto; + memcpy(input->mask.v6.dst_ip, fsp->m_u.usr_ip6_spec.ip6dst, sizeof(struct in6_addr)); memcpy(input->mask.v6.src_ip, fsp->m_u.usr_ip6_spec.ip6src, -- 2.27.0