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 2ED5DA0567; Fri, 13 Mar 2020 07:33:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 245541C01E; Fri, 13 Mar 2020 07:33:16 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 83FC81C011 for ; Fri, 13 Mar 2020 07:33:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 23:33:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,547,1574150400"; d="scan'208";a="289940648" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 12 Mar 2020 23:33:13 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Mar 2020 23:33:13 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Mar 2020 23:33:12 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.43]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.155]) with mapi id 14.03.0439.000; Fri, 13 Mar 2020 14:33:10 +0800 From: "Tu, Lijuan" To: "Chen, Zhaoyan" , "dts@dpdk.org" CC: "Chen, Zhaoyan" Thread-Topic: [dts] [PATCH V1] Add ABI negative test case Thread-Index: AQHV9dA7AWrn0NXQ4UmHNmtF+nypgqhGFt7Q Date: Fri, 13 Mar 2020 06:33:10 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBEC7A7@SHSMSX101.ccr.corp.intel.com> References: <20200309045901.175399-1-zhaoyan.chen@intel.com> In-Reply-To: <20200309045901.175399-1-zhaoyan.chen@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="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] Add ABI negative test case 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: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Chen, Zhaoyan > Sent: Monday, March 9, 2020 12:59 PM > To: dts@dpdk.org > Cc: Chen, Zhaoyan > Subject: [dts] [PATCH V1] Add ABI negative test case >=20 > Add ABI negative test case for checking ABI test suite. >=20 > --- > test_plans/ABI_stable_test.rst | 150 +++++++++++++++++++++++++++++++++ > 1 file changed, 150 insertions(+) >=20 > diff --git a/test_plans/ABI_stable_test.rst b/test_plans/ABI_stable_test.= rst > index bc8deb4..ab2fd7e 100644 > --- a/test_plans/ABI_stable_test.rst > +++ b/test_plans/ABI_stable_test.rst > @@ -148,3 +148,153 @@ Execute Test Suites > +-------------------------------+------------------------+ > | l3fwd | performance | > +-------------------------------+------------------------+ > + > + > +Negative Test Case > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Prepare 1 patch file, 0001-rte_tx_burst_t_add-one-argument-at-the- > end.patch :: > + > + From 56eb4b14c2344fddc9f8ee1c6b5cf9ef4999ee80 Mon Sep 17 00:00:00 > + 2001 > + From: Herakliusz Lipiec > + Date: Thu, 30 Jan 2020 17:19:19 +0000 > + Subject: [PATCH] eth_tx_burst_t add one argument at the end > + > + compile with: > + meson configure > + -Ddisable_drivers=3Dnet/af_packet,net/ark,net/atlantic,net/avp,net/axgb= e > + ,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,n > e > + t/ena,net/enetc,net/enic,net/fm10k,net/i40e,net/hinic,net/hns3,net/iav > + f,net/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,n > + et/octeontx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/softni > + c,net/tap,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet > + > 3,common/cpt,common/dpaax,common/iavf,common/octeontx2,bus/dpaa, > bus/fs > + > lmc,bus/ifpga,bus/vmbus,mempool/bucket,mempool/dpaa,mempool/dpaa > 2,memp > + > ool/octeontx2,mempool/stack,raw/dpaa2_cmdif,raw/dpaa2_qdma,raw/ioat > ,ra > + > w/ntb,raw/octeontx2_dma,raw/octeontx2_ep,raw/skeleton,crypto/caam_jr, > c > + rypto/ccp,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_c > + rypto,crypto/octeontx_crypto,crypto/octeontx2_crypto,crypto/openssl,cr > + ypto/crypto_scheduler,crypto/virtio_crypto,vdpa/ifc,event/dpaa,event/d > + > paa2,event/octeontx2,event/opdl,event/skeleton,event/sw,event/dsw,even > + > t/octeontx,baseband/null,baseband/turbo_sw,baseband/fpga_lte_fec,net/f > + ailsafe > + > + Signed-off-by: Herakliusz Lipiec > + --- > + drivers/net/ixgbe/ixgbe_ethdev.h | 4 ++-- > + drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++++----- > + drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +- > + lib/librte_ethdev/rte_ethdev.h | 2 +- > + lib/librte_ethdev/rte_ethdev_core.h | 2 +- > + 5 files changed, 10 insertions(+), 10 deletions(-) > + > + diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h > + b/drivers/net/ixgbe/ixgbe_ethdev.h > + index e1cd8fd16..f5fce74fc 100644 > + --- a/drivers/net/ixgbe/ixgbe_ethdev.h > + +++ b/drivers/net/ixgbe/ixgbe_ethdev.h > + @@ -642,10 +642,10 @@ uint16_t ixgbe_recv_pkts_lro_bulk_alloc(void > *rx_queue, > + struct rte_mbuf **rx_pkts, uint16_t nb_pkts); > + > + uint16_t ixgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > + - uint16_t nb_pkts); > + + uint16_t nb_pkts, uint32_t dummy); > + > + uint16_t ixgbe_xmit_pkts_simple(void *tx_queue, struct rte_mbuf > **tx_pkts, > + - uint16_t nb_pkts); > + + uint16_t nb_pkts, uint32_t dummy); > + > + uint16_t ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > + uint16_t nb_pkts); > + diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c > + b/drivers/net/ixgbe/ixgbe_rxtx.c index 7b398f1a1..198be146a 100644 > + --- a/drivers/net/ixgbe/ixgbe_rxtx.c > + +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > + @@ -315,10 +315,10 @@ tx_xmit_pkts(void *tx_queue, struct rte_mbuf > + **tx_pkts, > + > + uint16_t > + ixgbe_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts, > + - uint16_t nb_pkts) > + + uint16_t nb_pkts, uint32_t dummy) > + { > + uint16_t nb_tx; > + - > + + dummy +=3D 1; > + /* Try to transmit at least chunks of TX_MAX_BURST pkts */ > + if (likely(nb_pkts <=3D RTE_PMD_IXGBE_TX_MAX_BURST)) > + return tx_xmit_pkts(tx_queue, tx_pkts, nb_pkts); @@ -341,7 > + +341,7 @@ ixgbe_xmit_pkts_simple(void *tx_queue, struct rte_mbuf > + **tx_pkts, > + > + static uint16_t > + ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts, > + - uint16_t nb_pkts) > + + uint16_t nb_pkts, __rte_unused uint32_t dummy) > + { > + uint16_t nb_tx =3D 0; > + struct ixgbe_tx_queue *txq =3D (struct ixgbe_tx_queue *)tx_queue; @= @ > + -622,7 +622,7 @@ ixgbe_xmit_cleanup(struct ixgbe_tx_queue *txq) > + > + uint16_t > + ixgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > + - uint16_t nb_pkts) > + + uint16_t nb_pkts, uint32_t dummy) > + { > + struct ixgbe_tx_queue *txq; > + struct ixgbe_tx_entry *sw_ring; > + @@ -648,7 +648,7 @@ ixgbe_xmit_pkts(void *tx_queue, struct rte_mbuf > + **tx_pkts, #ifdef RTE_LIBRTE_SECURITY > + uint8_t use_ipsec; > + #endif > + - > + + dummy +=3D 1; > + tx_offload.data[0] =3D 0; > + tx_offload.data[1] =3D 0; > + txq =3D tx_queue; > + diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c > + b/drivers/net/ixgbe/ixgbe_vf_representor.c > + index dbbef294a..47b41992d 100644 > + --- a/drivers/net/ixgbe/ixgbe_vf_representor.c > + +++ b/drivers/net/ixgbe/ixgbe_vf_representor.c > + @@ -164,7 +164,7 @@ ixgbe_vf_representor_rx_burst(__rte_unused void > + *rx_queue, > + > + static uint16_t > + ixgbe_vf_representor_tx_burst(__rte_unused void *tx_queue, > + - __rte_unused struct rte_mbuf **tx_pkts, __rte_unused uint16_t > nb_pkts) > + + __rte_unused struct rte_mbuf **tx_pkts, __rte_unused uint16_t > nb_pkts, __rte_unused uint32_t dummy) > + { > + return 0; > + } > + diff --git a/lib/librte_ethdev/rte_ethdev.h > + b/lib/librte_ethdev/rte_ethdev.h index d1a593ad1..ba6c36155 100644 > + --- a/lib/librte_ethdev/rte_ethdev.h > + +++ b/lib/librte_ethdev/rte_ethdev.h > + @@ -4663,7 +4663,7 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t > queue_id, > + } > + #endif > + > + - return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], > tx_pkts, nb_pkts); > + + return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], > tx_pkts, nb_pkts, 5); > + } > + > + /** > + diff --git a/lib/librte_ethdev/rte_ethdev_core.h > + b/lib/librte_ethdev/rte_ethdev_core.h > + index 7bf97e24e..8a173574c 100644 > + --- a/lib/librte_ethdev/rte_ethdev_core.h > + +++ b/lib/librte_ethdev/rte_ethdev_core.h > + @@ -344,7 +344,7 @@ typedef uint16_t (*eth_rx_burst_t)(void *rxq, > + > + typedef uint16_t (*eth_tx_burst_t)(void *txq, > + struct rte_mbuf **tx_pkts, > + - uint16_t nb_pkts); > + + uint16_t nb_pkts, uint32_t dummy); > + /**< @internal Send output packets on a transmit queue of an Ethernet > + device. */ > + > + typedef uint16_t (*eth_tx_prep_t)(void *txq, > + -- > + 2.17.2 > + > + > +Apply negative patch to rte_eth_dev structure and ixgbe pmd driver, > +inject 4 bytes in tx_burst. > +:: > + > + git apply 0001-rte_tx_burst_t_add-one-argument-at-the-end.patch > + > +Build shared libraries, (just enable i40e pmd for testing):: > + > + meson configure > + -Ddisable_drivers=3Dnet/af_packet,net/ark,net/atlantic,net/avp,net/axgb= e > + ,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,n > e > + t/ena,net/enetc,net/enic,net/fm10k,net/hinic,net/hns3,net/iavf,net/ice > + ,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,net/octeon > + tx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/softnic,net/tap > + ,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet3,common > / > + > cpt,common/dpaax,common/iavf,common/octeontx2,bus/dpaa,bus/fslmc,b > us/i > + > fpga,bus/vmbus,mempool/bucket,mempool/dpaa,mempool/dpaa2,mempo > ol/octeo > + > ntx2,mempool/stack,raw/dpaa2_cmdif,raw/dpaa2_qdma,raw/ioat,raw/ntb, > raw > + > /octeontx2_dma,raw/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp > + ,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,cry > + pto/octeontx_crypto,crypto/octeontx2_crypto,crypto/openssl,crypto/cryp > + to_scheduler,crypto/virtio_crypto,vdpa/ifc,event/dpaa,event/dpaa2,even > + t/octeontx2,event/opdl,event/skeleton,event/sw,event/dsw,event/octeont > + x,baseband/null,baseband/turbo_sw,baseband/fpga_lte_fec,net/failsafe > + meson --werror -Dexamples=3Dall --buildtype=3Ddebugoptimized > + --default-library=3Dshared ./devtools/.. ./build-gcc-shared ninja -C > + ./build-gcc-shared > + > +Run testpmd application refer to Common Test steps with ixgbe pmd NIC.:: > + > + testpmd -c 0xf -n 4 -d -w 18:00.0 -- -i > + > +Test txonly:: > + > + set fwd txonly > + start > + > +Expect there is no error happended > -- > 2.22.0