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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B6AACA0FFA for ; Tue, 5 Sep 2023 18:50:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id D89A7812B4; Tue, 5 Sep 2023 18:50:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D89A7812B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1693939841; bh=LmVMLN6jNt+BadUZYe4x3nUFBx96JjQW7V7jAADNVbA=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=hV8oxXzAw+uKbTLV7sVUquvd40Now2UqYUj3JEO6i/7XvLSTNzWJWEnFR/VgLDCBW m539ZgSD7TUQ9fkSh9WydQchiAyXeS+H/JHkhllI2b+yPQzNjCQDhG9AcXQK/qVDSB kxC7i//2Dbqhdn2euS2dP6fkk+sLJf2JqOKA8g3bLWuqqmbbZVy8ovo8OPxtmPAz6c CwUEl8d6AtDNa6wkjL9/rBOr/xZMyuNzahFMnbvjXMevg3HndbbeNc5qcNO27OJP5J SEJYAqCEbVEt7N2tz0syjcGXrWvCRpXwAsslS/W6GhcdRJ1uE0ZLaWVtscDgBQbt1D TRHsuFRMnHtBA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LxDnePz3qbfJ; Tue, 5 Sep 2023 18:50:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id EAB2581801; Tue, 5 Sep 2023 18:50:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org EAB2581801 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 150261BF318 for ; Tue, 5 Sep 2023 18:50:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id DF50D60BE7 for ; Tue, 5 Sep 2023 18:50:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DF50D60BE7 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8J4MaQZ62ne1 for ; Tue, 5 Sep 2023 18:50:32 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by smtp3.osuosl.org (Postfix) with ESMTPS id 45EB560B69 for ; Tue, 5 Sep 2023 18:50:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 45EB560B69 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="407870956" X-IronPort-AV: E=Sophos;i="6.02,229,1688454000"; d="scan'208";a="407870956" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 11:50:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="884411876" X-IronPort-AV: E=Sophos;i="6.02,229,1688454000"; d="scan'208";a="884411876" Received: from nsnaveen-mobl.gar.corp.intel.com (HELO azaki-desk1.intel.com) ([10.252.34.119]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 11:50:21 -0700 From: Ahmed Zaki To: intel-wired-lan@lists.osuosl.org Date: Tue, 5 Sep 2023 12:50:18 -0600 Message-Id: <20230905185020.3613223-3-ahmed.zaki@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230905185020.3613223-1-ahmed.zaki@intel.com> References: <20230905185020.3613223-1-ahmed.zaki@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693939832; x=1725475832; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iKr+xE5/2U5HY6zZrcqfyy4GngTAuhfy1gLhkoXGx7E=; b=jCWVi7Rt3+Rq6Tc7yXEN8+f0YdOC9mjjW8r+YTSICLxzGfgTobdeTAb1 +iZu91uHRlaHpSLLDplvR4h+UzAyil7JlljBlfbCEYDxfPL71sdw0NFn1 m3pLimICkbvGVf4kspO52Hb0LOfyETWoIBQM94izUq6EFw9HYgMUHfEmZ 4Htj7NIjbyqNWmcj+bBDSyDpgT20UnM08/4SzdvtTmiayVch1DmPYobDW Vhsgx5gm4KAYSaBqkf9uh5725QnlaSPU2lQrJB6u8BsYW3VQ97wCROpao 66kvEIgnumntPi1GHa80sGySnwQNtMNOQ0ZbUOtckuD/hVLLbtoHrzNgt g==; X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jCWVi7Rt Subject: [Intel-wired-lan] [PATCH iwl-next v6 2/4] ice: Support FCS/CRC strip disable for VF X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Haiyue Wang , Jesse Brandeburg Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Haiyue Wang To support CRC strip enable/disable functionality, VF needs the explicit request VIRTCHNL_VF_OFFLOAD_CRC offload. Then according to crc_disable flag of Rx queue configuration information to set up the queue context. Signed-off-by: Haiyue Wang Reviewed-by: Jesse Brandeburg Signed-off-by: Ahmed Zaki --- drivers/net/ethernet/intel/ice/ice_virtchnl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c index b03426ac932b..c0c3e524c523 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c @@ -486,6 +486,9 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg) if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_REQ_QUEUES) vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_REQ_QUEUES; + if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_CRC) + vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_CRC; + if (vf->driver_caps & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) vfres->vf_cap_flags |= VIRTCHNL_VF_CAP_ADV_LINK_SPEED; @@ -1666,6 +1669,18 @@ static int ice_vc_cfg_qs_msg(struct ice_vf *vf, u8 *msg) vsi->rx_rings[i]->dma = qpi->rxq.dma_ring_addr; vsi->rx_rings[i]->count = qpi->rxq.ring_len; + if (qpi->rxq.crc_disable && + !(vf->driver_caps & VIRTCHNL_VF_OFFLOAD_CRC)) { + goto error_param; + } + + if (qpi->rxq.crc_disable) + vsi->rx_rings[q_idx]->flags |= + ICE_RX_FLAGS_CRC_STRIP_DIS; + else + vsi->rx_rings[q_idx]->flags &= + ~ICE_RX_FLAGS_CRC_STRIP_DIS; + if (qpi->rxq.databuffer_size != 0 && (qpi->rxq.databuffer_size > ((16 * 1024) - 128) || qpi->rxq.databuffer_size < 1024)) -- 2.34.1 _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan