From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0FE8D45CCD for ; Mon, 11 Nov 2024 18:46:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05A10427B3; Mon, 11 Nov 2024 18:46:43 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mails.dpdk.org (Postfix) with ESMTP id 5A9A140041; Mon, 11 Nov 2024 18:46:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731347201; x=1762883201; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=tHiUak2ntVkL57blNxSkeJY7Z//fjzIv1nR9xZ0IsxU=; b=oKOlqDf0+MvJ4sy36J2HEu73FBC+GsNDyutjcAOIiZX/Y4dURRkuFWrf wM2wlu832HQYq1txw3uiqVBr5adRtOdxgZCKxtIBFGb8nHLJ29bamJXaC bvo80X3O75NUYEuLZ+juRzHFNMFalwLPdLdS4wiaTDLEsRhEPwRRiOaXM FA/6k9I6g2wa4wYuTG4MrG3aLbDSqJMUlUjFeiTVnXEFKvXJ1QcSKIwbH SvzL9XTJ+e1Ln54ZntOEX/FkbWNZ3a//ogZZfrwQYB8lj9+vw/CVg/8Y9 nAcY00hWqlf1YO3xi6iC8NRcs7c8WUqEdnZFyoNDX23nQMOsw2mot0U+E w==; X-CSE-ConnectionGUID: tyyHeMlcQICfhQT1uXG5Kw== X-CSE-MsgGUID: WYpR63AcSP+9BS0QcL+qxw== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="34850794" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="34850794" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2024 09:46:40 -0800 X-CSE-ConnectionGUID: jxNyL8dsQaG91pI6Jl2ocw== X-CSE-MsgGUID: OhcDdE12Q9q3UHLDZsqxww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,145,1728975600"; d="scan'208";a="117829414" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 11 Nov 2024 09:46:39 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 11 Nov 2024 09:46:38 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 11 Nov 2024 09:46:38 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 11 Nov 2024 09:46:38 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=q/OY3a8GgkBoRcTxrPDLhzrllA7Wrs6WNTdP2FJJKrQYWfeaCMQluPgvPk1MMnvPJCI32V1WAM+RZI1mGLJ83GIkGjb6/TIIjYj3hZYwfILL6i7I22JnwBWTi3ca9oOJFSTKvB3R7cBh2iSC6bz4vAJ2TsW3hU/ORjdibhguy5yJQmNX7Eun17TvWOjmYMDfnC5oeskA0eFpQ831tcYGrWDuhj1BKwRmSd/W8zoXmA4R8mLaEGIY3QxwJmx45o9jzhOcJLZc1L7H5MhVapNkMSX3ncrREaB0eWYf6zh6cLBLXaRL81QAIsWbmEF/rahP4Yxv4F+BqwTqQtSrJ//RkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZeWcq+tZNNQxpDi9HOSQszRlmz2Ejdraq3JSi60k2/Y=; b=h5fLvC61QYcbooOIx6qQGM7A1BIbxK5JAYuZNv4vz71hNN1rAduL0dz0NnjONcE6N1H+3heIZFgRw3fbWt9D6p1YuWkVbApBP07MjnRVFMDSdrv1N947xXAMBCn3JQC+SW4J8NYCBJPTdevcQrSslEP1kSgf/zcsbzR0l0CqhJ+Na/Paxnx4f9slHuIJlbZwe2qOCh0TvyRRxGurN4qWUZhRkzjTecMtbbhVfiodn3aZuf8WnArr8XjwxxPsYm1AjxAMzLHdgZ+rG7KlT6Qy4leCUYNPDysgL0vmLf1gCHRhsG+HQ/wFI86JzNLwnzOjtMSCSqfpmD4fUZdmONNyPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by CH3PR11MB7390.namprd11.prod.outlook.com (2603:10b6:610:14e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Mon, 11 Nov 2024 17:46:34 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b%3]) with mapi id 15.20.8137.027; Mon, 11 Nov 2024 17:46:33 +0000 Message-ID: <1acab313-ba0a-4934-8183-624ab8a1cb07@intel.com> Date: Mon, 11 Nov 2024 17:46:29 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/iavf: add segment-length check to Tx prep To: Bruce Richardson , CC: , Padraig Connolly , "Ian Stokes" , Qi Zhang , Kevin Liu References: <20241111164221.3031276-1-bruce.richardson@intel.com> Content-Language: en-US From: "Medvedkin, Vladimir" In-Reply-To: <20241111164221.3031276-1-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DUZPR01CA0048.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::17) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|CH3PR11MB7390:EE_ X-MS-Office365-Filtering-Correlation-Id: 843c9460-1a22-4ba7-6c13-08dd0278c837 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?YytoaG0wWkhhdE5zMWdkVHM2azdINGwwZ2ZKYUNVemk2UHFqQVZick04eFA2?= =?utf-8?B?Y3lVb2JPK1FiY2tteWlFVm9DZmZLSDFCT0FaU0hiQUswb1pGbElvM3N6Z1ov?= =?utf-8?B?ZnAwQlZvOGFDWlFrYit6blEwQTVTdVJaMHR2ZmFzejlsVmIrVTRpQ0RJdGpR?= =?utf-8?B?dDVFYzZKUlFwdWdlZ2NZRUJucjVCcGYxOVBGVEt1UVExUjdrVEltam4yeGFO?= =?utf-8?B?cmVpMDhLY3lkY08wMmZuZlRqM1lNK0w1YThUTCtiUXpLZXREWXl3Z0drbzlG?= =?utf-8?B?RlE4N1I5MXRraUFqZWNJcENjcWloa1VXe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hclI2eWhjb0J5RzFDWGtyQk9PeXpMeUNvNVJK?= =?utf-8?B?UG1LVFcrajVqY1ZiZ1VGVXZ0cFBsWTlrU0F1T0lNdVA5QXlldlcyVUlCcTRp?= =?utf-8?B?RXkrL0J3ZWx6T2lkSXFqU3VyNkY2dlhiYTZpcDEvQ2E4dFhtL2Q2YWJXRUpD?= =?utf-8?B?TnhrSFpXVnVTVnRTN1JsUDIwcnRMcTc4QU5zZm56VHVzY0NYMVVNdVhmOEJo?= =?utf-8?B?b045VmVkMUhwbk5VbmdXYmdqTjhFRWFidHFLNUx0b2M4TEwrTVFxVlc3Y1lS?= =?utf-8?B?MnMwODZjaDVvNlJpVXlEejZhNTcrejNVUzRNT0dBRWNrd2ZBN2tlRmoxdnla?= =?utf-8?B?T2VwZ05rRkJIR1QwRnE0dVF1RHBxL0dHcjBwOE1IUVRrOWlpQmN5eFlONVhX?= =?utf-8?B?b1A0SG9EeTJyb3cxTXl0UkdWbHBJQnJNKzA5RldZZVUvKzh3VEpFdGlqNlhP?= =?utf-8?B?NW1CbmlES0RsQlBQa2dINStoaFJqNXpWMndjaHB6MFdvamhhckI5RWhWb2pk?= =?utf-8?Q?tDhvBTeCtCsS+wCgFwRsHPt7MOGjbJgfrx2uHHw?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q0gvaEFKRU5CeEVMOHA2QTY0dzJwN0Qzdlp2dDY0WU1ERUgrdTZLNkVRRTFG?= =?utf-8?B?Smx6L2U4RVlCWHNZTzczbGNvVGwzZVhIdU8yY2phOWhFZFpPaVVvcjBWaGVv?= =?utf-8?B?QVdnVmNuTTZZUEhjVHpUa0lW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8?B?MXBXWUttU3NTaVhGZ094cjZpVG40SUEvUVVJQmZzbHp1M0hnbXdSY3oyZ200?= =?utf-8?B?UDRmTndzWFNqT0FlTG93V2RXRUJWczRxTGZlcC9vV3dOcCthS2JzSkdPd01Z?= =?utf-8?B?dWVIS05tUGZOaENFTmxYTElBY052THZvM0d3ZzJiQ3ozTFBuY3Ura3pOZmhr?= =?utf-8?B?alhLSGpWM2gva0lLWXlqWEsxU1FLRjR4QzdkdTFjazN1N2pJZzIvOEVDc2JV?= =?utf-8?B?NkE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 843c9460-1a22-4ba7-6c13-08dd0278c837 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 17:46:33.7793 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AE3E2kl/HOxM/0emY+Jy4IcGAH2+E9iveEY5mmu58Ej21YLEwE9/FZ4V+DsC/N6jg80/Fxdm8vi1LBHxRXxa0EPtr4zUSsqHuKz7mHRXtNc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7390 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Acked-by: Vladimir Medvedkin On 11/11/2024 16:42, Bruce Richardson wrote: > In the Tx prep function, the metadata checks were only checking the > packet length and ignoring the data length. For single-buffer packets we > can quickly check that the data length is the packet length. > > Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes") > Cc: stable@dpdk.org > > Reported-by: Padraig Connolly > Signed-off-by: Bruce Richardson > --- > drivers/net/iavf/iavf_rxtx.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c > index 4850b9e381..6a093c6746 100644 > --- a/drivers/net/iavf/iavf_rxtx.c > +++ b/drivers/net/iavf/iavf_rxtx.c > @@ -3677,7 +3677,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, > return i; > } > > - if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) { > + /* valid packets are greater than min size, and single-buffer pkts > + * must have data_len == pkt_len > + */ > + if (m->pkt_len < IAVF_TX_MIN_PKT_LEN || > + (m->nb_segs == 1 && m->data_len != m->pkt_len)) { > rte_errno = EINVAL; > return i; > } -- Regards, Vladimir