diff --git a/SOURCES/openvswitch-2.13.0.patch b/SOURCES/openvswitch-2.13.0.patch index e3f9ac9..bf6b9a2 100644 --- a/SOURCES/openvswitch-2.13.0.patch +++ b/SOURCES/openvswitch-2.13.0.patch @@ -39936,7 +39936,7 @@ index 68c33a0f96..9b251f81fa 100644 * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c -index d393aab5e3..49906960d3 100644 +index d393aab5e3..5233908f29 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -83,9 +83,9 @@ @@ -39952,7 +39952,19 @@ index d393aab5e3..49906960d3 100644 #define MIN_TO_MSEC 60000 #define FLOW_DUMP_MAX_BATCH 50 -@@ -294,6 +294,8 @@ struct pmd_auto_lb { +@@ -273,8 +273,9 @@ static bool dpcls_lookup(struct dpcls *cls, + ( 1 << OFPMBT13_DROP ) + + struct dp_meter_band { +- struct ofputil_meter_band up; /* type, prec_level, pad, rate, burst_size */ +- uint32_t bucket; /* In 1/1000 packets (for PKTPS), or in bits (for KBPS) */ ++ uint32_t rate; ++ uint32_t burst_size; ++ uint64_t bucket; /* In 1/1000 packets (for PKTPS), or in bits (for KBPS) */ + uint64_t packet_count; + uint64_t byte_count; + }; +@@ -294,6 +295,8 @@ struct pmd_auto_lb { bool is_enabled; /* Current status of Auto load balancing. */ uint64_t rebalance_intvl; uint64_t rebalance_poll_timer; @@ -39961,7 +39973,7 @@ index d393aab5e3..49906960d3 100644 }; /* Datapath based on the network device interface from netdev.h. -@@ -481,6 +483,12 @@ struct dp_netdev_flow_stats { +@@ -481,6 +484,12 @@ struct dp_netdev_flow_stats { atomic_uint16_t tcp_flags; /* Bitwise-OR of seen tcp_flags values. */ }; @@ -39974,7 +39986,7 @@ index d393aab5e3..49906960d3 100644 /* A flow in 'dp_netdev_pmd_thread's 'flow_table'. * * -@@ -541,6 +549,11 @@ struct dp_netdev_flow { +@@ -541,6 +550,11 @@ struct dp_netdev_flow { /* Statistics. */ struct dp_netdev_flow_stats stats; @@ -39986,7 +39998,7 @@ index d393aab5e3..49906960d3 100644 /* Actions. */ OVSRCU_TYPE(struct dp_netdev_actions *) actions; -@@ -2149,7 +2162,11 @@ dp_netdev_pmd_find_dpcls(struct dp_netdev_pmd_thread *pmd, +@@ -2149,7 +2163,11 @@ dp_netdev_pmd_find_dpcls(struct dp_netdev_pmd_thread *pmd, } #define MAX_FLOW_MARK (UINT32_MAX - 1) @@ -39999,7 +40011,7 @@ index d393aab5e3..49906960d3 100644 struct megaflow_to_mark_data { const struct cmap_node node; -@@ -2175,7 +2192,7 @@ flow_mark_alloc(void) +@@ -2175,7 +2193,7 @@ flow_mark_alloc(void) if (!flow_mark.pool) { /* Haven't initiated yet, do it here */ @@ -40008,7 +40020,7 @@ index d393aab5e3..49906960d3 100644 } if (id_pool_alloc_id(flow_mark.pool, &mark)) { -@@ -2280,6 +2297,12 @@ mark_to_flow_disassociate(struct dp_netdev_pmd_thread *pmd, +@@ -2280,6 +2298,12 @@ mark_to_flow_disassociate(struct dp_netdev_pmd_thread *pmd, struct cmap_node *mark_node = CONST_CAST(struct cmap_node *, &flow->mark_node); @@ -40021,7 +40033,7 @@ index d393aab5e3..49906960d3 100644 cmap_remove(&flow_mark.mark_to_flow, mark_node, hash_int(mark, 0)); flow->mark = INVALID_FLOW_MARK; -@@ -2433,6 +2456,7 @@ dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload) +@@ -2433,6 +2457,7 @@ dp_netdev_flow_offload_put(struct dp_flow_offload_item *offload) mark = flow_mark_alloc(); if (mark == INVALID_FLOW_MARK) { VLOG_ERR("Failed to allocate flow mark!\n"); @@ -40029,7 +40041,7 @@ index d393aab5e3..49906960d3 100644 } } info.flow_mark = mark; -@@ -2512,6 +2536,7 @@ dp_netdev_flow_offload_main(void *data OVS_UNUSED) +@@ -2512,6 +2537,7 @@ dp_netdev_flow_offload_main(void *data OVS_UNUSED) VLOG_DBG("%s to %s netdev flow\n", ret == 0 ? "succeed" : "failed", op); dp_netdev_free_flow_offload(offload); @@ -40037,7 +40049,7 @@ index d393aab5e3..49906960d3 100644 } return NULL; -@@ -3032,9 +3057,56 @@ dp_netdev_pmd_find_flow(const struct dp_netdev_pmd_thread *pmd, +@@ -3032,9 +3058,56 @@ dp_netdev_pmd_find_flow(const struct dp_netdev_pmd_thread *pmd, return NULL; } @@ -40095,7 +40107,7 @@ index d393aab5e3..49906960d3 100644 struct dpif_flow_stats *stats, struct dpif_flow_attrs *attrs) { -@@ -3056,11 +3128,31 @@ dpif_netdev_get_flow_offload_status(const struct dp_netdev *dp, +@@ -3056,11 +3129,31 @@ dpif_netdev_get_flow_offload_status(const struct dp_netdev *dp, } ofpbuf_use_stack(&buf, &act_buf, sizeof act_buf); /* Taking a global 'port_mutex' to fulfill thread safety @@ -40132,7 +40144,7 @@ index d393aab5e3..49906960d3 100644 netdev_close(netdev); if (ret) { return false; -@@ -3329,6 +3421,9 @@ dp_netdev_flow_add(struct dp_netdev_pmd_thread *pmd, +@@ -3329,6 +3422,9 @@ dp_netdev_flow_add(struct dp_netdev_pmd_thread *pmd, /* Do not allocate extra space. */ flow = xmalloc(sizeof *flow - sizeof flow->cr.flow.mf + mask.len); memset(&flow->stats, 0, sizeof flow->stats); @@ -40142,7 +40154,7 @@ index d393aab5e3..49906960d3 100644 flow->dead = false; flow->batch = NULL; flow->mark = INVALID_FLOW_MARK; -@@ -3506,6 +3601,15 @@ dpif_netdev_flow_put(struct dpif *dpif, const struct dpif_flow_put *put) +@@ -3506,6 +3602,15 @@ dpif_netdev_flow_put(struct dpif *dpif, const struct dpif_flow_put *put) return error; } @@ -40158,7 +40170,7 @@ index d393aab5e3..49906960d3 100644 if (put->ufid) { ufid = *put->ufid; } else { -@@ -3875,11 +3979,12 @@ dpif_netdev_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops, +@@ -3875,11 +3980,12 @@ dpif_netdev_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops, /* Enable or Disable PMD auto load balancing. */ static void @@ -40172,7 +40184,7 @@ index d393aab5e3..49906960d3 100644 bool enable_alb = false; bool multi_rxq = false; -@@ -3906,18 +4011,24 @@ set_pmd_auto_lb(struct dp_netdev *dp) +@@ -3906,18 +4012,24 @@ set_pmd_auto_lb(struct dp_netdev *dp) enable_alb = enable_alb && pmd_rxq_assign_cyc && pmd_alb->auto_lb_requested; @@ -40201,7 +40213,7 @@ index d393aab5e3..49906960d3 100644 } /* Applies datapath configuration from the database. Some of the changes are -@@ -3935,6 +4046,9 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) +@@ -3935,6 +4047,9 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) uint32_t insert_min, cur_min; uint32_t tx_flush_interval, cur_tx_flush_interval; uint64_t rebalance_intvl; @@ -40211,7 +40223,7 @@ index d393aab5e3..49906960d3 100644 tx_flush_interval = smap_get_int(other_config, "tx-flush-interval", DEFAULT_TX_FLUSH_INTERVAL); -@@ -4012,7 +4126,7 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) +@@ -4012,7 +4127,7 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) false); rebalance_intvl = smap_get_int(other_config, "pmd-auto-lb-rebal-interval", @@ -40220,7 +40232,7 @@ index d393aab5e3..49906960d3 100644 /* Input is in min, convert it to msec. */ rebalance_intvl = -@@ -4020,9 +4134,38 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) +@@ -4020,9 +4135,38 @@ dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config) if (pmd_alb->rebalance_intvl != rebalance_intvl) { pmd_alb->rebalance_intvl = rebalance_intvl; @@ -40262,7 +40274,7 @@ index d393aab5e3..49906960d3 100644 return 0; } -@@ -4493,6 +4636,12 @@ struct rr_numa { +@@ -4493,6 +4637,12 @@ struct rr_numa { bool idx_inc; }; @@ -40275,7 +40287,7 @@ index d393aab5e3..49906960d3 100644 static struct rr_numa * rr_numa_list_lookup(struct rr_numa_list *rr, int numa_id) { -@@ -4940,9 +5089,17 @@ reconfigure_datapath(struct dp_netdev *dp) +@@ -4940,9 +5090,17 @@ reconfigure_datapath(struct dp_netdev *dp) /* Check for all the ports that need reconfiguration. We cache this in * 'port->need_reconfigure', because netdev_is_reconf_required() can @@ -40295,7 +40307,7 @@ index d393aab5e3..49906960d3 100644 port->need_reconfigure = true; } } -@@ -5076,7 +5233,7 @@ reconfigure_datapath(struct dp_netdev *dp) +@@ -5076,7 +5234,7 @@ reconfigure_datapath(struct dp_netdev *dp) reload_affected_pmds(dp); /* Check if PMD Auto LB is to be enabled */ @@ -40304,7 +40316,7 @@ index d393aab5e3..49906960d3 100644 } /* Returns true if one of the netdevs in 'dp' requires a reconfiguration */ -@@ -5189,10 +5346,17 @@ get_dry_run_variance(struct dp_netdev *dp, uint32_t *core_list, +@@ -5189,10 +5347,17 @@ get_dry_run_variance(struct dp_netdev *dp, uint32_t *core_list, for (int i = 0; i < n_rxqs; i++) { int numa_id = netdev_get_numa_id(rxqs[i]->port->netdev); numa = rr_numa_list_lookup(&rr, numa_id); @@ -40325,7 +40337,7 @@ index d393aab5e3..49906960d3 100644 goto cleanup; } -@@ -5320,7 +5484,7 @@ pmd_rebalance_dry_run(struct dp_netdev *dp) +@@ -5320,7 +5485,7 @@ pmd_rebalance_dry_run(struct dp_netdev *dp) improvement = ((curr_variance - new_variance) * 100) / curr_variance; } @@ -40334,7 +40346,71 @@ index d393aab5e3..49906960d3 100644 ret = false; } } -@@ -8040,6 +8204,7 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, +@@ -5787,12 +5952,14 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, + /* Update all bands and find the one hit with the highest rate for each + * packet (if any). */ + for (int m = 0; m < meter->n_bands; ++m) { +- band = &meter->bands[m]; ++ uint64_t max_bucket_size; + ++ band = &meter->bands[m]; ++ max_bucket_size = (band->rate + band->burst_size) * 1000ULL; + /* Update band's bucket. */ +- band->bucket += delta_t * band->up.rate; +- if (band->bucket > band->up.burst_size) { +- band->bucket = band->up.burst_size; ++ band->bucket += (uint64_t) delta_t * band->rate; ++ if (band->bucket > max_bucket_size) { ++ band->bucket = max_bucket_size; + } + + /* Drain the bucket for all the packets, if possible. */ +@@ -5810,8 +5977,8 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, + * (Only one band will be fired by a packet, and that + * can be different for each packet.) */ + for (int i = band_exceeded_pkt; i < cnt; i++) { +- if (band->up.rate > exceeded_rate[i]) { +- exceeded_rate[i] = band->up.rate; ++ if (band->rate > exceeded_rate[i]) { ++ exceeded_rate[i] = band->rate; + exceeded_band[i] = m; + } + } +@@ -5830,8 +5997,8 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_, + /* Update the exceeding band for the exceeding packet. + * (Only one band will be fired by a packet, and that + * can be different for each packet.) */ +- if (band->up.rate > exceeded_rate[i]) { +- exceeded_rate[i] = band->up.rate; ++ if (band->rate > exceeded_rate[i]) { ++ exceeded_rate[i] = band->rate; + exceeded_band[i] = m; + } + } +@@ -5913,16 +6080,15 @@ dpif_netdev_meter_set(struct dpif *dpif, ofproto_meter_id meter_id, + config->bands[i].burst_size = config->bands[i].rate; + } + +- meter->bands[i].up = config->bands[i]; +- /* Convert burst size to the bucket units: */ +- /* pkts => 1/1000 packets, kilobits => bits. */ +- meter->bands[i].up.burst_size *= 1000; +- /* Initialize bucket to empty. */ +- meter->bands[i].bucket = 0; ++ meter->bands[i].rate = config->bands[i].rate; ++ meter->bands[i].burst_size = config->bands[i].burst_size; ++ /* Start with a full bucket. */ ++ meter->bands[i].bucket = ++ (meter->bands[i].burst_size + meter->bands[i].rate) * 1000ULL; + + /* Figure out max delta_t that is enough to fill any bucket. */ + band_max_delta_t +- = meter->bands[i].up.burst_size / meter->bands[i].up.rate; ++ = meter->bands[i].bucket / meter->bands[i].rate; + if (band_max_delta_t > meter->max_delta_t) { + meter->max_delta_t = band_max_delta_t; + } +@@ -8040,6 +8206,7 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, if (pmd->ctx.now > pmd->rxq_next_cycle_store) { uint64_t curr_tsc; @@ -40342,7 +40418,7 @@ index d393aab5e3..49906960d3 100644 struct pmd_auto_lb *pmd_alb = &pmd->dp->pmd_alb; if (pmd_alb->is_enabled && !pmd->isolated && (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] >= -@@ -8056,7 +8221,9 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, +@@ -8056,7 +8223,9 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, pmd_load = ((tot_proc * 100) / (tot_idle + tot_proc)); } @@ -44583,10 +44659,110 @@ index a7982de381..39d9aa391e 100644 ]) AT_CLEANUP diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at -index 0aeb4e788f..82a23d0cae 100644 +index 0aeb4e788f..32082967b8 100644 --- a/tests/dpif-netdev.at +++ b/tests/dpif-netdev.at -@@ -371,7 +371,7 @@ m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD], +@@ -293,59 +293,61 @@ type=drop rate=1 burst_size=2 + ]) + + ovs-appctl time/warp 5000 +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) ++for i in `seq 1 7`; do ++ AT_CHECK( ++ [ovs-appctl netdev-dummy/receive p7 \ ++ 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) ++done ++ ++for i in `seq 1 5`; do ++ AT_CHECK( ++ [ovs-appctl netdev-dummy/receive p8 \ ++ 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) ++done ++ + sleep 1 # wait for forwarders process packets + + # Meter 1 is measuring packets, allowing one packet per second with +-# bursts of one packet, so 4 out of 5 packets should hit the drop ++# bursts of one packet, so 3 out of 5 packets should hit the drop + # band. +-# Meter 2 is measuring kbps, with burst size 2 (== 2000 bits). 4 packets +-# (240 bytes == 1920 bits) pass, but the last packet should hit the drop band. ++# Meter 2 is measuring kbps, with burst size 2 (== 3000 bits). 6 packets ++# (360 bytes == 2880 bits) pass, but the last packet should hit the drop band. + AT_CHECK([ovs-ofctl -O OpenFlow13 meter-stats br0 | strip_timers], [0], [dnl + OFPST_METER reply (OF1.3) (xid=0x2): + meter:1 flow_count:1 packet_in_count:5 byte_in_count:300 duration:0.0s bands: +-0: packet_count:4 byte_count:240 ++0: packet_count:3 byte_count:180 + +-meter:2 flow_count:1 packet_in_count:5 byte_in_count:300 duration:0.0s bands: ++meter:2 flow_count:1 packet_in_count:7 byte_in_count:420 duration:0.0s bands: + 0: packet_count:1 byte_count:60 + ]) + + # Advance time by 1/2 second + ovs-appctl time/warp 500 + +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) +-AT_CHECK([ovs-appctl netdev-dummy/receive p8 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) ++for i in `seq 1 5`; do ++ AT_CHECK( ++ [ovs-appctl netdev-dummy/receive p7 \ ++ 'in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) ++ ++ AT_CHECK( ++ [ovs-appctl netdev-dummy/receive p8 \ ++ 'in_port(8),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)' --len 60]) ++done ++ + sleep 1 # wait for forwarders process packets + + # Meter 1 is measuring packets, allowing one packet per second with + # bursts of one packet, so all 5 of the new packets should hit the drop + # band. +-# Meter 2 is measuring kbps, with burst size 2 (== 2000 bits). After 500ms +-# there should be space for 80 + 500 bits, so one new 60 byte (480 bit) packet ++# Meter 2 is measuring kbps, with burst size 2 (== 3000 bits). After 500ms ++# there should be space for 120 + 500 bits, so one new 60 byte (480 bit) packet + # should pass, remaining 4 should hit the drop band. + AT_CHECK([ovs-ofctl -O OpenFlow13 meter-stats br0 | strip_timers], [0], [dnl + OFPST_METER reply (OF1.3) (xid=0x2): + meter:1 flow_count:1 packet_in_count:10 byte_in_count:600 duration:0.0s bands: +-0: packet_count:9 byte_count:540 ++0: packet_count:8 byte_count:480 + +-meter:2 flow_count:1 packet_in_count:10 byte_in_count:600 duration:0.0s bands: ++meter:2 flow_count:1 packet_in_count:12 byte_in_count:720 duration:0.0s bands: + 0: packet_count:5 byte_count:300 + ]) + +@@ -354,7 +356,7 @@ ovs-appctl time/warp 5000 + AT_CHECK([ + ovs-appctl coverage/read-counter datapath_drop_meter + ], [0], [dnl +-14 ++13 + ]) + + AT_CHECK([cat ovs-vswitchd.log | filter_flow_install | strip_xout_keep_actions], [0], [dnl +@@ -371,7 +373,7 @@ m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD], [AT_SETUP([dpif-netdev - partial hw offload - $1]) OVS_VSWITCHD_START( [add-port br0 p1 -- \ @@ -44595,7 +44771,7 @@ index 0aeb4e788f..82a23d0cae 100644 set bridge br0 datapath-type=dummy \ other-config:datapath-id=1234 fail-mode=secure], [], [], [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])]) -@@ -393,7 +393,7 @@ skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc +@@ -393,7 +395,7 @@ skb_priority(0),skb_mark(0),ct_state(0),ct_zone(0),ct_mark(0),ct_label(0),recirc # Check that flow successfully offloaded. OVS_WAIT_UNTIL([grep "succeed to add netdev flow" ovs-vswitchd.log]) AT_CHECK([filter_hw_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl @@ -44604,7 +44780,7 @@ index 0aeb4e788f..82a23d0cae 100644 ]) # Check that datapath flow installed successfully. AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl -@@ -404,7 +404,7 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), a +@@ -404,7 +406,7 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), a # Check for succesfull packet matching with installed offloaded flow. AT_CHECK([filter_hw_packet_netdev_dummy < ovs-vswitchd.log | strip_xout], [0], [dnl @@ -44613,7 +44789,7 @@ index 0aeb4e788f..82a23d0cae 100644 ]) ovs-appctl revalidator/wait -@@ -421,7 +421,7 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), p +@@ -421,7 +423,7 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), p # Check that flow successfully deleted from HW. OVS_WAIT_UNTIL([grep "succeed to delete netdev flow" ovs-vswitchd.log]) AT_CHECK([filter_hw_flow_del < ovs-vswitchd.log | strip_xout], [0], [dnl @@ -44622,7 +44798,7 @@ index 0aeb4e788f..82a23d0cae 100644 ]) OVS_VSWITCHD_STOP AT_CLEANUP]) -@@ -434,7 +434,7 @@ m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS], +@@ -434,7 +436,7 @@ m4_define([DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS], [AT_SETUP([dpif-netdev - partial hw offload with packet modifications - $1]) OVS_VSWITCHD_START( [add-port br0 p1 -- \ @@ -44631,7 +44807,7 @@ index 0aeb4e788f..82a23d0cae 100644 set bridge br0 datapath-type=dummy \ other-config:datapath-id=1234 fail-mode=secure], [], [], [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])]) -@@ -460,7 +460,7 @@ packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type +@@ -460,7 +462,7 @@ packet_type(ns=0,id=0),eth(src=00:06:07:08:09:0a,dst=00:01:02:03:04:05),eth_type # Check that flow successfully offloaded. OVS_WAIT_UNTIL([grep "succeed to add netdev flow" ovs-vswitchd.log]) AT_CHECK([filter_hw_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl @@ -44640,7 +44816,7 @@ index 0aeb4e788f..82a23d0cae 100644 ]) # Check that datapath flow installed successfully. AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl -@@ -472,7 +472,7 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8100),vlan(vid=99,pcp= +@@ -472,7 +474,7 @@ recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8100),vlan(vid=99,pcp= # Check for succesfull packet matching with installed offloaded flow. AT_CHECK([filter_hw_packet_netdev_dummy < ovs-vswitchd.log | strip_xout], [0], [dnl p1: packet: udp,dl_vlan=99,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=00:06:07:08:09:0a,dl_dst=00:01:02:03:04:05,nw_src=127.0.0.1,nw_dst=127.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=81,tp_dst=82 dnl @@ -44649,7 +44825,7 @@ index 0aeb4e788f..82a23d0cae 100644 ]) ovs-appctl revalidator/wait -@@ -490,7 +490,7 @@ packets:1, bytes:64, used:0.0s, actions:set(ipv4(src=192.168.0.7)),set(udp(dst=3 +@@ -490,7 +492,7 @@ packets:1, bytes:64, used:0.0s, actions:set(ipv4(src=192.168.0.7)),set(udp(dst=3 # Check that flow successfully deleted from HW. OVS_WAIT_UNTIL([grep "succeed to delete netdev flow" ovs-vswitchd.log]) AT_CHECK([filter_hw_flow_del < ovs-vswitchd.log | strip_xout], [0], [dnl @@ -44658,7 +44834,7 @@ index 0aeb4e788f..82a23d0cae 100644 ]) # Check that ip address and udp port were correctly modified in output packets. -@@ -506,3 +506,20 @@ udp,in_port=ANY,dl_vlan=99,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=00:06:07:08:09: +@@ -506,3 +508,20 @@ udp,in_port=ANY,dl_vlan=99,dl_vlan_pcp=7,vlan_tci1=0x0000,dl_src=00:06:07:08:09: DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS([dummy]) DPIF_NETDEV_FLOW_HW_OFFLOAD_OFFSETS([dummy-pmd]) @@ -44833,9 +45009,18 @@ index 4893280a99..7cb09498e6 100644 sed '/^[[#&]]/d' < test-data > input.txt sed -n 's/^# //p; /^$/p' < test-data > expout diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at -index ff1cc93707..6415a8a04d 100644 +index ff1cc93707..b8fc9a6652 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at +@@ -1871,7 +1871,7 @@ AT_CHECK([ovs-appctl revalidator/purge]) + AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log]) + + dnl Add a controller meter. +-AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=controller pktps stats bands=type=drop rate=2']) ++AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=controller pktps burst stats bands=type=drop rate=1 burst_size=1']) + + dnl Advance time by 1 second. + AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore]) @@ -5171,6 +5171,36 @@ AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2 OVS_VSWITCHD_STOP AT_CLEANUP diff --git a/SPECS/openvswitch2.13.spec b/SPECS/openvswitch2.13.spec index 7fed82c..4b90ce5 100644 --- a/SPECS/openvswitch2.13.spec +++ b/SPECS/openvswitch2.13.spec @@ -59,7 +59,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.13.0 -Release: 98%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} +Release: 99%{?commit0:.%{date}git%{shortcommit0}}%{?commit1:dpdk%{shortcommit1}}%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -710,6 +710,10 @@ exit 0 %endif %changelog +* Tue Mar 30 2021 Open vSwitch CI - 2.13.0-99 +- Merging upstream branch-2.13 + [8e7dc3319c3b29a77620f75b1d42ff42fd174ecf] + * Mon Mar 22 2021 Kevin Traynor - 2.13.0-98 - dpif-netdev: Allow PMD auto load balance with cross-numa. (#1938162) [edeaca020b9d40fed8a0a474f35eeec5ed4e338f]