From patchwork Mon Jan 22 14:14:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammad Heib X-Patchwork-Id: 1889183 X-Patchwork-Delegate: dceara@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ILfeqCjN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TJXL22kKXz1yS7 for ; Tue, 23 Jan 2024 01:15:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 139DA81D46; Mon, 22 Jan 2024 14:15:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 139DA81D46 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ILfeqCjN X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cR6cLkEV1A5Q; Mon, 22 Jan 2024 14:15:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 51C6681B9A; Mon, 22 Jan 2024 14:15:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 51C6681B9A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 14FC1C0077; Mon, 22 Jan 2024 14:15:00 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7EF63C0037 for ; Mon, 22 Jan 2024 14:14:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6669540AFA for ; Mon, 22 Jan 2024 14:14:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6669540AFA Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ILfeqCjN X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YAvlPwYNn2bg for ; Mon, 22 Jan 2024 14:14:58 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9F2F040297 for ; Mon, 22 Jan 2024 14:14:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9F2F040297 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705932897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAa2G6NTr7X6ke+9Pdj719pZhwm37wUY0UUnMTWVA6E=; b=ILfeqCjNWANlBsWAyJQfZsCXFapF1j0/V/GVfdCVWUketE8MFInpJv3E+Q0mCShdzSOaoB SvXE2/fX/ArZO8dGMdJYJSQVzIgfL6pKFAPcW0YKnG099chisSFAQ9FNtTyQVnF/b0Dt46 Yip68NJUSclmTBnpSNfiwaPlB3Lh1ss= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-577-EEBJnQj5ObaBuPsLZtrerA-1; Mon, 22 Jan 2024 09:14:55 -0500 X-MC-Unique: EEBJnQj5ObaBuPsLZtrerA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A2F1E1C05EA7 for ; Mon, 22 Jan 2024 14:14:55 +0000 (UTC) Received: from mheiblap.localdomain.com (unknown [10.47.238.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id D802BC2E0E9; Mon, 22 Jan 2024 14:14:54 +0000 (UTC) From: Mohammad Heib To: dev@openvswitch.org Date: Mon, 22 Jan 2024 16:14:42 +0200 Message-Id: <20240122141443.2074919-1-mheib@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 1/2] ovs: Bump submodule to include igmp protocol version. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Specifically the following commit: 077d0bad0436 ("mcast-snooping: Store IGMP/MLD protocol version.") Also fix a small compilation error due to prototype change. Signed-off-by: Mohammad Heib --- controller/pinctrl.c | 6 +++++- ovs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/controller/pinctrl.c b/controller/pinctrl.c index 4992eab08..77bf67e58 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -5474,9 +5474,13 @@ pinctrl_ip_mcast_handle_igmp(struct rconn *swconn, switch (ntohs(ip_flow->tp_src)) { case IGMP_HOST_MEMBERSHIP_REPORT: case IGMPV2_HOST_MEMBERSHIP_REPORT: + mcast_group_proto grp_proto = + (ntohs(ip_flow->tp_src) == IGMP_HOST_MEMBERSHIP_REPORT) + ? MCAST_GROUP_IGMPV1 + : MCAST_GROUP_IGMPV2; group_change = mcast_snooping_add_group4(ip_ms->ms, ip4, IP_MCAST_VLAN, - port_key_data); + port_key_data, grp_proto); break; case IGMP_HOST_LEAVE_MESSAGE: group_change = diff --git a/ovs b/ovs index 4102674b3..b222593bc 160000 --- a/ovs +++ b/ovs @@ -1 +1 @@ -Subproject commit 4102674b3ecadb0e20e512cc661cddbbc4b3d1f6 +Subproject commit b222593bc69b5d82849d18eb435564f5f93449d3 From patchwork Mon Jan 22 14:14:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammad Heib X-Patchwork-Id: 1889184 X-Patchwork-Delegate: dceara@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KltgmjyR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TJXLD24LTz1yPg for ; Tue, 23 Jan 2024 01:15:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1095860F99; Mon, 22 Jan 2024 14:15:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1095860F99 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KltgmjyR X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wylskLvkIIqw; Mon, 22 Jan 2024 14:15:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 13455608A6; Mon, 22 Jan 2024 14:15:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 13455608A6 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DD71DC007C; Mon, 22 Jan 2024 14:15:11 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4816DC0037 for ; Mon, 22 Jan 2024 14:15:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2C0F241758 for ; Mon, 22 Jan 2024 14:15:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2C0F241758 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=KltgmjyR X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1YmUKVDmuATx for ; Mon, 22 Jan 2024 14:15:07 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id A08F14175A for ; Mon, 22 Jan 2024 14:15:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A08F14175A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705932906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a2eMizSotziGwImqKs+mLE9UhslBME5Ed5mYLpcOqfg=; b=KltgmjyRetaM+n0vB3TATNwacQRFvmj2FwYXgMZCVAK++k5WxmCPuzgq03CgjBRW34FsXx UM8PFvBMNcp1fQ/dXFYIR8eGmLOY4GyIwJf2/a3FI7r3Up8RdYyrNeR4MirdIb6hstFJxz AMgSeUrlNh7PyJC0tb735D2nDEuc4+o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-cZsr87nEP3iZQ66KzXG2Lw-1; Mon, 22 Jan 2024 09:15:04 -0500 X-MC-Unique: cZsr87nEP3iZQ66KzXG2Lw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5B9A085A599 for ; Mon, 22 Jan 2024 14:15:04 +0000 (UTC) Received: from mheiblap.localdomain.com (unknown [10.47.238.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id 691A8C2E0E9; Mon, 22 Jan 2024 14:15:03 +0000 (UTC) From: Mohammad Heib To: dev@openvswitch.org Date: Mon, 22 Jan 2024 16:14:43 +0200 Message-Id: <20240122141443.2074919-2-mheib@redhat.com> In-Reply-To: <20240122141443.2074919-1-mheib@redhat.com> References: <20240122141443.2074919-1-mheib@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 2/2] OVN-SB: Exposes igmp group protocol version through IGMP table. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Expose the igmp/mld group protocol version through the IGMP_GROUP table in SBDB. This patch can be used by ovn consumer for debuggability purposes, user now can match between the protocol version used in the OVN logical switches and the uplink ports. Rreported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2160476 Signed-off-by: Mohammad Heib --- NEWS | 2 ++ controller/ip-mcast.c | 8 ++++++++ controller/ip-mcast.h | 3 +++ controller/pinctrl.c | 19 ++++++++++++++++++- northd/ovn-northd.c | 2 +- ovn-sb.ovsschema | 5 +++-- ovn-sb.xml | 4 ++++ tests/ovn.at | 3 +++ 8 files changed, 42 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 5f267b4c6..9075e7d80 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ Post v23.09.0 - ovn-northd-ddlog has been removed. - A new LSP option "enable_router_port_acl" has been added to enable conntrack for the router port whose peer is l3dgw_port if set it true. + - IGMP_Group have a new "protocol" column that displays the the group + protocol version. OVN v23.09.0 - 15 Sep 2023 -------------------------- diff --git a/controller/ip-mcast.c b/controller/ip-mcast.c index a870fb29e..83e41c81f 100644 --- a/controller/ip-mcast.c +++ b/controller/ip-mcast.c @@ -226,6 +226,14 @@ igmp_group_cleanup(struct ovsdb_idl_txn *ovnsb_idl_txn, return true; } + +void igmp_group_set_protocol(const struct sbrec_igmp_group *group, + mcast_group_proto protocol) +{ + sbrec_igmp_group_set_protocol(group, + mcast_snooping_group_protocol_str(protocol)); +} + static const struct sbrec_igmp_group * igmp_group_lookup_(struct ovsdb_idl_index *igmp_groups, const char *addr_str, diff --git a/controller/ip-mcast.h b/controller/ip-mcast.h index 326f39db1..f0c34343f 100644 --- a/controller/ip-mcast.h +++ b/controller/ip-mcast.h @@ -63,4 +63,7 @@ void igmp_group_delete(const struct sbrec_igmp_group *g); bool igmp_group_cleanup(struct ovsdb_idl_txn *ovnsb_idl_txn, struct ovsdb_idl_index *igmp_groups); +void igmp_group_set_protocol(const struct sbrec_igmp_group *group, + mcast_group_proto protocol); + #endif /* controller/ip-mcast.h */ diff --git a/controller/pinctrl.c b/controller/pinctrl.c index 77bf67e58..6379b7afb 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -180,6 +180,7 @@ struct pinctrl { bool mac_binding_can_timestamp; bool fdb_can_timestamp; bool dns_supports_ovn_owned; + bool igmp_support_protocol; }; static struct pinctrl pinctrl; @@ -3586,11 +3587,21 @@ pinctrl_update(const struct ovsdb_idl *idl, const char *br_int_name) if (dns_supports_ovn_owned != pinctrl.dns_supports_ovn_owned) { pinctrl.dns_supports_ovn_owned = dns_supports_ovn_owned; - /* Notify pinctrl_handler that fdb timestamp column + /* Notify pinctrl_handler that dns ovn_owned column * availability has changed. */ notify_pinctrl_handler(); } + bool igmp_support_proto = + sbrec_server_has_igmp_group_table_col_protocol(idl); + if (igmp_support_proto != pinctrl.igmp_support_protocol) { + pinctrl.igmp_support_protocol = igmp_support_proto; + + /* Notify pinctrl_handler that igmp protocol column + * availability has changed. */ + notify_pinctrl_handler(); + } + ovs_mutex_unlock(&pinctrl_mutex); } @@ -5400,6 +5411,12 @@ ip_mcast_sync(struct ovsdb_idl_txn *ovnsb_idl_txn, local_dp->datapath, chassis); } + /* Set Group protocol*/ + if (pinctrl.igmp_support_protocol) { + igmp_group_set_protocol(sbrec_igmp, + mc_group->protocol_version); + } + igmp_group_update_ports(sbrec_igmp, sbrec_datapath_binding_by_key, sbrec_port_binding_by_key, ip_ms->ms, mc_group); diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c index f3868068d..700c9cf6e 100644 --- a/northd/ovn-northd.c +++ b/northd/ovn-northd.c @@ -120,7 +120,7 @@ static const char *rbac_svc_monitor_auth_update[] = static const char *rbac_igmp_group_auth[] = {""}; static const char *rbac_igmp_group_update[] = - {"address", "chassis", "datapath", "ports"}; + {"address", "protocol", "chassis", "datapath", "ports"}; static const char *rbac_bfd_auth[] = {""}; static const char *rbac_bfd_update[] = diff --git a/ovn-sb.ovsschema b/ovn-sb.ovsschema index 72e230b75..240d65f69 100644 --- a/ovn-sb.ovsschema +++ b/ovn-sb.ovsschema @@ -1,7 +1,7 @@ { "name": "OVN_Southbound", - "version": "20.30.0", - "cksum": "2972392849 31172", + "version": "20.31.0", + "cksum": "2643271413 31220", "tables": { "SB_Global": { "columns": { @@ -480,6 +480,7 @@ "IGMP_Group": { "columns": { "address": {"type": "string"}, + "protocol": {"type": "string"}, "datapath": {"type": {"key": {"type": "uuid", "refTable": "Datapath_Binding", "refType": "weak"}, diff --git a/ovn-sb.xml b/ovn-sb.xml index e393f92b3..56e26b674 100644 --- a/ovn-sb.xml +++ b/ovn-sb.xml @@ -4756,6 +4756,10 @@ tcp.flags = RST; Destination IPv4 address for the IGMP group. + + Group protocol version either IGMPv1,v2,v3 or MLDv1,v2. + + Datapath to which this IGMP group belongs. diff --git a/tests/ovn.at b/tests/ovn.at index 8cc4c311c..180b9bfdd 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -22549,6 +22549,7 @@ send_igmp_v3_report hv2-vif1 hv2 000000000002 $(ip_to_hex 10 0 0 2) f9f9 \ # Check that the IGMP Group is learned on both hv. wait_row_count IGMP_Group 2 address=239.0.1.68 +wait_row_count IGMP_Group 2 protocol=IGMPv3 check ovn-nbctl --wait=hv sync AT_CAPTURE_FILE([sbflows3]) @@ -22626,6 +22627,7 @@ send_igmp_v3_report hv1-vif1 hv1 \ # Check that the IGMP Group is learned. wait_row_count IGMP_Group 1 address=224.0.0.42 +wait_row_count IGMP_Group 1 protocol=IGMPv3 AS_BOX([IGMP traffic test 3]) # Send traffic and make sure it gets flooded to all ports. @@ -23287,6 +23289,7 @@ send_mld_v2_report hv2-vif1 hv2 \ # Check that the IP multicast group is learned on both hv. wait_row_count IGMP_Group 2 address='"ff0a:dead:beef::1"' +wait_row_count IGMP_Group 2 protocol=MLDv2 # This gives the ovn-controller nodes a chance to see the new IGMP_Group. check ovn-nbctl --wait=hv sync