Skip to content

Commit

Permalink
tests: flow-offload: test cases for flow library
Browse files Browse the repository at this point in the history
Adding test cases for validating flow library
* Test cases cover 2 profiles - ovs and default
* Flow create delete cases

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Change-Id: Ia6b8ae6c1d5d81e8a07fadac180924a15884ffa7
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/123472
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
harman-kalra authored and jerinjacobk committed Aug 27, 2024
1 parent 13a256f commit b36fd7e
Show file tree
Hide file tree
Showing 5 changed files with 1,174 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/flow-offload/flow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* SPDX-License-Identifier: Marvell-MIT
* Copyright (c) 2024 Marvell.
*/

#ifndef __PACKET_H__
#define __PACKET_H__

#include <fcntl.h>
#include <inttypes.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

#include <rte_cycles.h>
#include <rte_eal.h>
#include <rte_flow.h>
#include <rte_hexdump.h>
#include <rte_lcore.h>
#include <rte_malloc.h>
#include <rte_mbuf.h>
#include <rte_thread.h>

#include <dao_assert.h>
#include <dao_flow.h>
#include <dao_log.h>
#include <dao_version.h>

#define BURST_SIZE 255

typedef struct dao_flow *(*flow_test_create_t)(uint16_t portid, int test_val_idx);

struct dao_flow *ovs_flow_test_create(uint16_t portid, int test_val_idx);
struct dao_flow *default_flow_test_create(uint16_t portid, int test_val_idx);
struct dao_flow *basic_flow_test_create(uint16_t portid, int test_val_idx);
int sample_packet(struct rte_mempool *mbp, struct rte_mbuf **pkts);
int validate_flow_match(struct rte_mbuf *pkt, uint16_t mark);

#endif /* __PACKET_H__ */
Loading

0 comments on commit b36fd7e

Please sign in to comment.