[v2,0/2] check illegal packets
Message ID | 20220927071522.3656059-1-kevinx.liu@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA3E4A00C2; Tue, 27 Sep 2022 09:24:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78BD04113C; Tue, 27 Sep 2022 09:24:39 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6B54B410D0 for <dev@dpdk.org>; Tue, 27 Sep 2022 09:24:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664263477; x=1695799477; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q33uzLYlwi8PBf79kwwONCa50QNuLvpVoqB5kIcxLxk=; b=QRNsfEn7rMBHECXs80h/90+EKN2IM9zn/MImEpgWvcfwlL2sonhcJP99 ZRe+kzs8E0aYb4gNnX+DJbA/vELNgVRJjZTzIpz37ADYF8pAClSxbhsOb VWo294u0IbeVENyTHQAdpuSh54P4mBXnskcCMFsKUb9NPSJtXDyZLJDda Gb2GcowfFwJLAfOhhL+GW/qlMh2cOQzWJR6GpTSmcKzUQY7iqdgKafZbw 1OzBB2bAcdYdl2bcTVAul3hJ5Z47StMAiCwLaaHqwz3xSH9P/wEsu3DFq GuMrU7IhYZQMT1wsbxBRNGHP9fiWgJqoUW4YFLlp/jbrF36PAQDRv2x8i w==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="288395299" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="288395299" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 00:24:36 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="652182558" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="652182558" Received: from intel-cd-odc-robin.cd.intel.com ([10.240.178.136]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 00:24:34 -0700 From: Kevin Liu <kevinx.liu@intel.com> To: dev@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com, Kevin Liu <kevinx.liu@intel.com> Subject: [PATCH v2 0/2] check illegal packets Date: Tue, 27 Sep 2022 07:15:20 +0000 Message-Id: <20220927071522.3656059-1-kevinx.liu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220922070426.788643-1-kevinx.liu@intel.com> References: <20220922070426.788643-1-kevinx.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Message
Kevin Liu
Sept. 27, 2022, 7:15 a.m. UTC
Check whether the data packet is illegal of ice and iavf driver. v2: Change the scheme, check the data_len and update commit log. Kevin Liu (2): net/iavf: check illegal packets net/ice: check illegal packets drivers/net/iavf/iavf_rxtx.c | 9 +++++++++ drivers/net/iavf/iavf_rxtx.h | 2 ++ drivers/net/ice/ice_rxtx.c | 11 +++++++++++ drivers/net/ice/ice_rxtx.h | 2 ++ 4 files changed, 24 insertions(+)
Comments
On Tue, Sep 27, 2022 at 9:24 AM Kevin Liu <kevinx.liu@intel.com> wrote: > > Check whether the data packet is illegal of ice and iavf driver. > > v2: > Change the scheme, check the data_len and update commit log. > > Kevin Liu (2): > net/iavf: check illegal packets > net/ice: check illegal packets > > drivers/net/iavf/iavf_rxtx.c | 9 +++++++++ > drivers/net/iavf/iavf_rxtx.h | 2 ++ > drivers/net/ice/ice_rxtx.c | 11 +++++++++++ > drivers/net/ice/ice_rxtx.h | 2 ++ > 4 files changed, 24 insertions(+) This series looks wrong to me. - What happens if the application requests TSO to the nic? - Checking data_len of a mbuf means only checking the size of the first segment, so if any limitation applies to the packet size, it should by checking pkt_len. I will probably send reverts for the two patches.
On 18/09/2023 15:42, David Marchand wrote: > On Tue, Sep 27, 2022 at 9:24 AM Kevin Liu <kevinx.liu@intel.com> wrote: >> >> Check whether the data packet is illegal of ice and iavf driver. >> >> v2: >> Change the scheme, check the data_len and update commit log. >> >> Kevin Liu (2): >> net/iavf: check illegal packets >> net/ice: check illegal packets >> >> drivers/net/iavf/iavf_rxtx.c | 9 +++++++++ >> drivers/net/iavf/iavf_rxtx.h | 2 ++ >> drivers/net/ice/ice_rxtx.c | 11 +++++++++++ >> drivers/net/ice/ice_rxtx.h | 2 ++ >> 4 files changed, 24 insertions(+) > > This series looks wrong to me. > > - What happens if the application requests TSO to the nic? > - Checking data_len of a mbuf means only checking the size of the > first segment, so if any limitation applies to the packet size, it > should by checking pkt_len. > > I will probably send reverts for the two patches. > > there is a fix also that needs to be checked: 688cb2f2c61e ("net/ice: fix scalar Tx path segment")