Re: [PATCH 2/2] samples: pktgen: allow to specify destination port
From: Daniel T. Lee <hidden>
Date: 2019-07-01 20:01:48
Thanks for the review! About the equivalent port in the same burst thing, I didn't realize it would work in that way. It doesn't matter in my use-case, but thank you for letting me know! On Tue, Jul 2, 2019 at 12:08 AM Jesper Dangaard Brouer [off-list ref] wrote:
On Sat, 29 Jun 2019 22:33:58 +0900 "Daniel T. Lee" [off-list ref] wrote:quoted
Currently, kernel pktgen has the feature to specify udp destination port for sending packet. (e.g. pgset "udp_dst_min 9") But on samples, each of the scripts doesn't have any option to achieve this. This commit adds the DST_PORT option to specify the target port(s) in the script. -p : ($DST_PORT) destination PORT range (e.g. 433-444) is also allowed Signed-off-by: Daniel T. Lee <redacted>Nice feature, this look very usable for testing. I think my QA asked me for something similar. One nitpick is that script named pktgen_sample03_burst_single_flow.sh implies this is a single flow, but by specifying a port-range this will be more flows. I'm okay with adding this, as the end-user specifying a port-range should realize this. Thus, you get my ACK. Acked-by: Jesper Dangaard Brouer <redacted> Another thing you should realize (but you/we cannot do anything about) is that when the scripts use burst or clone, then the port (UDPDST_RND) will be the same for all packets in the same burst. I don't know if it matters for your use-case. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer