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 26DF2A052E; Mon, 9 Mar 2020 06:04:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DB3631BEB2; Mon, 9 Mar 2020 06:04:12 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 600EDFEB for ; Mon, 9 Mar 2020 06:04:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2020 22:04:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,531,1574150400"; d="scan'208";a="414690249" Received: from unknown (HELO DPDK-zhaoyan-dev-34.sh.intel.com) ([10.67.118.34]) by orsmga005.jf.intel.com with ESMTP; 08 Mar 2020 22:04:08 -0700 From: "Chen, Zhaoyan" To: dts@dpdk.org Cc: "Chen, Zhaoyan" Date: Mon, 9 Mar 2020 12:59:01 +0800 Message-Id: <20200309045901.175399-1-zhaoyan.chen@intel.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [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" Add ABI negative test case for checking ABI test suite. --- test_plans/ABI_stable_test.rst | 150 +++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) 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.patc= h :: + + 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,n= et/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,n= et/e1000,net/ena,net/enetc,net/enic,net/fm10k,net/i40e,net/hinic,net/hns3,n= et/iavf,net/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,= net/octeontx,net/octeontx2,net/pcap,net/pfe,net/qede,net/sfc,net/softnic,ne= t/tap,net/thunderx,net/vdev_netvsc,net/vhost,net/virtio,net/vmxnet3,common/= cpt,common/dpaax,common/iavf,common/octeontx2,bus/dpaa,bus/fslmc,bus/ifpga,= bus/vmbus,mempool/bucket,mempool/dpaa,mempool/dpaa2,mempool/octeontx2,mempo= ol/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,cry= pto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypt= o/octeontx2_crypto,crypto/openssl,crypto/crypto_scheduler,crypto/virtio_cry= pto,vdpa/ifc,event/dpaa,event/dpaa2,event/octeontx2,event/opdl,event/skelet= on,event/sw,event/dsw,event/octeontx,baseband/null,baseband/turbo_sw,baseba= nd/fpga_lte_fec,net/failsafe + + 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_q= ueue, + 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_pkt= s, + - 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_rx= tx.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_mb= uf **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/ixgb= e/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_ethd= ev.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, n= b_pkts); + + return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, n= b_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 de= vice. */ + + 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,n= et/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,n= et/e1000,net/ena,net/enetc,net/enic,net/fm10k,net/hinic,net/hns3,net/iavf,n= et/ice,net/kni,net/liquidio,net/memif,net/netvsc,net/nfp,net/null,net/octeo= ntx,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,commo= n/dpaax,common/iavf,common/octeontx2,bus/dpaa,bus/fslmc,bus/ifpga,bus/vmbus= ,mempool/bucket,mempool/dpaa,mempool/dpaa2,mempool/octeontx2,mempool/stack,= raw/dpaa2_cmdif,raw/dpaa2_qdma,raw/ioat,raw/ntb,raw/octeontx2_dma,raw/octeo= ntx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/dpaa_sec,crypto/dpaa2= _sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeont= x2_crypto,crypto/openssl,crypto/crypto_scheduler,crypto/virtio_crypto,vdpa/= ifc,event/dpaa,event/dpaa2,event/octeontx2,event/opdl,event/skeleton,event/= sw,event/dsw,event/octeontx,baseband/null,baseband/turbo_sw,baseband/fpga_l= te_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 --=20 2.22.0