diff options
author | Maxime Peim <mpeim@cisco.com> | 2024-02-19 11:26:23 +0100 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2024-02-20 17:20:43 +0000 |
commit | 7217dcdb54c8d66cec28ca71697b808099a7bd85 (patch) | |
tree | 2f65ecbbc005d014940fd3dbf94ed39da308000a /src/vnet/pg/pg.h | |
parent | 088d1a0168cdf0e3ca651cf07012025ba6eab3fa (diff) |
pg: fix stream pg interface
When an other interface is specified to generate packets from, we should
bind its sw_if_index to the pg interface to use.
Fix if_index_by_sw_if_index variable name, and force to specify a pg
interface to source traffic from.
Type: fix
Change-Id: Ib3e6dca92774b307def82926fc09945b7998267d
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Diffstat (limited to 'src/vnet/pg/pg.h')
-rw-r--r-- | src/vnet/pg/pg.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/pg/pg.h b/src/vnet/pg/pg.h index e69ee6458e7..6d5b25ba25a 100644 --- a/src/vnet/pg/pg.h +++ b/src/vnet/pg/pg.h @@ -349,7 +349,7 @@ typedef struct pg_main_t /* Pool of interfaces. */ pg_interface_t *interfaces; uword *if_index_by_if_id; - uword *if_id_by_sw_if_index; + uword *if_index_by_sw_if_index; /* Vector of buffer indices for use in pg_stream_fill_replay, per thread */ u32 **replay_buffers_by_thread; @@ -383,7 +383,7 @@ void pg_interface_enable_disable_coalesce (pg_interface_t * pi, u8 enable, u32 tx_node_index); /* Find/create free packet-generator interface index. */ -u32 pg_interface_add_or_get (pg_main_t *pg, uword stream_index, u8 gso_enabled, +u32 pg_interface_add_or_get (pg_main_t *pg, u32 stream_index, u8 gso_enabled, u32 gso_size, u8 coalesce_enabled, pg_interface_mode_t mode); |