diff --git a/SOURCES/openvswitch-2.15.0.patch b/SOURCES/openvswitch-2.15.0.patch index 9e44166..2e4abf9 100644 --- a/SOURCES/openvswitch-2.15.0.patch +++ b/SOURCES/openvswitch-2.15.0.patch @@ -21855,7 +21855,7 @@ index 9d8096668e..5806ea4b55 100644 return; } diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c -index 6be23dbeed..045dbf7a58 100644 +index 6be23dbeed..1a75969e42 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -625,6 +625,7 @@ netdev_linux_notify_sock(void) @@ -21874,7 +21874,7 @@ index 6be23dbeed..045dbf7a58 100644 ovsthread_once_done(&once); } -@@ -672,7 +672,9 @@ netdev_linux_update_lag(struct rtnetlink_change *change) +@@ -672,13 +672,18 @@ netdev_linux_update_lag(struct rtnetlink_change *change) uint32_t block_id; int error = 0; @@ -21885,7 +21885,17 @@ index 6be23dbeed..045dbf7a58 100644 master_netdev = netdev_from_name(master_name); if (!master_netdev) { return; -@@ -1255,21 +1257,21 @@ netdev_linux_batch_rxq_recv_sock(struct netdev_rxq_linux *rx, int mtu, + } + +- if (is_netdev_linux_class(master_netdev->netdev_class)) { ++ /* If LAG master is not attached to ovs, ingress block on LAG ++ * members shoud not be updated. */ ++ if (!master_netdev->auto_classified && ++ is_netdev_linux_class(master_netdev->netdev_class)) { + block_id = netdev_get_block_id(master_netdev); + if (!block_id) { + netdev_close(master_netdev); +@@ -1255,21 +1260,21 @@ netdev_linux_batch_rxq_recv_sock(struct netdev_rxq_linux *rx, int mtu, * aux_buf is allocated so that it can be prepended to TSO buffer. */ std_len = virtio_net_hdr_size + VLAN_ETH_HEADER_LEN + mtu; for (i = 0; i < NETDEV_MAX_BURST; i++) { @@ -21921,7 +21931,7 @@ index 6be23dbeed..045dbf7a58 100644 } do { -@@ -1288,14 +1290,28 @@ netdev_linux_batch_rxq_recv_sock(struct netdev_rxq_linux *rx, int mtu, +@@ -1288,14 +1293,28 @@ netdev_linux_batch_rxq_recv_sock(struct netdev_rxq_linux *rx, int mtu, for (i = 0; i < retval; i++) { struct dp_packet *pkt; @@ -21953,7 +21963,7 @@ index 6be23dbeed..045dbf7a58 100644 continue; } -@@ -2572,7 +2588,7 @@ exit: +@@ -2572,7 +2591,7 @@ exit: static struct tc_police tc_matchall_fill_police(uint32_t kbits_rate, uint32_t kbits_burst) { @@ -21962,7 +21972,7 @@ index 6be23dbeed..045dbf7a58 100644 unsigned int bps = ((uint64_t) kbits_rate * 1000) / 8; struct tc_police police; struct tc_ratespec rate; -@@ -6220,7 +6236,14 @@ get_stats_via_netlink(const struct netdev *netdev_, struct netdev_stats *stats) +@@ -6220,7 +6239,14 @@ get_stats_via_netlink(const struct netdev *netdev_, struct netdev_stats *stats) if (ofpbuf_try_pull(reply, NLMSG_HDRLEN + sizeof(struct ifinfomsg))) { const struct nlattr *a = nl_attr_find(reply, 0, IFLA_STATS64); if (a && nl_attr_get_size(a) >= sizeof(struct rtnl_link_stats64)) { @@ -22422,6 +22432,59 @@ index 72b7915052..b304ad0f9d 100644 ovsthread_once_done(&once); } +diff --git a/lib/netdev.c b/lib/netdev.c +index 91e91955c0..e6a0eef347 100644 +--- a/lib/netdev.c ++++ b/lib/netdev.c +@@ -387,25 +387,30 @@ netdev_open(const char *name, const char *type, struct netdev **netdevp) + ovs_mutex_lock(&netdev_mutex); + netdev = shash_find_data(&netdev_shash, name); + +- if (netdev && +- type && type[0] && strcmp(type, netdev->netdev_class->type)) { +- +- if (netdev->auto_classified) { +- /* If this device was first created without a classification type, +- * for example due to routing or tunneling code, and they keep a +- * reference, a "classified" call to open will fail. In this case +- * we remove the classless device, and re-add it below. We remove +- * the netdev from the shash, and change the sequence, so owners of +- * the old classless device can release/cleanup. */ +- if (netdev->node) { +- shash_delete(&netdev_shash, netdev->node); +- netdev->node = NULL; +- netdev_change_seq_changed(netdev); +- } ++ if (netdev && type && type[0]) { ++ if (strcmp(type, netdev->netdev_class->type)) { ++ ++ if (netdev->auto_classified) { ++ /* If this device was first created without a classification ++ * type, for example due to routing or tunneling code, and they ++ * keep a reference, a "classified" call to open will fail. ++ * In this case we remove the classless device, and re-add it ++ * below. We remove the netdev from the shash, and change the ++ * sequence, so owners of the old classless device can ++ * release/cleanup. */ ++ if (netdev->node) { ++ shash_delete(&netdev_shash, netdev->node); ++ netdev->node = NULL; ++ netdev_change_seq_changed(netdev); ++ } + +- netdev = NULL; +- } else { +- error = EEXIST; ++ netdev = NULL; ++ } else { ++ error = EEXIST; ++ } ++ } else if (netdev->auto_classified) { ++ /* If netdev reopened with type "system", clear auto_classified. */ ++ netdev->auto_classified = false; + } + } + diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 47077e9478..5cb96fa6ec 100644 --- a/lib/netlink-socket.c diff --git a/SPECS/openvswitch2.15.spec b/SPECS/openvswitch2.15.spec index 223ea47..e883014 100644 --- a/SPECS/openvswitch2.15.spec +++ b/SPECS/openvswitch2.15.spec @@ -57,7 +57,7 @@ Summary: Open vSwitch Group: System Environment/Daemons daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.15.0 -Release: 111%{?dist} +Release: 112%{?dist} # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL @@ -702,6 +702,13 @@ exit 0 %endif %changelog +* Tue Jul 26 2022 Open vSwitch CI - 2.15.0-112 +- Merging upstream branch-2.15 [RH git: 14ed491a9f] + Commit list: + ac90500da4 netdev-linux: Do not touch LAG members if master is not attached to OVS. + dbfe371cdc netdev: Clear auto_classified if netdev reopened with the type specified. + + * Mon Jul 25 2022 Open vSwitch CI - 2.15.0-111 - Merging upstream branch-2.15 [RH git: bc54a123ad] Commit list: