diff --git a/SOURCES/openvswitch-3.2.0.patch b/SOURCES/openvswitch-3.2.0.patch index bc6eff2..5d237e7 100644 --- a/SOURCES/openvswitch-3.2.0.patch +++ b/SOURCES/openvswitch-3.2.0.patch @@ -2837,6 +2837,61 @@ index 77f0c87dd4..9531500747 100644 fatal_signal_create_wakeup_events(); #ifdef _WIN32 +diff --git a/lib/flow.c b/lib/flow.c +index fe226cf0fe..b8f99f66be 100644 +--- a/lib/flow.c ++++ b/lib/flow.c +@@ -3306,6 +3306,8 @@ packet_expand(struct dp_packet *p, const struct flow *flow, size_t size) + * (This is useful only for testing, obviously, and the packet isn't really + * valid. Lots of fields are just zeroed.) + * ++ * If 'bad_csum' is true, the final IP checksum is invalid. ++ * + * For packets whose protocols can encapsulate arbitrary L7 payloads, 'l7' and + * 'l7_len' determine that payload: + * +@@ -3318,7 +3320,7 @@ packet_expand(struct dp_packet *p, const struct flow *flow, size_t size) + * from 'l7'. */ + void + flow_compose(struct dp_packet *p, const struct flow *flow, +- const void *l7, size_t l7_len) ++ const void *l7, size_t l7_len, bool bad_csum) + { + /* Add code to this function (or its callees) for emitting new fields or + * protocols. (This isn't essential, so it can be skipped for initial +@@ -3370,7 +3372,18 @@ 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) { ++ /* ++ * Internet checksum is a sum complement to zero, so any other ++ * value will result in an invalid checksum. Here, we flip one ++ * bit. ++ */ ++ ip->ip_csum ^= (OVS_FORCE ovs_be16) 0x1; ++ dp_packet_ip_checksum_bad(p); ++ } 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)) { +diff --git a/lib/flow.h b/lib/flow.h +index a9d026e1ce..75a9be3c19 100644 +--- a/lib/flow.h ++++ b/lib/flow.h +@@ -127,7 +127,7 @@ void flow_set_mpls_bos(struct flow *, int idx, uint8_t stack); + void flow_set_mpls_lse(struct flow *, int idx, ovs_be32 lse); + + void flow_compose(struct dp_packet *, const struct flow *, +- const void *l7, size_t l7_len); ++ const void *l7, size_t l7_len, bool bad_csum); + void packet_expand(struct dp_packet *, const struct flow *, size_t size); + + bool parse_ipv6_ext_hdrs(const void **datap, size_t *sizep, uint8_t *nw_proto, diff --git a/lib/hash.c b/lib/hash.c index c722f3c3cc..3d574de9b4 100644 --- a/lib/hash.c @@ -3096,7 +3151,7 @@ index 8f1361e21f..fe82d6dd02 100644 while (nb_tx != nb_tx_prep) { diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c -index 1a54add87f..e72b2b27ae 100644 +index 1a54add87f..91ead921e1 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -39,6 +39,7 @@ @@ -3107,6 +3162,24 @@ index 1a54add87f..e72b2b27ae 100644 #include "sset.h" #include "stream.h" #include "unaligned.h" +@@ -1758,7 +1759,7 @@ eth_from_flow_str(const char *s, size_t packet_size, + + packet = dp_packet_new(0); + if (packet_size) { +- flow_compose(packet, flow, NULL, 0); ++ flow_compose(packet, flow, NULL, 0, false); + if (dp_packet_size(packet) < packet_size) { + packet_expand(packet, flow, packet_size); + } else if (dp_packet_size(packet) > packet_size){ +@@ -1766,7 +1767,7 @@ eth_from_flow_str(const char *s, size_t packet_size, + packet = NULL; + } + } else { +- flow_compose(packet, flow, NULL, 64); ++ flow_compose(packet, flow, NULL, 64, false); + } + + ofpbuf_uninit(&odp_key); @@ -2045,11 +2046,20 @@ netdev_dummy_ip4addr(struct unixctl_conn *conn, int argc OVS_UNUSED, if (netdev && is_dummy_class(netdev->netdev_class)) { @@ -3471,6 +3544,29 @@ index 80da20d9f0..5cb1fc89ae 100644 retval = get_socket_rcvbuf(sock->fd); if (retval < 0) { retval = -retval; +diff --git a/lib/odp-execute-avx512.c b/lib/odp-execute-avx512.c +index 747e04014a..3adeb97f95 100644 +--- a/lib/odp-execute-avx512.c ++++ b/lib/odp-execute-avx512.c +@@ -357,6 +357,8 @@ avx512_get_delta(__m256i old_header, __m256i new_header) + 0xF, 0xF, 0xF, 0xF); + v_delta = _mm256_permutexvar_epi32(v_swap32a, v_delta); + ++ v_delta = _mm256_hadd_epi32(v_delta, v_zeros); ++ v_delta = _mm256_shuffle_epi8(v_delta, v_swap16a); + v_delta = _mm256_hadd_epi32(v_delta, v_zeros); + v_delta = _mm256_hadd_epi16(v_delta, v_zeros); + +@@ -566,6 +568,9 @@ avx512_ipv6_sum_header(__m512i ip6_header) + 0xF, 0xF, 0xF, 0xF); + + v_delta = _mm256_permutexvar_epi32(v_swap32a, v_delta); ++ ++ v_delta = _mm256_hadd_epi32(v_delta, v_zeros); ++ v_delta = _mm256_shuffle_epi8(v_delta, v_swap16a); + v_delta = _mm256_hadd_epi32(v_delta, v_zeros); + v_delta = _mm256_hadd_epi16(v_delta, v_zeros); + diff --git a/lib/odp-util.c b/lib/odp-util.c index 3eb2c3cb98..5e4f34cf74 100644 --- a/lib/odp-util.c @@ -4262,7 +4358,7 @@ index bb0e490910..5132f9c952 100644 ofproto_dpif_send_packet(mport->ofport, false, packet); } diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c -index 527e2f17ed..ed3468871e 100644 +index 527e2f17ed..e43d9f88c9 100644 --- a/ofproto/ofproto-dpif-trace.c +++ b/ofproto/ofproto-dpif-trace.c @@ -102,7 +102,7 @@ oftrace_add_recirc_node(struct ovs_list *recirc_queue, @@ -4282,6 +4378,15 @@ index 527e2f17ed..ed3468871e 100644 dp_packet_delete(node->packet); free(node); } +@@ -440,7 +441,7 @@ parse_flow_and_packet(int argc, const char *argv[], + if (generate_packet) { + /* Generate a packet, as requested. */ + packet = dp_packet_new(0); +- flow_compose(packet, flow, l7, l7_len); ++ flow_compose(packet, flow, l7, l7_len, false); + } else if (packet) { + /* Use the metadata from the flow and the packet argument to + * reconstruct the flow. */ @@ -845,17 +846,35 @@ ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow, bool names) { @@ -4615,9 +4720,27 @@ index 47ea0f47e7..94da7c09d5 100644 if (!ofm->temp_rule || ofm->temp_rule->state != RULE_INSERTED) { diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c -index e22ca757ac..ff520c150e 100644 +index e22ca757ac..1840c0dcf3 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c +@@ -1255,7 +1255,7 @@ check_ct_eventmask(struct dpif_backer *backer) + + /* Compose a dummy UDP packet. */ + dp_packet_init(&packet, 0); +- flow_compose(&packet, &flow, NULL, 64); ++ flow_compose(&packet, &flow, NULL, 64, false); + + /* Execute the actions. On older datapaths this fails with EINVAL, on + * newer datapaths it succeeds. */ +@@ -1348,7 +1348,7 @@ check_ct_timeout_policy(struct dpif_backer *backer) + + /* Compose a dummy UDP packet. */ + dp_packet_init(&packet, 0); +- flow_compose(&packet, &flow, NULL, 64); ++ flow_compose(&packet, &flow, NULL, 64, false); + + /* Execute the actions. On older datapaths this fails with EINVAL, on + * newer datapaths it succeeds. */ @@ -3902,15 +3902,21 @@ port_query_by_name(const struct ofproto *ofproto_, const char *devname, int error; @@ -6137,6 +6260,164 @@ index 1013098a18..b33d50673f 100644 + *) HAVE_PYTEST=no + echo "$0: unexpected error probing Python unit test requirements" >&2 ;; esac +diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at +index 67adf27fb1..061e13af85 100644 +--- a/tests/dpif-netdev.at ++++ b/tests/dpif-netdev.at +@@ -746,19 +746,25 @@ OVS_VSWITCHD_START( + # Modify the ip_dst addr to force changing the IP csum. + AT_CHECK([ovs-ofctl add-flow br1 in_port=p1,actions=mod_nw_dst:192.168.1.1,output:p2]) + ++flow_s="\ ++ eth_src=8a:bf:7e:2f:05:84,eth_dst=0a:8f:39:4f:e0:73,dl_type=0x0800,\ ++ nw_src=192.168.123.2,nw_dst=192.168.123.1,nw_proto=6,nw_ttl=64,nw_frag=no,\ ++ tp_src=54392,tp_dst=5201,tcp_flags=ack" ++ ++good_frame=$(ovs-ofctl compose-packet --bare "${flow_s}") ++ + # Check if no offload remains ok. + AT_CHECK([ovs-vsctl set Interface p2 options:tx_pcap=p2.pcap]) + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum=false]) + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum_set_good=false]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p1 \ +-0a8f394fe0738abf7e2f058408004500003433e0400040068f8fc0a87b02c0a87b01d4781451a962ad5417ed297b801000e547fd00000101080a2524d2345c7fe1c4 +-]) ++AT_CHECK([ovs-appctl netdev-dummy/receive p1 ${good_frame}]) + + # Checksum should change to 0x990 with ip_dst changed to 192.168.1.1 + # by the datapath while processing the packet. ++flow_expected=$(echo "${flow_s}" | sed 's/192.168.123.1/192.168.1.1/g') ++good_expected=$(ovs-ofctl compose-packet --bare "${flow_expected}") + AT_CHECK([ovs-pcap p2.pcap > p2.pcap.txt 2>&1]) +-AT_CHECK([tail -n 1 p2.pcap.txt], [0], [dnl +-0a8f394fe0738abf7e2f058408004500003433e0400040060990c0a87b02c0a80101d4781451a962ad5417ed297b801000e5c1fd00000101080a2524d2345c7fe1c4 ++AT_CHECK_UNQUOTED([tail -n 1 p2.pcap.txt], [0], [${good_expected} + ]) + + # Check if packets entering the datapath with csum offloading +@@ -766,12 +772,9 @@ AT_CHECK([tail -n 1 p2.pcap.txt], [0], [dnl + # in the datapath and not by the netdev. + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum=false]) + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum_set_good=true]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p1 \ +-0a8f394fe0738abf7e2f058408004500003433e0400040068f8fc0a87b02c0a87b01d4781451a962ad5417ed297b801000e547fd00000101080a2524d2345c7fe1c4 +-]) ++AT_CHECK([ovs-appctl netdev-dummy/receive p1 ${good_frame}]) + AT_CHECK([ovs-pcap p2.pcap > p2.pcap.txt 2>&1]) +-AT_CHECK([tail -n 1 p2.pcap.txt], [0], [dnl +-0a8f394fe0738abf7e2f058408004500003433e0400040060990c0a87b02c0a80101d4781451a962ad5417ed297b801000e5c1fd00000101080a2524d2345c7fe1c4 ++AT_CHECK_UNQUOTED([tail -n 1 p2.pcap.txt], [0], [${good_expected} + ]) + + # Check if packets entering the datapath with csum offloading +@@ -779,36 +782,93 @@ AT_CHECK([tail -n 1 p2.pcap.txt], [0], [dnl + # by the datapath. + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum=true]) + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum_set_good=true]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p1 \ +-0a8f394fe0738abf7e2f058408004500003433e0400040068f8fc0a87b02c0a87b01d4781451a962ad5417ed297b801000e547fd00000101080a2524d2345c7fe1c4 ++AT_CHECK([ovs-appctl netdev-dummy/receive p1 ${good_frame} + ]) + AT_CHECK([ovs-pcap p2.pcap > p2.pcap.txt 2>&1]) +-AT_CHECK([tail -n 1 p2.pcap.txt], [0], [dnl +-0a8f394fe0738abf7e2f058408004500003433e0400040060990c0a87b02c0a80101d4781451a962ad5417ed297b801000e5c1fd00000101080a2524d2345c7fe1c4 ++AT_CHECK_UNQUOTED([tail -n 1 p2.pcap.txt], [0], [${good_expected} + ]) + + # Push a packet with bad csum and offloading disabled to check + # if the datapath updates the csum, but does not fix the issue. ++bad_frame=$(ovs-ofctl compose-packet --bare --bad-csum "${flow_s}") + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum=false]) + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum_set_good=false]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p1 \ +-0a8f394fe0738abf7e2f058408004500003433e0400040068f03c0a87b02c0a87b01d4781451a962ad5417ed297b801000e547fd00000101080a2524d2345c7fe1c4 +-]) ++AT_CHECK([ovs-appctl netdev-dummy/receive p1 ${bad_frame}]) + AT_CHECK([ovs-pcap p2.pcap > p2.pcap.txt 2>&1]) +-AT_CHECK([tail -n 1 p2.pcap.txt], [0], [dnl +-0a8f394fe0738abf7e2f058408004500003433e0400040060904c0a87b02c0a80101d4781451a962ad5417ed297b801000e5c1fd00000101080a2524d2345c7fe1c4 ++bad_expected=$(ovs-ofctl compose-packet --bare --bad-csum "${flow_expected}") ++AT_CHECK_UNQUOTED([tail -n 1 p2.pcap.txt], [0], [${bad_expected} + ]) + + # Push a packet with bad csum and offloading enabled to check + # if the driver updates and fixes the csum. + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum=true]) + AT_CHECK([ovs-vsctl set Interface p1 options:ol_ip_csum_set_good=true]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p1 \ +-0a8f394fe0738abf7e2f058408004500003433e0400040068f03c0a87b02c0a87b01d4781451a962ad5417ed297b801000e547fd00000101080a2524d2345c7fe1c4 +-]) ++AT_CHECK([ovs-appctl netdev-dummy/receive p1 ${bad_frame}]) + AT_CHECK([ovs-pcap p2.pcap > p2.pcap.txt 2>&1]) +-AT_CHECK([tail -n 1 p2.pcap.txt], [0], [dnl +-0a8f394fe0738abf7e2f058408004500003433e0400040060990c0a87b02c0a80101d4781451a962ad5417ed297b801000e5c1fd00000101080a2524d2345c7fe1c4 ++AT_CHECK_UNQUOTED([tail -n 1 p2.pcap.txt], [0], [${good_expected} + ]) + OVS_VSWITCHD_STOP + AT_CLEANUP ++ ++AT_SETUP([datapath - Actions Autovalidator Checksum]) ++ ++OVS_VSWITCHD_START(add-port br0 p0 -- set Interface p0 type=dummy \ ++ -- add-port br0 p1 -- set Interface p1 type=dummy) ++ ++AT_CHECK([ovs-appctl odp-execute/action-impl-set autovalidator], [0], [dnl ++Action implementation set to autovalidator. ++]) ++ ++dnl Add flows to trigger checksum calculation. ++AT_DATA([flows.txt], [dnl ++ in_port=p0,ip,actions=mod_nw_src=10.1.1.1,p1 ++ in_port=p0,ipv6,actions=set_field:fc00::100->ipv6_src,p1 ++]) ++AT_CHECK([ovs-ofctl del-flows br0]) ++AT_CHECK([ovs-ofctl -Oopenflow13 add-flows br0 flows.txt]) ++ ++dnl Make sure checksum won't be offloaded. ++AT_CHECK([ovs-vsctl set Interface p0 options:ol_ip_csum=false]) ++AT_CHECK([ovs-vsctl set Interface p0 options:ol_ip_csum_set_good=false]) ++ ++AT_CHECK([ovs-vsctl set Interface p1 options:pcap=p1.pcap]) ++ ++dnl IPv4 packet with values that will trigger carry-over addition for checksum. ++flow_s_v4=" ++ eth_src=47:42:86:08:17:50,eth_dst=3e:55:b5:9e:3a:fb,dl_type=0x0800, ++ nw_src=229.167.36.90,nw_dst=130.161.64.186,nw_proto=6,nw_ttl=64,nw_frag=no, ++ tp_src=54392,tp_dst=5201,tcp_flags=ack" ++ ++good_frame=$(ovs-ofctl compose-packet --bare "${flow_s_v4}") ++AT_CHECK([ovs-appctl netdev-dummy/receive p0 ${good_frame}]) ++ ++dnl Checksum should change to 0xAC33 with ip_src changed to 10.1.1.1 ++dnl by the datapath while processing the packet. ++flow_expected=$(echo "${flow_s_v4}" | sed 's/229.167.36.90/10.1.1.1/g') ++good_expected=$(ovs-ofctl compose-packet --bare "${flow_expected}") ++AT_CHECK([ovs-pcap p1.pcap > p1.pcap.txt 2>&1]) ++AT_CHECK_UNQUOTED([tail -n 1 p1.pcap.txt], [0], [${good_expected} ++]) ++ ++dnl Repeat similar test for IPv6. ++flow_s_v6=" ++ eth_src=8a:bf:7e:2f:05:84,eth_dst=0a:8f:39:4f:e0:73,dl_type=0x86dd, ++ ipv6_src=2f8a:2076:3926:9e7:2d47:4bc9:9c7:17f3, ++ ipv6_dst=7287:10dd:2fb9:41d5:3eb2:2c7a:11b0:6258, ++ ipv6_label=0x51ac,nw_proto=6,nw_ttl=142,nw_frag=no, ++ tp_src=20405,tp_dst=20662,tcp_flags=ack" ++ ++good_frame_v6=$(ovs-ofctl compose-packet --bare "${flow_s_v6}") ++AT_CHECK([ovs-appctl netdev-dummy/receive p0 ${good_frame_v6}]) ++ ++dnl Checksum should change to 0x59FD with ipv6_src changed to fc00::100 ++dnl by the datapath while processing the packet. ++flow_expected_v6=$(echo "${flow_s_v6}" | \ ++ sed 's/2f8a:2076:3926:9e7:2d47:4bc9:9c7:17f3/fc00::100/g') ++good_expected_v6=$(ovs-ofctl compose-packet --bare "${flow_expected_v6}") ++AT_CHECK([ovs-pcap p1.pcap > p1.pcap.txt 2>&1]) ++AT_CHECK_UNQUOTED([tail -n 1 p1.pcap.txt], [0], [${good_expected_v6} ++]) ++ ++OVS_VSWITCHD_STOP ++AT_CLEANUP diff --git a/tests/learn.at b/tests/learn.at index d127fed348..d0bcc83633 100644 --- a/tests/learn.at @@ -10433,10 +10714,99 @@ index 785014956e..efe91479a6 100644 0 | module_0 | EMER | emergency 1 | module_0 | ERR | error diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c -index 24d0941cf2..25fd38f5f5 100644 +index 24d0941cf2..2d413e2396 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c -@@ -5113,10 +5113,10 @@ static const struct ovs_cmdl_command all_commands[] = { +@@ -154,6 +154,12 @@ static int show_stats = 1; + /* --pcap: Makes "compose-packet" print a pcap on stdout. */ + static int print_pcap = 0; + ++/* --bare: Makes "compose-packet" print a bare hexified payload. */ ++static int print_bare = 0; ++ ++/* -bad-csum: Makes "compose-packet" generate an invalid checksum. */ ++static int bad_csum = 0; ++ + /* --raw: Makes "ofp-print" read binary data from stdin. */ + static int raw = 0; + +@@ -243,6 +249,8 @@ parse_options(int argc, char *argv[]) + {"color", optional_argument, NULL, OPT_COLOR}, + {"may-create", no_argument, NULL, OPT_MAY_CREATE}, + {"pcap", no_argument, &print_pcap, 1}, ++ {"bare", no_argument, &print_bare, 1}, ++ {"bad-csum", no_argument, &bad_csum, 1}, + {"raw", no_argument, &raw, 1}, + {"read-only", no_argument, NULL, OPT_READ_ONLY}, + DAEMON_LONG_OPTIONS, +@@ -4948,20 +4956,33 @@ ofctl_parse_key_value(struct ovs_cmdl_context *ctx) + } + } + +-/* "compose-packet [--pcap] FLOW [L7]": Converts the OpenFlow flow +- * specification FLOW to a packet with flow_compose() and prints the hex bytes +- * in the packet on stdout. Also verifies that the flow extracted from that +- * packet matches the original FLOW. ++/* "compose-packet [--pcap|--bare] [--bad-csum] FLOW [L7]": Converts the ++ * OpenFlow flow specification FLOW to a packet with flow_compose() and prints ++ * the hex bytes of the packet, with offsets, to stdout. ++ * ++ * With --pcap, prints the packet in pcap format, so that you can do something ++ * like "ovs-ofctl --pcap compose-packet udp | tcpdump -vvvv -r-" to use ++ * another tool to dump the packet contents. ++ * ++ * With --bare, prints the packet as a single bare hex string with no ++ * spaces or offsets, so that you can pass the result directly to e.g. ++ * "ovs-appctl netdev-dummy/receive vif $(ovs-ofctl compose-packet --bare ++ * FLOW)" ++ * ++ * With --bad-csum, produces a packet with an invalid IP checksum. (For IPv4.) + * +- * With --pcap, prints the packet to stdout instead as a pcap file, so that you +- * can do something like "ovs-ofctl --pcap compose-packet udp | tcpdump -vvvv +- * -r-" to use another tool to dump the packet contents. ++ * Regardless of the mode, the command also verifies that the flow extracted ++ * from that packet matches the original FLOW. + * + * If L7 is specified, draws the L7 payload data from it, otherwise defaults to + * 64 bytes of payload. */ + static void + ofctl_compose_packet(struct ovs_cmdl_context *ctx) + { ++ if (print_pcap && print_bare) { ++ ovs_fatal(1, "--bare and --pcap are mutually exclusive"); ++ } ++ + if (print_pcap && isatty(STDOUT_FILENO)) { + ovs_fatal(1, "not writing pcap data to stdout; redirect to a file " + "or pipe to tcpdump instead"); +@@ -4989,7 +5010,7 @@ ofctl_compose_packet(struct ovs_cmdl_context *ctx) + l7_len = dp_packet_size(&payload); + l7 = dp_packet_steal_data(&payload); + } +- flow_compose(&p, &flow1, l7, l7_len); ++ flow_compose(&p, &flow1, l7, l7_len, bad_csum); + free(l7); + + if (print_pcap) { +@@ -4997,6 +5018,16 @@ ofctl_compose_packet(struct ovs_cmdl_context *ctx) + ovs_pcap_write_header(p_file); + ovs_pcap_write(p_file, &p); + ovs_pcap_close(p_file); ++ } else if (print_bare) { ++ /* Binary to a bare hex string. */ ++ for (int i = 0; i < dp_packet_size(&p); i++) { ++ uint8_t val = ((uint8_t *) dp_packet_data(&p))[i]; ++ /* Don't use ds_put_hex because it adds 0x prefix as well as ++ * it doesn't guarantee an even number of payload characters, which ++ * may be important elsewhere (e.g. in netdev-dummy/receive). */ ++ printf("%02" PRIx8, val); ++ } ++ + } else { + ovs_hex_dump(stdout, dp_packet_data(&p), dp_packet_size(&p), 0, false); + } +@@ -5113,10 +5144,10 @@ static const struct ovs_cmdl_command all_commands[] = { 1, 1, ofctl_dump_ipfix_flow, OVS_RO }, { "ct-flush-zone", "switch zone", diff --git a/SPECS/openvswitch3.2.spec b/SPECS/openvswitch3.2.spec index 31ad244..1326394 100644 --- a/SPECS/openvswitch3.2.spec +++ b/SPECS/openvswitch3.2.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 3.2.0 -Release: 82%{?dist} +Release: 83%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -761,6 +761,13 @@ exit 0 %endif %changelog +* Fri May 31 2024 Open vSwitch CI - 3.2.0-83 +- Merging upstream branch-3.2 [RH git: 6b1ae3a4ed] + Commit list: + 06a4f0d7e4 odp-execute: Fix AVX checksum calculation. + 1cf6e70690 ovs-ofctl: Implement compose-packet --bare [--bad-csum]. + + * Thu May 30 2024 Open vSwitch CI - 3.2.0-82 - Merging upstream branch-3.2 [RH git: 78ade43d4a] Commit list: