Skip to content

Commit

Permalink
add pmd support
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Du <frank.du@intel.com>
  • Loading branch information
frankdjx committed Jan 5, 2024
1 parent cdf3903 commit 4e37b89
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/example/st20p_rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def main():
# Init para
init_para = mtl.mtl_init_params()
mtl.mtl_para_port_set(init_para, mtl.MTL_PORT_P, args.p_port)
mtl.mtl_para_pmd_set(
init_para, mtl.MTL_PORT_P, mtl.mtl_pmd_by_port_name(args.p_port)
)
init_para.num_ports = 1
mtl.mtl_para_sip_set(init_para, mtl.MTL_PORT_P, args.p_sip)
init_para.flags = mtl.MTL_FLAG_BIND_NUMA | mtl.MTL_FLAG_DEV_AUTO_START_STOP
Expand Down
3 changes: 3 additions & 0 deletions python/example/st20p_rx_encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def main():
# Init para
init_para = mtl.mtl_init_params()
mtl.mtl_para_port_set(init_para, mtl.MTL_PORT_P, args.p_port)
mtl.mtl_para_pmd_set(
init_para, mtl.MTL_PORT_P, mtl.mtl_pmd_by_port_name(args.p_port)
)
init_para.num_ports = 1
mtl.mtl_para_sip_set(init_para, mtl.MTL_PORT_P, args.p_sip)
init_para.flags = mtl.MTL_FLAG_BIND_NUMA | mtl.MTL_FLAG_DEV_AUTO_START_STOP
Expand Down
3 changes: 3 additions & 0 deletions python/example/st20p_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def main():
# Init para
init_para = mtl.mtl_init_params()
mtl.mtl_para_port_set(init_para, mtl.MTL_PORT_P, args.p_port)
mtl.mtl_para_pmd_set(
init_para, mtl.MTL_PORT_P, mtl.mtl_pmd_by_port_name(args.p_port)
)
init_para.num_ports = 1
mtl.mtl_para_sip_set(init_para, mtl.MTL_PORT_P, args.p_sip)
init_para.flags = mtl.MTL_FLAG_BIND_NUMA | mtl.MTL_FLAG_DEV_AUTO_START_STOP
Expand Down
3 changes: 3 additions & 0 deletions python/example/st20p_tx_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def main():
# Init para
init_para = mtl.mtl_init_params()
mtl.mtl_para_port_set(init_para, mtl.MTL_PORT_P, args.p_port)
mtl.mtl_para_pmd_set(
init_para, mtl.MTL_PORT_P, mtl.mtl_pmd_by_port_name(args.p_port)
)
init_para.num_ports = 1
mtl.mtl_para_sip_set(init_para, mtl.MTL_PORT_P, args.p_sip)
init_para.flags = mtl.MTL_FLAG_BIND_NUMA | mtl.MTL_FLAG_DEV_AUTO_START_STOP
Expand Down
3 changes: 3 additions & 0 deletions python/example/st22p_rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def main():
# Init para
init_para = mtl.mtl_init_params()
mtl.mtl_para_port_set(init_para, mtl.MTL_PORT_P, args.p_port)
mtl.mtl_para_pmd_set(
init_para, mtl.MTL_PORT_P, mtl.mtl_pmd_by_port_name(args.p_port)
)
init_para.num_ports = 1
mtl.mtl_para_sip_set(init_para, mtl.MTL_PORT_P, args.p_sip)
init_para.flags = mtl.MTL_FLAG_BIND_NUMA | mtl.MTL_FLAG_DEV_AUTO_START_STOP
Expand Down
3 changes: 3 additions & 0 deletions python/example/st22p_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def main():
# Init para
init_para = mtl.mtl_init_params()
mtl.mtl_para_port_set(init_para, mtl.MTL_PORT_P, args.p_port)
mtl.mtl_para_pmd_set(
init_para, mtl.MTL_PORT_P, mtl.mtl_pmd_by_port_name(args.p_port)
)
init_para.num_ports = 1
mtl.mtl_para_sip_set(init_para, mtl.MTL_PORT_P, args.p_sip)
init_para.flags = mtl.MTL_FLAG_BIND_NUMA | mtl.MTL_FLAG_DEV_AUTO_START_STOP
Expand Down

0 comments on commit 4e37b89

Please sign in to comment.