Question about clone packet

Hello. I’m currently using the bmv2 model, I want to clone every packet in the switch and send it to port 1.but I tried clone_preserving_field_list but want to send to port 1 needs to use mirroring_add command, so I want to add cli_ input to the topology.json file to use command.txt but it doesn’t work, how can I fix this?

I have not used the key cli_input in the GitHub - p4lang/tutorials: P4 language tutorials switch configuration JSON files before, so cannot comment yet on whether that works, or what it takes to make it work.

I am replying to let you know that if you want a temporary workaround, you should be able to run the simple_switch_CLI command to create an interactive session where you can configure a switch with commands like mirroring_add, and dump table entries as well. Run simple_switch_CLI -h or maybe it is simple_switch_CLI --help to see what the command line options are. If you have multiple BMv2 switches running, each will have a different TCP port it is listening on for Thrift TCP connections, which you can see with a command like ps axguwww | grep simple_switch_grpc.