On Thu, Oct 19, 2023 at 02:57:26AM +0000, Ihar Hrachyshka wrote:
> The command reads a flow string and an optional additional payload on
> stdin and produces a hex-string representation of the corresponding
> frame on stdout. It may receive more than a single input line.
>
> The command may be useful in tests, where we may need to produce hex
> frame payloads to compare observed frames against.
>
> As an example of the tool use, a single test case is converted to it.
> The test uses both normal and --bad-csum behavior of the tool,
> confirming it works as advertised.
>
> Signed-off-by: Ihar Hrachyshka <[email protected]>
...
> @@ -3370,7 +3372,12 @@ flow_compose(struct dp_packet *p, const struct flow
> *flow,
> /* Checksum has already been zeroed by put_zeros call. */
> ip->ip_csum = csum(ip, sizeof *ip);
>
> - dp_packet_ol_set_ip_csum_good(p);
> + if (bad_csum) {
> + ip->ip_csum++;
Hi Ihar,
The CI seems a bit unhappy about this patch.
One problem seems to be the line above [1].
lib/flow.c:3376:24: error: restricted ovs_be16 degrades to integer
[1]
https://github.com/ovsrobot/ovs/actions/runs/6569410776/job/17845265505#step:11:1981
> + } else {
> + dp_packet_ol_set_ip_csum_good(p);
> + }
> +
> pseudo_hdr_csum = packet_csum_pseudoheader(ip);
> flow_compose_l4_csum(p, flow, pseudo_hdr_csum);
> } else if (flow->dl_type == htons(ETH_TYPE_IPV6)) {
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev