From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62C2EA0350; Wed, 1 Jul 2020 07:54:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5507F1BF92; Wed, 1 Jul 2020 07:54:49 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DA4AA1BF82 for ; Wed, 1 Jul 2020 07:54:46 +0200 (CEST) IronPort-SDR: w9sGpZGugyS2T7cSSowAWL5QncxPfoby7A7Q15o+CVyK2sv+buFGh9e67EzFbwWzwxUua+VKpr etoubFglMUnQ== X-IronPort-AV: E=McAfee;i="6000,8403,9668"; a="144650902" X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="144650902" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 22:54:46 -0700 IronPort-SDR: Yz+DptzIrv+Gpd47naiKtSFROY4jSGgt6fSu8Dh3ZqrdtapErmK0tfJHFoQ15z983aV/ffQXWt NnNT9stDyRCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,299,1589266800"; d="scan'208";a="266676014" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga008.fm.intel.com with ESMTP; 30 Jun 2020 22:54:46 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 22:54:45 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 30 Jun 2020 22:54:45 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.85]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.208]) with mapi id 14.03.0439.000; Wed, 1 Jul 2020 13:54:42 +0800 From: "Tu, Lijuan" To: "Tu, Lijuan" CC: "dts@dpdk.org" Thread-Topic: [PATCH v2] test_plan/link_flow_ctrl: new cases for port stop/start Thread-Index: AQHWRgnS99wZ7Su7BkSxLC7wxVosh6jyTBUw Date: Wed, 1 Jul 2020 05:54:41 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC67FBD@SHSMSX101.ccr.corp.intel.com> References: <1591202727-162262-1-git-send-email-lijuan.tu@intel.com> <1592580105-9351-1-git-send-email-lijuan.tu@intel.com> In-Reply-To: <1592580105-9351-1-git-send-email-lijuan.tu@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.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v2] test_plan/link_flow_ctrl: new cases for port stop/start 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: Tu, Lijuan > Sent: 2020=1B$BG/=1B(B6=1B$B7n=1B(B19=1B$BF|=1B(B 23:22 > To: Tu, Lijuan > Cc: dts@dpdk.org > Subject: [PATCH v2] test_plan/link_flow_ctrl: new cases for port stop/sta= rt >=20 > * add new cases (also not inclued in script): > - test_pause_fwd_port_stop_start > - test_perf_flowctrl_on_port_stop_start >=20 > * add missing cases (already inclued in script): > - test_flowctrl_off_pause_fwd_on > - test_flowctrl_off_pause_fwd_off >=20 > * more description > * more organized >=20 > Signed-off-by: Lijuan Tu > --- > test_plans/link_flowctrl_test_plan.rst | 213 +++++++++++++++++++++++++++= --- > --- > 1 file changed, 179 insertions(+), 34 deletions(-) >=20 > diff --git a/test_plans/link_flowctrl_test_plan.rst > b/test_plans/link_flowctrl_test_plan.rst > index d028e67..d3bd8af 100644 > --- a/test_plans/link_flowctrl_test_plan.rst > +++ b/test_plans/link_flowctrl_test_plan.rst > @@ -52,13 +52,37 @@ MAC Control Frame Forwarding consists in: > - When Flow Control and MAC Control Frame Forwarding are enabled the > PAUSE > frames will be passed to the host and can be handled by testpmd. >=20 > -Note: Priority flow control is not included in this test plan. > +.. note:: >=20 > -Note: the high_water, low_water, pause_time, send_xon are configured int= o > the -NIC register. It is not necessary to validate the accuracy of these > parameters. > -And what change it can cause. The port_id is used to indicate the NIC to= be - > configured. In certain case, a system can contain multiple NIC. However t= he NIC > -need not be configured multiple times. > + Priority flow control is not included in this test plan. > + > +Configuration Functions in testpmd: > + > + Set the link flow control parameter on a port:: > + > + testpmd> set flow_ctrl rx (on|off) tx (on|off) (high_water) (low_wat= er) \ > + (pause_time) (send_xon) mac_ctrl_frame_fwd (on|off) \ > + autoneg (on|off) (port_id) > + > + * ``high_water`` (integer): High threshold value to trigger XOFF. > + > + * ``low_water`` (integer): Low threshold value to trigger XON. > + > + * ``pause_time`` (integer): Pause quota in the Pause frame. > + > + * ``send_xon`` (0/1): Send XON frame. > + > + * ``mac_ctrl_frame_fwd``: Enable receiving MAC control frames. > + > + * ``autoneg``: Change the auto-negotiation parameter. > + > + .. note:: > + > + the high_water, low_water, pause_time, send_xon are configured into= the > + NIC register. It is not necessary to validate the accuracy of these= parameters. > + And what change it can cause. The port_id is used to indicate the N= IC to be > + configured. In certain case, a system can contain multiple NIC. How= ever the > NIC > + need not be configured multiple times. >=20 >=20 > Prerequisites > @@ -81,12 +105,16 @@ to the device under test:: > modprobe vfio-pci > usertools/dpdk-devbind.py --bind=3Dvfio-pci device_bus_id >=20 > -Test Case: test_perf_flowctrl_on_pause_fwd_on > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > -:: > +Test Case: Ethernet link flow control > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +This case series are focus on ``Ethernet link flow control features``, r= equires a > high-speed packet generator, such as ixia. >=20 > - testpmd> set flowctrl rx on tx on high_water low_water pause_time > +Subcase: test_perf_flowctrl_on_pause_fwd_on > +------------------------------------------- > +Enable both link flow control and PAUSE frame forwarding:: > + > + testpmd> set flow_ctrl rx on tx on high_water low_water pause_time > send_xon mac_ctrl_frame_fwd on autoneg on port_id >=20 > Setup the ``csum`` forwarding mode:: > @@ -104,7 +132,7 @@ Start the packet forwarding:: > TX queues=3D1 - TX desc=3D512 - TX free threshold=3D0 > TX threshold registers: pthresh=3D32 hthresh=3D8 wthresh=3D8 >=20 > -Validate the NIC can generate the pause frame? > +Validate the NIC can generate the pause frame(``tx on``). > Configure the traffic generator to send IPv4/UDP packet at the length of= 66Byte > at the line speed (10G). Because the 66Byte packet cannot reach line rate= when > running with testpmd, so it is expected that the pause frame will be sent= to the > @@ -114,35 +142,33 @@ It is strongly recommended that the user look into = the > data sheet before doing any flow control configuration. By default, the = flow > control on 10G is disabled. > the flow control for 1G is enabled. >=20 > -Validate the NIC can deal with the pause frame. > +Validate the NIC can deal with the pause frame(``rx on``). > Configure the traffic generator to send out large amount of pause frames= , this > will cause the NIC to disable / slow down the packet transmission accordi= ng to > the pause time. Once the traffic generator stop sending the pause frame, = the > NIC will restore the packet transmission to the expected rate. >=20 > +Subcase: test_perf_flowctrl_on_pause_fwd_off > +-------------------------------------------- > +Enable link flow control and Disable PAUSE frame forwarding:: >=20 > -Test Case: test_perf_flowctrl_on_pause_fwd_off > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > -:: > - > - testpmd> set flowctrl rx on tx on high_water low_water pause_time > + testpmd> set flow_ctrl rx on tx on high_water low_water pause_time > send_xon mac_ctrl_frame_fwd off autoneg on port_id >=20 > -Validate same behavior as test_perf_flowctrl_on_pause_fwd_on > - > +Validate same behavior as ``test_perf_flowctrl_on_pause_fwd_on`` >=20 > -Test Case: test_perf_flowctrl_rx_on > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > -:: > +Subcase: test_perf_flowctrl_rx_on > +--------------------------------- > +Enable only rx link flow control:: >=20 > - testpmd> set flowctrl rx on tx on high_water low_water pause_time > + testpmd> set flowctrl rx on tx off high_water low_water pause_time > send_xon mac_ctrl_frame_fwd off autoneg on port_id >=20 > -Validate same behavior as test_perf_flowctrl_on_pause_fwd_on > +Validate the NIC can deal with the pause frame(``rx on``). >=20 > - > -Test Case: test_perf_flowctrl_off_pause_fwd_off > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Subcase: test_perf_flowctrl_off_pause_fwd_off > +--------------------------------------------- > +Disable both link flow control and PAUSE frame forwarding. > This is the default mode for 10G PMD, by default, testpmd is running on = this > mode. > no need to execute any command:: >=20 > @@ -154,20 +180,139 @@ enough. Packet loss can be observed. > Validate the NIC will not slow down the packet transmission after receiv= ing the > pause frame. >=20 > -Test Case: test_perf_flowctrl_off_pause_fwd_on > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > -:: > +Subcase: test_perf_flowctrl_off_pause_fwd_on > +-------------------------------------------- > +Disable link flow control and enable PAUSE frame forwarding:: >=20 > testpmd> set flowctrl rx off tx off high_water low_water pause_time > send_xon mac_ctrl_frame_fwd on autoneg on port_id >=20 > -Validate same behavior as test_perf_flowctrl_off_pause_fwd_off > +Validate same behavior as ``test_perf_flowctrl_off_pause_fwd_off`` >=20 > -Test Case: test_perf_flowctrl_tx_on > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > -:: > +Subcase: test_perf_flowctrl_tx_on > +--------------------------------- > +Enable only tx link flow control:: >=20 > testpmd> set flowctrl rx off tx on high_water low_water pause_time > send_xon mac_ctrl_frame_fwd off autoneg on port_id >=20 > Validate same behavior as test_perf_flowctrl_on_pause_fwd_off > + > +Subcase: test_perf_flowctrl_on_port_stop_start > +---------------------------------------------- > +Link flow control setting still working after port stop/start. > + > +* ``enable`` Link flow control:: > + > + testpmd> set flow_ctrl rx on tx on high_water low_water pause_time > + send_xon mac_ctrl_frame_fwd off autoneg on port_id > + > + validate behavior same as ``test_perf_flowctrl_on_pause_fwd_off``. > + > + Stop and start port:: > + > + testpmd> stop > + testpmd> port stop 0 > + testpmd> port start 0 > + testpmd> start > + > + validate behavior same as ``test_perf_flowctrl_on_pause_fwd_off``. > + > + > +* ``disable`` Link flow control:: > + > + testpmd> set flowctrl rx off tx off high_water low_water pause_time > + send_xon mac_ctrl_frame_fwd off autoneg on port_id > + > + validate behavior same as ``test_perf_flowctrl_off_pause_fwd_off``. > + > + Stop and start port:: > + > + testpmd> stop > + testpmd> port stop 0 > + testpmd> port start 0 > + testpmd> start > + > + validate behavior same as ``test_perf_flowctrl_off_pause_fwd_off``. > + > + > +Test Case: MAC Control Frame Forwarding > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +This case series foucs on ``MAC Control Frame Forwarding``, no > +requirment of high-speed packets, it's very friendship to use scapy as p= acket > generator. > + > +Subcase: test_flowctrl_off_pause_fwd_off > +---------------------------------------- > +PAUSE Frames will not be received by testpmd while Flow Control > +disabled and MAC Control Frame Forwarding disabled:: > + > + testpmd> set flow_ctrl rx off tx off 300 50 10 1 mac_ctrl_frame_fwd > + off autoneg off 0 > + > +Send PAUSE packets to DUT with below options: > + > +* Regular frame (correct src and dst mac addresses and opcode) > +* Wrong source frame (wrong src, correct and dst mac address and > +correct opcode) > +* Wrong opcode frame (correct src and dst mac address and wrong opcode) > +* Wrong destination frame (correct src mac and opcode, wrong dst mac > +address) > + > +Validate no packet received by testpmd according to ``show port stats > +all`` > + > +Subcase: test_flowctrl_off_pause_fwd_on > +--------------------------------------- > +All PAUSE Frames will be forwarded by testpmd while Flow Control > +disabled and MAC Control Frame Forwarding enabled:: > + > + testpmd> set flow_ctrl rx off tx off 300 50 10 1 mac_ctrl_frame_fwd > + on autoneg off 0 > + > +Send PAUSE packets to DUT with same options as > +``test_flowctrl_off_pause_fwd_off`` > + > +Validate port statistic match below table > + > +.. table:: > + > + +-------+-----------------+---------------+ > + | # | Frames | Received | > + +=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > + | 0 | Regular frame | Yes | > + +-------+-----------------+---------------+ > + | 1 | Wrong src mac | Yes | > + +-------+-----------------+---------------+ > + | 2 | Wrong opcode | Yes | > + +-------+-----------------+---------------+ > + | 3 | Wrong dst mac | Yes | > + +-------+-----------------+---------------+ > + > +Subcase: test_pause_fwd_port_stop_start > +--------------------------------------- > +MAC Control Frame Forwarding setting still working after port stop/start= . > + > +* ``enable`` MAC Control Frame Forwarding, and validate packets are rece= ived:: > + > + testpmd> set flow_ctrl mac_ctrl_frame_fwd on 0 > + > + Send regular PAUSE packets to DUT, and validate packets are received. > + > + Stop and start port:: > + > + testpmd> stop > + testpmd> port stop 0 > + testpmd> port start 0 > + testpmd> start > + > + Send regular PAUSE packets to DUT, and validate packets are received. > + > + > +* ``disable`` MAC Control Frame Forwarding, and validate ``no`` packets = are > received:: > + > + testpmd> set flow_ctrl mac_ctrl_frame_fwd off 0 > + > + Send regular PAUSE packets to DUT, and validate ``no`` packets are rec= eived. > + > + Stop and start port:: > + > + testpmd> stop > + testpmd> port stop 0 > + testpmd> port start 0 > + testpmd> start > + > + Send regular PAUSE packets to DUT, and validate ``no`` packets are rec= eived. > -- > 1.8.3.1