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 AEA78A0350; Wed, 19 Jan 2022 04:39:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76CCF4068A; Wed, 19 Jan 2022 04:39:12 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 09B114013F for ; Wed, 19 Jan 2022 04:39:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642563550; x=1674099550; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=qfl/nfmeafyj+RdPWoNZl6MZuDjNRxzi/VOoczDk+QU=; b=IZzljVJatpFhfwGt2KFu/4ttq4MltQ1eoYGt1fjExYsJu2+YdMUvuyKs 6sxenrF0sdo20ckg9wxJ4UoWBCvJzUXIPr/GhqoXlIAPK8XdgwMn0kwIf H0o5TyvVd5ogFnys0yFpCvhpNbklzmkMVXdrY1GKueyjXbcjq6NEaM9Za Ox4AaDk6HVgOw59cRmcgOSq2irxdgBVyUWwTX/uyZnpLCa5TYRdafdIKW ABsEjE9a+Sy+3w1puSwAZNsqTQEdTNEQ9F+iRe7KOwflI7/9FqJTE3Rr4 OYfL3Kk5tg94oRo9gLV410kmLvocVvSVNaWGyIMRBdpoJVtZ7Ybw4GNtb Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="269361165" X-IronPort-AV: E=Sophos;i="5.88,298,1635231600"; d="scan'208";a="269361165" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 19:39:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,298,1635231600"; d="scan'208";a="560901609" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP; 18 Jan 2022 19:39:07 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 18 Jan 2022 19:39:07 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 18 Jan 2022 19:39:06 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 18 Jan 2022 19:39:06 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 18 Jan 2022 19:39:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mt9BgRfasIpBuBlFAoU1omW9KJatcpYIwNs8LyVhFgkw3CRZZihgdDLWr030nlccELyd9/LyMLEPJmYUTm6MxPQthQZ1UOxo0vnGGbXSx0VCEDTfAt9EG5XLTqnAqb826iwtCETur0z2ByNM/qi2wewV6QoVX/wtsGCdnx/MGTFh2KRDdDRS2PWC6+unmursuHwaQ7Bzgyeh4k8zAPf5hsGR5OSV9/5Myw9JmAck+P3AG1ceWZtXfNOraCoNPC2Ek6XLmrNtY6gHyGu10zpasELRdDvzb/aaZMGrHP1KGBGw379qGYaqm6PXUTP/RXUCH9IyVAfQH3P89t869NbNpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=GLLgzEaPob1yTXBkD4CknXHXm0HsGdpa+hNmbOF2D6I=; b=NXGyFzm05y+yxfEaA9dM3Ujf0j0T4d7moaFTSIRi/iwtPpvxmkctGjU4A2vC7tAQiTHH+rF9z6/WlsVqzT9hyNqxl/Yfw8z2l64VFXuS/ssiVwroFB0dYoqU+b+hi/EVD84FOsIjDs+qg6zuZ83ngijM2DgEkUiI8T6HN2Nv92UWvrXwIO8AQ1gT98tDNdV93qzAkUiGwzBDTbxxd3PHmlIGZ8kQpQo9WRxHstWcs0TaOrp/bw9k2a86amkpol2gaAx69HRNbESaXzskug4pch5aMfC1BzM31rxNtmB95Gqztm/vb+/Cbcm2nejRwkeraRI48CiHtn+sLnO8NlPfeA== 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 Received: from SJ0PR11MB5599.namprd11.prod.outlook.com (2603:10b6:a03:3af::21) by DM6PR11MB3834.namprd11.prod.outlook.com (2603:10b6:5:137::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Wed, 19 Jan 2022 03:39:04 +0000 Received: from SJ0PR11MB5599.namprd11.prod.outlook.com ([fe80::d977:eec7:9638:3202]) by SJ0PR11MB5599.namprd11.prod.outlook.com ([fe80::d977:eec7:9638:3202%8]) with mapi id 15.20.4888.014; Wed, 19 Jan 2022 03:39:04 +0000 From: "Lin, Xueqin" To: "Lin, Xueqin" , "Tang, Yaqi" , "dts@dpdk.org" CC: "Tang, Yaqi" Subject: RE: [dts][PATCH V3] test_plans/dcf_lifecycle_test_plan: add test plan for CVL DCF enable device reset API Thread-Topic: [dts][PATCH V3] test_plans/dcf_lifecycle_test_plan: add test plan for CVL DCF enable device reset API Thread-Index: AQHYDBbsImn1FWuHSE+by7suDKzG4axoOJ4QgAFzcLA= Date: Wed, 19 Jan 2022 03:39:04 +0000 Message-ID: References: <20220118105354.180850-1-yaqi.tang@intel.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5997c1c9-26f6-403c-021e-08d9dafd3dad x-ms-traffictypediagnostic: DM6PR11MB3834:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:350; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ay/OsUFpYq0obCqMifZJKI7wX4MyFmMgyo8tUA3uozq77x0D47t0DekwxlaBijEjJ6z1p6SdSMvmX4awQXQG07gThNDAUYheA0w17nDsS20lyzi1k3RCFGX8rHJhkmXqKooZYzZxnIOeuh0VFSFtfCz0ctAwTCpk6BrR1mzUgDsKG0x1Y7nJr+BOrDqDw1gSSnfGlTVbO7kz33DtrlJEb4oKiWRIgJuVuariO0c/X5EU2bVHveTYzoZ5bH5Vcqblt0tERMz85Ypi6NbIqIpbNEJqCs7Z2ysci1Gmxv+96Eg2kvXHPAnVxJ5r+RAydnkT4n7Ob96R/9uUEfWpP787SuQ3UVmn6SG4zkiBIlNenK8mGijGgOqfTbApyN38H2eCqRTjvaR4bjAomY4lmJjWLdssFo6zVvyGmvD3y5It8oLEOhWp3vyjNUlazhOVm0egN5pETSebLigyMzBde6O4AS11BI4xxkJ15HjhzlZLY5IxakE36RD6SStOS1opou9GS3B2CZdvkjn/t0P9UMHM6NXKChARQi2y1w2WStHl1mO0vSvJTHEMSJGIh05i35GdYUgU7vF31EhhH8wBKox6i6lVzgsdoRDkDZBGZIfPaVVOxg9J0XcW67HyBcccSszAwUiHMWLilq37pdllxQjZKarNmJi9VXHmxa3j6oyjuLMSOFRcFWC2Y6bo+MLltRMIMODuU2v7FYlRJooqPCPwTGWfMTNnFmKrutFVGOu6zhnl6vbOHGBgqu114UaldTNxPqrAGtuw1JabWfWh4UkwYjiuNQiCAraUvnDV9lNnnC0a+cw7K1/AxywHhjmrTlzfwg2x/Zd9tDeb/eNo4KRNKTfhnnB0NAXp7GLbGkVqAPM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5599.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(71200400001)(30864003)(316002)(66556008)(508600001)(53546011)(4326008)(64756008)(6506007)(76116006)(2906002)(966005)(52536014)(66476007)(8676002)(38070700005)(55016003)(107886003)(66446008)(19273905006)(66946007)(33656002)(38100700002)(86362001)(110136005)(83380400001)(5660300002)(82960400001)(26005)(9686003)(8936002)(7696005)(186003)(122000001)(579004)(559001)(563064011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4MeLkTN5o2Me+sGBmJRKNMLm8gxlO0GvULf9HRC6xqSYFXv6QlKoM/s5PFvj?= =?us-ascii?Q?l2g47j4Bp3RXIXbKWCHRJeIC6XOgzqDJ62ay9ekc5w03ZQrseAhvCdoFBW+R?= =?us-ascii?Q?8lpUok+k+VNuB9apMJXmfmry8VvaE9fqYVHKu4cfcjD+ubdzNrwiluFSqtPh?= =?us-ascii?Q?cLSio/zJ+77BwjspY/GyTAxhRL5mfVNTS8XBA2jHzOehQC2jJaiROYaXQvFV?= =?us-ascii?Q?aeaP5+XrGLjIN/POi6DNMTsPle8PV7hepAHC4avhRO6w355+zIuX268GJLz9?= =?us-ascii?Q?jGGjR7aL6yW+adni8AbfE1Xxx7wSCxZRL0m7GSo/lx2Sm6JYvUD324VLmSF1?= =?us-ascii?Q?iDvjWCl6ra+R/Rv5xahi00lk6RoYjks/vGwCOxoe/z86kjypxOETyW7lYPw6?= =?us-ascii?Q?qypTyySfKaEd6q/oen3hXx4vejRUalJlKJiKfkh5UIWiE9m7t9j1WaVKbE7n?= =?us-ascii?Q?9kl1GoWaqBIe3KySp9H4HlrNR6fQsCjZrQFs3IxqIalC0ToNycpSNjytoGqY?= =?us-ascii?Q?605mm4oZhxQN6h7HB/XHULb7DccUiMNjuQKcvv5iN+1FAJ1QHVpPkFNeZiia?= =?us-ascii?Q?8mQw2a2WcuuEu1gF88FdTJg3ojBWgB46pICBQSORq2/D+EFpt1u3SwI/j++4?= =?us-ascii?Q?X9NSN1IyF68flWCgVoUB+TCq9BvSfealXRxatb97w45vWd/Y8sNjsUMmvZHX?= =?us-ascii?Q?z0fpUsGdkAGSoR9CZRBWkDCzmUIxoiNgg8+1lyvCOGLUjKTlVn0batxMn0BD?= =?us-ascii?Q?nrj2oPCBpJ5VZF5t0Okw2klXL+opYLP+W3TLWsoAlqtrOL02X4/jw81RNiwG?= =?us-ascii?Q?aXmfgkl0XA30XK/IKzyuIT4EeVi/lxLaz6t76f3QL4bqtG1X8EBMLCqgpBUO?= =?us-ascii?Q?FusB9RpEimgN8f0dh8v5ap2CN1tT8JXWmJLui66WqcQo5/vU4uJSPSIJjHEz?= =?us-ascii?Q?HoGWZPscYmKzOKklbH/eyOR+7RE4ltNhOb5nDtPg4JE0+q4PDHWv96S7NbK8?= =?us-ascii?Q?0nSYyXjfUDLzPwA78j34pGuIkBOxicwTIemgzg5OLvrfTNIf4JYUGftfNIYk?= =?us-ascii?Q?gXcT+zbkpwTHoJrFEDjmo97VrQsgk0yAa+eTSVAPbcDBTIhlzfRPP1/bQC8U?= =?us-ascii?Q?MnMgp3CdM/Hh5ogshK4753R9i88iaJF6uV6gCNHT9bua9nH9xIS3r/WZrzCq?= =?us-ascii?Q?2oZ7RwolANckTm2KzsIns05/pJbXQa9XkgAaPDMzdHzS/1VxOctyijuF9SWp?= =?us-ascii?Q?fO3BrYJ2phPkVCVxzSBFNsIfUIyFgmTSyBSi5+0NX1kr96sHsgfYaHSNzhrY?= =?us-ascii?Q?/oWGk6RfrVl3p27ncL8qVGmRyxrM8B+8gpsl3K7IuztUrn6s2mWBO1KXeRyf?= =?us-ascii?Q?OH/jVwjpX+ZIbDkjpejmaS20ZOZPtEqmNMUdxoQFT4zNZl5ucuW1SMTZ7m3b?= =?us-ascii?Q?fWUT5Q6Bwf5xo1nsma0lpxWgDbB3LudTHvmN1IVhjE0umfd2qtGmRzkyXaka?= =?us-ascii?Q?kSg2x/aEe+0YV4dEZc1T5ea0cc3E1CP/+721h6kvfYkq8/IFqwutrLxq6RpL?= =?us-ascii?Q?SmIrSZ5yLvbVz32ILvAETkP2kcwEq9hUDNdCgc1/DPggPwT4qAjP4XK9WneY?= =?us-ascii?Q?9Q=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5599.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5997c1c9-26f6-403c-021e-08d9dafd3dad X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2022 03:39:04.3778 (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: 1HGtbGZ1B3BWi7GZgQCEBbl4Q6b2fmsbySvL6mWKcz+UwQFl/lnuC87+oANTjIVPXAFo3D1qR2/PGpidCg2rUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3834 X-OriginatorOrg: intel.com X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org > -----Original Message----- > From: Lin, Xueqin > Sent: Tuesday, January 18, 2022 1:18 PM > To: Tang, Yaqi ; dts@dpdk.org > Cc: Tang, Yaqi > Subject: RE: [dts][PATCH V3] test_plans/dcf_lifecycle_test_plan: add test= plan > for CVL DCF enable device reset API >=20 > Thanks, few comments as below. >=20 > > -----Original Message----- > > From: Yaqi Tang > > Sent: Tuesday, January 18, 2022 6:54 PM > > To: dts@dpdk.org > > Cc: Tang, Yaqi > > Subject: [dts][PATCH V3] test_plans/dcf_lifecycle_test_plan: add test > > plan for CVL DCF enable device reset API > > > > DCF PMD need to support rte_eth_dev_reset.The reason is that when a > > DCF instance be killed, all the flow rules still exist in hardware. > > when DCF gets to reconnect, It has already lost the flow context, and > > if the application wants to create new rules, they may fail because FW > > reports that the rules already exist.The current workaround assumes > > that the user can turn off / turn on VF trust mode, so kernel PF will > > reset DCF by removing all old rules.The rte_eth_dev_reset API provides > > a more elegant way for the application to reset DCF through the commmad > "port reset all" when reconnecting. > > > > Signed-off-by: Yaqi Tang > > Tested-by: Yaqi Tang < yaqi.tang@intel.com> > > --- > > test_plans/dcf_lifecycle_test_plan.rst | 754 > > +++++++++++++++++++++++++ > > 1 file changed, 754 insertions(+) > > > > diff --git a/test_plans/dcf_lifecycle_test_plan.rst > > b/test_plans/dcf_lifecycle_test_plan.rst > > index 4c010e76..a8701338 100644 > > --- a/test_plans/dcf_lifecycle_test_plan.rst > > +++ b/test_plans/dcf_lifecycle_test_plan.rst > > @@ -1071,3 +1071,757 @@ TC34: ACL DCF mode is active, add ACL filters > > by way of host based configuration > > > > # ethtool -N enp24s0f1 flow-type tcp4 src-ip 192.168.10.0 m > > 0.255.255.255 dst-port 8000 m 0x00ff action -1 > > Added rule with ID 15871 > > + > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > +CVL DCF enable device reset API > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > + > > +Description > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > +The test plan includes ten test cases, such as > > +two_testpmd_dcf_reset_port, two_testpmd_dcf_reset_device, > > two_testpmd_dcf_reset_port_detach, two_testpmd_dcf_reset_mtu, > > two_testpmd_dcf_reset_mac, one_testpmd_dcf_reset_port, > > one_testpmd_dcf_reset_device, one_testpmd_dcf_reset_port_detach, > > one_testpmd_dcf_reset_mtu, one_testpmd_dcf_reset_mac. It is not convenient for test cases add in future.=20 Suggest not listing the test case, could describe which features supported.= =20 > > + > > +DCF PMD need to support rte_eth_dev_reset.The reason is that when a > > +DCF instance be killed, all the flow rules still exist in hardware. > > +when DCF gets to reconnect, It has already lost the flow context, and > > +if the application wants to create new rules, they may fail because > > +FW reports that > > the rules already exist.The current workaround assumes that the user > > can turn off / turn on VF trust mode, so kernel PF will reset DCF by > > removing all old rules.The rte_eth_dev_reset API provides a more > > elegant way for the application to reset DCF through the command "port > > reset all" when reconnecting. > > + > > +Prerequisites > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > + > > +Hardware > > +-------- > > +Supportted NICs: columbiaville_25g/columbiaville_100g > > + > > +Software > > +-------- > > +dpdk: http://dpdk.org/git/dpdk > > +scapy: http://www.secdev.org/projects/scapy/ > > + > > +General Set Up > > +-------------- > > +1. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ic= e.pkg, > > + then load driver:: > > + > > + # cp ice_comms-1.3.31.0.pkg /lib/firmware/updates/intel/ice/ddp/ic= e.pkg > > + # rmmod ice > > + # insmod ice.ko > > + > > +2. Compile DPDK:: > > + > > + # CC=3Dgcc meson --werror -Denable_kmods=3DTrue -Dlibdir=3Dlib > > + --default- > > library=3Dstatic x86_64-native-linuxapp-gcc > > + # ninja -C x86_64-native-linuxapp-gcc -j 110 > > + > > +3. Get the pci device id and interface of DUT and tester:: > > + > > + # ./usertools/dpdk-devbind.py -s > > + > > + 0000:3b:00.0 'Ethernet Controller E810-C for SFP 1593' > > + if=3Dens785f0 drv=3Dice > > unused=3Dvfio-pci > > + 0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' > > + if=3Dens260f0 drv=3Di40e unused=3Dvfio-pci > > + >=20 > Above Prerequisites is common, not special for reset cases, suggest putti= ng on > top of the test plan if need. >=20 > > +4. Generate 4 VFs on PF0:: > > + > > + # echo 4 > /sys/bus/pci/devices/0000:3b:00.0/sriov_numvfs > > + > > +5. Get VF pci device id of DUT. > > + > > + # ./usertools/dpdk-devbind.py -s > > + > > + 0000:3b:01.0 'Ethernet Adaptive Virtual Function 1889' > > + if=3Dens785f0v0 > > drv=3Diavf unused=3Dvfio-pci > > + 0000:3b:01.1 'Ethernet Adaptive Virtual Function 1889' > > + if=3Dens785f0v1 drv=3Diavf unused=3Dvfio-pci > > + > > +6. Set VF0 as trust:: > > + > > + # ip link set ens785f0 vf 0 trust on > > + > > +7. Bind the VF ports of DUT to dpdk:: > > + > > + # ./usertools/dpdk-devbind.py -b vfio-pci 3b:01.0 3b:01.1 > > + > > +Test case > > +=3D=3D=3D=3D=3D=3D=3D=3D=3D > > + > > +Common Steps > > +------------ > > +The common steps launch two testpmds and kill DCF process, then > > +relaunch > > two testpmds. > > + > > +1. Launch the userland ``testpmd`` application on DUT as follows:: > > + > > + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 > > + -a 0000:3b:01.0,cap=3Ddcf --file-prefix=3Ddcf -- -i >=20 > Could you follow template format for the whole test plan? >=20 > > + > > +2. Launch another ``testpmd`` application on the VF1 of DUT as follows= :: > > + > > + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x18 -n 4 > > + -a > > + 0000:3b:01.1 --file-prefix=3Dvf -- -i > > + > > +3. Set verbose in VF testpmd:: > > + > > + testpmd> set verbose 1 > > + > > +4. Set fwd engine and start in VF testpmd:: > > + > > + testpmd> set fwd mac > > + testpmd> start > > + > > +5. Validate a switch rule to VF1 in DCF testpmd:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +6. Create a switch rule to VF1 in DCF testpmd and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +7. Send a matched packet in scapy to VF1, check the VF1 of DUT can > > +receive > > the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D'C6:44:32:0A:EC:E1')/IP(src=3D'192.168.0.2', > > + dst=3D'192.168.0.3')/("X"*64)],iface=3D"ens260f0",count=3D1) >=20 > Could you follow template format for the whole test plan, same as below? >=20 > > + > > +the VF1 of DUT:: > > + > > + testpmd> port 0/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +8. Check the process ID and kill DCF process:: > > + > > + # ps -ef |grep testpmd > > + # kill -9 ##### > > + > > +9. Relaunch the userland ``testpmd`` application on DUT as follows:: > > + > > + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 > > + -a 0000:3b:01.0,cap=3Ddcf --file-prefix=3Ddcf -- -i > > + > > +10. Send a matched packet in scapy to VF1, DCF flow rule is still > > +valid and > > check the VF1 of DUT can receive the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +the VF1 of DUT:: >=20 > The VF1 of DUT:: >=20 > > + > > + testpmd> port 0/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 1: two_testpmd_dcf_reset_port > > +--------------------------------------- > > +The test case resets DCF by resetting the port, and DCF should clean > > +up all old > > rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start > > + Add one more step check: clean up all rules, no rule list in the applicatio= n=20 > > +2. Validate a switch rule to VF1 in DCF testpmd:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +3. Create a switch rule to VF1 in DCF testpmd and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +4. Send a matched packet in scapy to VF1, and check the VF1 of DUT > > +can > > receive the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +the VF1 of DUT:: > > + > > + testpmd> port 0/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + Add more step: repeat above steps for 2 times > > +Test Case 2: two_testpmd_dcf_reset_device > > +----------------------------------------- > > +The test case resets DCF by resetting the device, and DCF should > > +clean up all > > old rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset DCF device:: > > + > > + # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset This test case is testing resetting dcf port by "echo" cmd.=20 Will you also kill the DCF testpmd for this case? if not, kill sample shoul= d not common step.=20 > > + > > +2. Reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start > > + > > +3. Validate a switch rule to VF1 in DCF testpmd:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 in DCF testpmd and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT > > +can > > receive the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +the VF1 of DUT:: > > + > > + testpmd> port 0/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 3: two_testpmd_dcf_reset_port_detach > > +---------------------------------------------- > > +The test case resets DCF by detaching the port, and DCF should clean > > +up all > > old rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset DCF device:: > > + > > + # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset May not need this step. > > + > > +2. Detach and reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop 0 > > + testpmd> port detach 0 > > + testpmd> port attach 3b:01.0,cap=3Ddcf > > + testpmd> port reset 0 > > + testpmd> port start 0 > > + testpmd> start > > + > > +3. Validate a switch rule to VF1 in DCF testpmd:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 in DCF testpmd and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT > > +can > > receive the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +the VF1 of DUT:: > > + > > + testpmd> port 0/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - > > nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - > sw > > ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queue=3D= 0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 4: two_testpmd_dcf_reset_mtu > > +-------------------------------------- > > +The test case resets DCF by reseting the mtu, and DCF should clean up > > +all old > > rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Modify the value of mtu:: > > + > > + # ifconfig ens785f0 mtu 3000 > > + > > +2. Reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start > > + > > +3. Validate a switch rule to VF1 in DCF testpmd:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 in DCF testpmd and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT > > +can > > receive the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +the VF1 of DUT:: > > + > > + testpmd> port 0/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 5: two_testpmd_dcf_reset_mac > > +-------------------------------------- > > +The test case resets DCF by reseting mac addr, and DCF should clean > > +up all old > > rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset VF0 by set mac addr:: > > + > > + # ip link set ens785f0 vf 0 mac 00:01:02:03:04:05 > > + > > +2. Reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start > > + > > +3. Validate a switch rule to VF1 in DCF testpmd:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 in DCF testpmd and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT > > +can > > receive the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +the VF1 of DUT:: > > + > > + testpmd> port 0/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Common Steps > > +------------ > > +The common steps launch one testpmd and kill DCF process, then > > +relaunch > > one testpmd. > > + > > +1. Launch the userland ``testpmd`` application on DUT as follows:: > > + > > + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 -a > > + 3b:01.0,cap=3Ddcf -a 3b:01.1 --file-prefix=3Ddcf -- -i > > + > > +2. Set verbose:: > > + > > + testpmd> set verbose 1 > > + > > +3. Set fwd engine and start:: > > + > > + testpmd> set fwd mac > > + testpmd> start > > + > > +4. Validate a switch rule to VF1:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +5. Create a switch rule to VF1 and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +6. Send a matched packet in scapy to VF1, check DUT can receive the pa= cket. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +DUT:: > > + > > + testpmd> port 1/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +7. Check the process ID and kill DCF process:: > > + > > + # ps -ef |grep testpmd > > + # kill -9 ##### > > + > > +8. Relaunch the userland ``testpmd`` application on DUT as follows:: > > + > > + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 -a > > + 3b:01.0,cap=3Ddcf -a 3b:01.1 --file-prefix=3Ddcf -- -i > > + > > +9. Set verbose:: > > + > > + testpmd> set verbose 1 > > + > > +10. Set fwd engine and start:: > > + > > + testpmd> set fwd mac > > + testpmd> start > > + > > +11. Send a matched packet in scapy to VF1, DCF flow rule is cleared > > +and check > > DUT can't receive the packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +DUT:: > > + > > + testpmd> > > + > > +Test Case 6: one_testpmd_dcf_reset_port > > +--------------------------------------- > > +The test case resets DCF by resetting the port, and DCF should clean > > +up all old > > rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset port in testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start If without this reset port step, if success to create step 3 rule? > > + > > +2. Validate a switch rule to VF1:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +3. Create a switch rule to VF1 and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +4. Send a matched packet in scapy to VF1, and check DUT can receive > > +the > > packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +DUT:: > > + > > + testpmd> port 1/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - > > nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - > sw > > ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queue=3D= 0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 7: one_testpmd_dcf_reset_device > > +----------------------------------------- > > +The test case resets DCF by resetting the device, and DCF should > > +clean up all > > old rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset DCF device:: > > + > > + # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset > > + > > +2. Reset port in testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start > > + > > +3. Validate a switch rule to VF1:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check DUT can receive > > +the > > packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +DUT:: > > + > > + testpmd> port 1/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN > > + L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20= - > > + Receive queue=3D0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > + RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 8: one_testpmd_dcf_reset_port_detach > > +---------------------------------------------- > > +The test case resets DCF by detaching the port, and DCF should clean > > +up all > > old rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset DCF device:: > > + > > + # echo 1 > /sys/bus/pci/devices/0000:3b:01.0/reset > > + > > +2. Detach and reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop 0 > > + testpmd> port detach 0 > > + testpmd> port attach 3b:01.0,cap=3Ddcf > > + testpmd> port reset 0 > > + testpmd> port start 0 > > + testpmd> start > > + > > +3. Validate a switch rule to VF1:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check DUT can receive > > +the > > packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +DUT:: > > + > > + testpmd> port 1/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - > > nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - > sw > > ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queue=3D= 0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 9: one_testpmd_dcf_reset_mtu > > +-------------------------------------- > > +The test case resets DCF by resetting the mtu, and DCF should clean > > +up all old > > rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Modify the value of mtu:: > > + > > + # ifconfig ens785f0 mtu 3000 > > + > > +2. Reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start > > + > > +3. Validate a switch rule to VF1:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check DUT can receive > > +the > > packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +DUT:: > > + > > + testpmd> port 1/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - > > nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - > sw > > ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queue=3D= 0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > + > > +Test Case 10: one_testpmd_dcf_reset_mac > > +--------------------------------------- > > +The test case resets DCF by resetting mac addr, and DCF should clean > > +up all > > old rules. > > + > > +Test Steps > > +~~~~~~~~~~ > > +1. Reset VF0 by set mac addr:: > > + > > + # ip link set ens785f0 vf 0 mac 00:01:02:03:04:05 > > + > > +2. Reset port in DCF testpmd:: > > + > > + testpmd> stop > > + testpmd> port stop all > > + testpmd> port reset all > > + testpmd> port start all > > + testpmd> start > > + > > +3. Validate a switch rule to VF1:: > > + > > + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 > > + src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule validated > > + > > +4. Create a switch rule to VF1 and list rules:: > > + > > + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src > > + is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end > > + > > + Get the message:: > > + > > + Flow rule #0 created > > + > > + Check the flow list:: > > + > > + testpmd> flow list 0 > > + > > + ID Group Prio Attr Rule > > + 0 0 0 i-- ETH IPV4 =3D> VF > > + > > +5. Send a matched packet in scapy to VF1, and check DUT can receive > > +the > > packet. > > + > > +Tester:: > > + > > + >>> sendp([Ether(src=3D"00:11:22:33:44:55", > > + dst=3D"C6:44:32:0A:EC:E1")/IP(src=3D"192.168.0.2", > > + dst=3D"192.168.0.3")/("X"*64)],iface=3D"ens260f0",count=3D1,inter=3D0= ,verbos > > + e=3D > > + False) > > + > > +DUT:: > > + > > + testpmd> port 1/queue 0: received 1 packets > > + src=3D00:11:22:33:44:55 - dst=3DC6:44:32:0A:EC:E1 - type=3D0x0800 - > > + length=3D98 - > > nb_segs=3D1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - > sw > > ptype: L2_ETHER L3_IPV4 - l2_len=3D14 - l3_len=3D20 - Receive queue=3D= 0x0 > > + ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD > > RTE_MBUF_F_RX_IP_CKSUM_GOOD > > RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN > > -- > > 2.25.1