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 5642B4571A; Fri, 2 Aug 2024 10:38:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33EDA42E5B; Fri, 2 Aug 2024 10:38:35 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id A062B4064C for ; Fri, 2 Aug 2024 10:38:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722587913; x=1754123913; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=w88IS8w2Bt8DuGEdeljCogaOJkbbkGxKqFeWjU4cFWc=; b=G7I32k+ve5Lsnex50wH6MVcNxPRXrjUtnOdbxjkiq/H1oTor0HGhaFHh UNkAUuXm3EVKDCcnfPnc/Re7YlIxu3TEpccwurDulnJ/tBSpyhIV2t2AR 1yYRiCMc7Cc606v4WGU8+0FYH6w8l+T/RBciInC6S64XSkKQX/nIVRCbT B7Qbj6MST81qrXeeHoqF3Rmog/4MCXULKxqRwG/2ODKJ2Wgf3U1PZ9SK+ Kkx23U18qg6La2yWPpSn3XpOyhdjbZmJbZpKqWJ2QzxgMBOc4RRUHmheX hKtGnl3m8GKzfKVO7HLXxgoq4aAOW8MAIOf7Tq6XsaGDAwGMhGqXAxJ5n Q==; X-CSE-ConnectionGUID: nrN2/JGCSUG6mjbs+e+SsQ== X-CSE-MsgGUID: w8ieFWihRJujcX7jxM4yKQ== X-IronPort-AV: E=McAfee;i="6700,10204,11151"; a="20712277" X-IronPort-AV: E=Sophos;i="6.09,257,1716274800"; d="scan'208";a="20712277" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2024 01:38:31 -0700 X-CSE-ConnectionGUID: 0mQDuyuUQYCxGW2G+7knJg== X-CSE-MsgGUID: DoM36tJpRhipWbvb0YSgwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,257,1716274800"; d="scan'208";a="55930564" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Aug 2024 01:38:31 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 2 Aug 2024 01:38:30 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 2 Aug 2024 01:38:30 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 2 Aug 2024 01:38:30 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 2 Aug 2024 01:38:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FPDhWhradGrGUZGytKFqOp7YdlIS6prL/gY0JmfXkSFDch7Lj29v5jTS+yQBxWzh6lFNAXFuC4OjoZ0mtpC/C6jG6GmXRCDwqJkOuheTrGja4s3iyvArMWQiWWvHPtYuw0vSr40gnD5gtBzwZEa+mCthnp1EhWOru9vsjwMmwc2VCagFQwiGOgVuuIgamR7TvK/MSmvLbwa5/gUWYI++vJnCVivJ18i1QobvFnOgG+BV/D6JgAaIQAsKEjnmA4fixT0/KUFvYWQMF86UWnOlfHdb4bKo2hZqncZQnw5aenHwO6ShI0xC8DY4ixIbP+TUWGAXU9BWykhE7HeS6Fhldw== 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=VNEpmWInBfVLFdv5rm3O7rxp4SzoT71oPnCQacPE+nM=; b=XIN1+JPLU2nawf9MbgJDsXdLLHsWEB9hWMYttWTeE6R0M1QbnuIUmTnQZd1f6ZjjZJhWrHfY37pgEyUKu3JZ743iGDGyduWvYqXJiaPslw5B9CSJvlohUJ5EMwAOy/7Lp+k2ojhJ4YHsXoUHl66w6zUTIhQjUVl5s6UurX8ccrjbk8VhDy8GkfT/k46tj9JB2uUZ/ufKatShcs+itWijOSTqEh2EXqcZYauPfzuxKaSS+jWYXlpxYVsaqhz567kvlovEP/JrypbGLde1shpy1wz2I/2nI2QERMCFvYX+STxbXjOsrksunS+w9+1w3GSo86mE+ivt9gqgSV9ViymiJg== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by CH0PR11MB5283.namprd11.prod.outlook.com (2603:10b6:610:be::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.23; Fri, 2 Aug 2024 08:38:28 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%2]) with mapi id 15.20.7828.023; Fri, 2 Aug 2024 08:38:28 +0000 Date: Fri, 2 Aug 2024 09:38:23 +0100 From: Bruce Richardson To: Stephen Hemminger CC: Subject: Re: [PATCH v5 3/4] test: add test for packet dissector Message-ID: References: <20240312220129.70667-1-stephen@networkplumber.org> <20240801190617.201574-1-stephen@networkplumber.org> <20240801190617.201574-4-stephen@networkplumber.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240801190617.201574-4-stephen@networkplumber.org> X-ClientProxiedBy: DUZPR01CA0286.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b7::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|CH0PR11MB5283:EE_ X-MS-Office365-Filtering-Correlation-Id: c2059467-fd07-4ec1-126e-08dcb2ce7b3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?ChRvQ4lZAhl+Mq4HpEKNTFUNTx72aYte0ILmUfH1pxNNIMCf40/PJdE/8xPb?= =?us-ascii?Q?og8b0gcz38fQXsSjiNdeIv0DPk4e1PD90EqDRkUWEkXlWaddGhFyr5LlIeF5?= =?us-ascii?Q?pI7Qn2AxEW72Da1AKmtdd8xHwj7jh3NQoSp9IRrEXGv10wR8uUAztZZfTrNv?= =?us-ascii?Q?4/HTSXNv7Oc5lzQG1iJfS35Qk3V/JJhMUMCbgGxxBW6noe4W4sMNXqp5YBs5?= =?us-ascii?Q?wGaeiAijeSXHH5lehd90f2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3lRJ43M4ogKhbfl/f0WYhWFMrRK4dgYhLIF6lkFjkNyvUgyMrvfEu?= =?us-ascii?Q?ZpGF2yu+F3bWvGFT3oPZL9KRl62iT/Laq6ao94Y6qvrJZt4+11GNHWZfLbWj?= =?us-ascii?Q?xDsm0IlsP2VB2X5BHOpopaqZqoqdm0MVxBWsfaS/t6cp3eGc9e6egzc8MXsr?= =?us-ascii?Q?/Nt/9Jpt0NQD7b3j2h0+csfP17AOhThxuTuz2gMr14DgFg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?206UiqzdX8oXjRcB7MoW09JOqP2YG8usOi6y8FDGWgj6wYTRSfE7Ci1jPvIY?= =?us-ascii?Q?1zPswTAIxgr5IVK0xJWyBqg8+Xe58TYaS6nuEHFBITTLrHMZG0vSqCRIfmgF?= =?us-ascii?Q?skI+HrGwfCBrEK2SZLcJshSqrdSTpjxeoXXUZdP8ikAVJLN5qKavXdEn4UDb?= =?us-ascii?Q?YT5pngjdPZNwCjEfQ55WecEVAp2pLklo7sU1EKVVN3oIhNwKmsfb8BV5VH+b?= =?us-ascii?Q?Z0xarVs/hsN2AMTCU7+eeUofuYinFVNKfAgU2482Dcj+yU6nH8ddYPmL/jAG?= =?us-ascii?Q?RrM6IOGYILCs1V+hJkLO83u+cY3U5cE/230WqU9KNmEJXb49EfP77Excml8I?= =?us-ascii?Q?t/7Wc0kQpOGx+VjW6A65UGbjwrHt8Grd5/H9ZvtDUQsnOuijlc4YjeoqmdpQ?= =?us-ascii?Q?Fip+YVkELGyskG6pkCJDPXz04Uqrj00fHG/NGm1PP45QOLXdGDknaUp6Uv6E?= =?us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UnDGZDvC2TlBZLS67R027NukGS61g?= =?us-ascii?Q?XdFP/6BvAmS65td+pOp6cdA3EZci889/Odigd5V1z6jWRgtHep52FvD0OWQ0?= =?us-ascii?Q?eUY56SVraW+RZiWbQg+58Rzn8+KrwhGb3qIsS+SZj/pQNJnhekJsI27GyDZU?= =?us-ascii?Q?0Fsu3sdDU3v1G5ekC1soqDBFxXWQQDYhh/ToNRzu2jdas7r+IylY1CnoKDz8?= =?us-ascii?Q?LtktxP2HaXj0MNRAfgeETGpuP17DcAkxSMWrUwovxc170fUltQcTkEK7HFw5?= =?us-ascii?Q?JA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: c2059467-fd07-4ec1-126e-08dcb2ce7b3f X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2024 08:38:28.2764 (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: mIuO6REWQwdzrQ/nF46VPAcFAuA9WwHamrsaW27mCvN/eUYcXm72twEhGu8DoK52psWlxSCcz6ixNpei/0gZS0aTzKVVVsZYARKGgT+L07o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5283 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, Aug 01, 2024 at 12:04:42PM -0700, Stephen Hemminger wrote: > Some tests for new packet dissector. > > Signed-off-by: Stephen Hemminger > --- > app/test/meson.build | 1 + > app/test/test_dissect.c | 245 ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 246 insertions(+) > create mode 100644 app/test/test_dissect.c > > diff --git a/app/test/meson.build b/app/test/meson.build > index e29258e6ec..9cd2051320 100644 > --- a/app/test/meson.build > +++ b/app/test/meson.build > @@ -62,6 +62,7 @@ source_file_deps = { > 'test_debug.c': [], > 'test_devargs.c': ['kvargs'], > 'test_dispatcher.c': ['dispatcher'], > + 'test_dissect.c': ['net'], > 'test_distributor.c': ['distributor'], > 'test_distributor_perf.c': ['distributor'], > 'test_dmadev.c': ['dmadev', 'bus_vdev'], > diff --git a/app/test/test_dissect.c b/app/test/test_dissect.c > new file mode 100644 > index 0000000000..2c79acf766 > --- /dev/null > +++ b/app/test/test_dissect.c > +static int > +test_simple(void) > +{ > + struct rte_mbuf mb; > + uint8_t buf[RTE_MBUF_DEFAULT_BUF_SIZE]; > + uint32_t data_len = PACKET_LEN; > + uint16_t src_port = rte_rand(); > + const uint16_t dst_port = rte_cpu_to_be_16(9); /* Discard port */ > + char obuf[LINE_MAX]; > + > + /* make a dummy packet */ > + mbuf_prep(&mb, buf, sizeof(buf)); > + add_header(&mb, data_len, src_port, dst_port); > + fill_data(&mb, data_len - mb.data_off); > + > + rte_dissect_mbuf(obuf, sizeof(obuf), &mb, 0); > + > + return TEST_SUCCESS; > +} What are these test cases actually verifying - can any of them actually fail? I don't see the output being checked anywhere. /Bruce