From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8EA464C8B for ; Wed, 28 Nov 2018 09:28:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2018 00:28:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,290,1539673200"; d="scan'208";a="104356013" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 28 Nov 2018 00:28:45 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 28 Nov 2018 00:28:45 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 28 Nov 2018 00:28:44 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.102]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0415.000; Wed, 28 Nov 2018 16:28:42 +0800 From: "Tu, Lijuan" To: "Lin, Xueqin" , "dts@dpdk.org" CC: "Lin, Xueqin" Thread-Topic: [dts] [PATCH] test_plans: add hotplug on multi-processes test plan Thread-Index: AQHUhkTBt+6fomnvdkGzNHRN4D3z6aVk3Ceg Date: Wed, 28 Nov 2018 08:28:41 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0B9C1BFD@SHSMSX101.ccr.corp.intel.com> References: <1543296605-36380-1-git-send-email-xueqin.lin@intel.com> In-Reply-To: <1543296605-36380-1-git-send-email-xueqin.lin@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjg3YzEwNTMtMWQ0Ni00OTFkLWFiZGUtOGI2ZmNkNmZlZjk1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoic1dyK1VOZUxDUTM4SjhCVmdKZDBBZWFxZHhSVnlCa0FLV0dLVjdDV3VyWlRZQ1p6SEM3cVNJVzlhWVpqVHI0dyJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] test_plans: add hotplug on multi-processes test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 08:28:47 -0000 Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xueqin Lin > Sent: Tuesday, November 27, 2018 1:30 PM > To: dts@dpdk.org > Cc: Lin, Xueqin > Subject: [dts] [PATCH] test_plans: add hotplug on multi-processes test pl= an >=20 > From: "xueqin.lin" >=20 > Signed-off-by: Xueqin Lin >=20 > --- > test_plans/hotplug_mp_test_plan.rst | 229 > ++++++++++++++++++++++++++++++++++++ > 1 file changed, 229 insertions(+) > create mode 100755 test_plans/hotplug_mp_test_plan.rst >=20 > diff --git a/test_plans/hotplug_mp_test_plan.rst > b/test_plans/hotplug_mp_test_plan.rst > new file mode 100755 > index 0000000..4b9c6dd > --- /dev/null > +++ b/test_plans/hotplug_mp_test_plan.rst > @@ -0,0 +1,229 @@ > +.. Copyright (c) <2018>, Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + - Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + > + - Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + > + - Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL > THE > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > INDIRECT, > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS OR > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > INTERRUPTION) > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > ADVISED > + OF THE POSSIBILITY OF SUCH DAMAGE. > + > +=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 > +Hotplug on multi-processes > +=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 > +Currently secondary process will only sync ethdev from primary process > +at init stage, but it will not be aware if device is attached/detached > +on primary process at runtime. > + > +While there is the requirement from application that take > +primary-secondary process model. The primary process work as a resource > +management process, it will create/destroy virtual device at runtime, > +while the secondary process deal with the network stuff with these > +devices. > + > +So the orignial intention is to fix this gap, but beyond that the patch > +set provide a more comprehesive solution to handle different hotplug > +cases in multi-process situation, it cover below > +scenario: > + > + Attach a device from the primary > + Detach a device from the primary > + Attach a device from a secondary > + Detach a device from a secondary > + > +In primary-secondary process model, we assume ethernet devices are > +shared by default, that means attach or detach a device on any process > +will broadcast to all other processes through mp channel then device > +information will be synchronized on all processes. > + > +Any failure during attaching process will cause inconsistent status > +between processes, so proper rollback action should be considered. > + > + > +Test Case: Attach physical device from primary or secondary > +=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=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 > +Start sample code as primary then secondary:: > + ./hotplug_mp --proc-type=3Dauto > + > +Check primary and secondary processes don't have any device:: > + example> list > + list all etherdev > + > +Bind one port to igb_uio or vfio > + > +Attach the physical device from primary or secondary, check primary and > +secondary processes attach the share device successfully:: > + > + example> attach 0000:88:00.0 > + example> list > + list all etherdev > + 0 0000:88:00.0 > + > +Quit primary and secondary processes > + > +Re-bind port to kernel state > + > + > +Test Case: Detach physical device from primary or secondary > +=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=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 > +Bind one port to igb_uio or vfio > + > +Start sample code as primary then secondary:: > + ./hotplug_mp --proc-type=3Dauto > + > +Check primary and secondary processes have the device:: > + example> list > + list all etherdev > + 0 0000:88:00.0 > + > +Detach the physical device from primary or secondary, check primary and > +secondary processes detach the share device successfully:: > + > + example> detach 0000:88:00.0 > + example> list > + list all etherdev > + > +Quit primary and secondary processes > + > +Re-bind port to kernel state > + > + > +Test Case: Attach virtual device from primary or secondary > +=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=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 > +Start sample code as primary then secondary:: > + ./hotplug_mp --proc-type=3Dauto > + > +Check primary and secondary processes don't have any device:: > + example> list > + list all etherdev > + > +Attach a virtual device from primary or secondary, check primary and > +secondary processes attach the share device successfully:: > + > + example> attach net_af_packet,iface=3Dens803f1 > + example> list > + list all etherdev > + 0 net_af_packet > + > +Quit primary and secondary processes > + > +Test Case: Detach virtual device from primary or secondary > +=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=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 > +Start sample code as primary then secondary:: > + ./hotplug_mp --proc-type=3Dauto > + > +Check primary and secondary processes don't have any device:: > + example> list > + list all etherdev > + > +Attach a virtual device from primary or secondary, check primary and > +secondary processes attach the share device successfully:: > + > + example> attach net_af_packet,iface=3Dens803f1 > + example> list > + list all etherdev > + 0 net_af_packet > + > +Detach the physical device from primary or secondary, check primary and > +secondary processes detach the share device successfully:: > + > + example> detach net_af_packet > + example> list > + list all etherdev > + > +Quit primary and secondary processes > + > +Test Case: Repeat to attach/detach physical device from primary or > +secondary > +=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D=3D Start sample code as primary then secondary:: > + ./hotplug_mp --proc-type=3Dauto > + > +Check primary and secondary processes don't have any device:: > + example> list > + list all etherdev > + > +Bind one port to igb_uio or vfio > + > +Attach the physical device from primary or secondary, check primary and > +secondary processes attach the share device successfully:: > + > + example> attach 0000:88:00.0 > + example> list > + list all etherdev > + 0 0000:88:00.0 > + > +Attach the same physical device from primary or secondary, check > +primary and secondary processes fail to attach same device again > + > +Detach the physical device from primary or secondary, check primary and > +secondary processes detach the share device successfully:: > + > + example> detach 0000:88:00.0 > + example> list > + list all etherdev > + > +Detach the same physical device from primary or secondary, check > +primary and secondary processes fail to detach same device again > + > +Repeat above attach and detach for 2 times > + > +Quit primary and secondary processes > + > +Re-bind port to kernel state > + > + > +Test Case: Repeat to attach/detach virtual device from primary or > +secondary > +=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=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=3D=3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D Start sample code as primary then secondary:: > + ./hotplug_mp --proc-type=3Dauto > + > +Check primary and secondary processes don't have any device:: > + example> list > + list all etherdev > + > +Attach a virtual device from primary or secondary, check primary and > +secondary processes attach the share device successfully:: > + > + example> attach net_af_packet,iface=3Dens803f1 > + example> list > + list all etherdev > + 0 net_af_packet > + > +Attach the same virtual device from primary or secondary, check primary > +and secondary processes fail to attach same device again > + > +Detach the virtual device from primary or secondary, check primary and > +secondary processes detach the share device successfully:: > + > + example> detach net_af_packet > + example> list > + list all etherdev > + > +Detach the same virtual device from primary or secondary, check primary > +and secondary processes fail to detach same device again > + > +Repeat above attach and detach for 2 times > + > +Quit primary and secondary processes > -- > 2.7.5