test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] Add ABI negative test case
@ 2020-03-09  4:59 Chen, Zhaoyan
  2020-03-13  6:33 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Chen, Zhaoyan @ 2020-03-09  4:59 UTC (permalink / raw)
  To: dts; +Cc: Chen, Zhaoyan

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
+==================
+
+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 <herakliusz.lipiec@intel.com>
+  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=net/af_packet,net/ark,net/atlantic,net/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,net/ena,net/enetc,net/enic,net/fm10k,net/i40e,net/hinic,net/hns3,net/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,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,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/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeontx2_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_lte_fec,net/failsafe
+
+  Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
+  ---
+  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 += 1;
+    /* Try to transmit at least chunks of TX_MAX_BURST pkts */
+    if (likely(nb_pkts <= 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 = 0;
+    struct ixgbe_tx_queue *txq = (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 += 1;
+    tx_offload.data[0] = 0;
+    tx_offload.data[1] = 0;
+    txq = 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=net/af_packet,net/ark,net/atlantic,net/avp,net/axgbe,net/bond,net/bnx2x,net/bnxt,net/cxgbe,net/dpaa,net/dpaa2,net/e1000,net/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/octeontx,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,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/octeontx2_ep,raw/skeleton,crypto/caam_jr,crypto/ccp,crypto/dpaa_sec,crypto/dpaa2_sec,crypto/nitrox,crypto/null_crypto,crypto/octeontx_crypto,crypto/octeontx2_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_lte_fec,net/failsafe
+  meson  --werror -Dexamples=all --buildtype=debugoptimized --default-library=shared ./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 <dpdk_2002> -w 18:00.0 -- -i
+
+Test txonly::
+
+  set fwd txonly
+  start
+
+Expect there is no error happended
-- 
2.22.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-13  6:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09  4:59 [dts] [PATCH V1] Add ABI negative test case Chen, Zhaoyan
2020-03-13  6:33 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).