From patchwork Wed Jul 28 17:58:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1510941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: 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=TEpEQUsy; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GZhHS1ZF7z9sT6 for ; Thu, 29 Jul 2021 03:59:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E13584066A; Wed, 28 Jul 2021 17:58:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xdrzMYhjVuSF; Wed, 28 Jul 2021 17:58:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 8981A404A5; Wed, 28 Jul 2021 17:58:54 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 597E3C001A; Wed, 28 Jul 2021 17:58:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 23DADC0024 for ; Wed, 28 Jul 2021 17:58:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2557383A4C for ; Wed, 28 Jul 2021 17:58:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com 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 HiIKBEm6vE9u for ; Wed, 28 Jul 2021 17:58:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id D220483926 for ; Wed, 28 Jul 2021 17:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627495129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B+s8sdweXHlmv0ZyimJ2bSt3nGHcDkP/TWjhFRWh7Ag=; b=TEpEQUsyJcmlNDBW4UDDTvuZSHv5/tLb51ZdQ7nRAbm/Lc7gcPYGd/JREiA2FQwg9QB+qH 8sR0JpejekGvFZfnqaqBzjoZ7uucgqnQRYzg7FzuiRXALBrgkM3GQX93iEvwaLlS4meOQg pJ2i1iHIfMv/VnKG9THLMQeTtfzpUAA= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-366-4Fah-_uAOcOqA8da3Z6tKw-1; Wed, 28 Jul 2021 13:58:44 -0400 X-MC-Unique: 4Fah-_uAOcOqA8da3Z6tKw-1 Received: by mail-ed1-f70.google.com with SMTP id d6-20020a50f6860000b02903bc068b7717so1635122edn.11 for ; Wed, 28 Jul 2021 10:58:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B+s8sdweXHlmv0ZyimJ2bSt3nGHcDkP/TWjhFRWh7Ag=; b=Nqutq8MFCCXY5fQellKs1dUpjCNnt98iIpxK0LwW49oqAOBMYhr6rVDxJ1iFjTuoWt eKvUbCX52MO5OsZIlLmG/hHtE+tinxxQ4eWnOBHRQuBylvyQYYPv9CH44QnZ7bWeNizA jvrRQG3uwDbMt3BVl6wHvmkCdlAcUR2mx1e74VJYoBU5DuU0ed4eNyZln1uTMljl2/rq MigfvWdO3Ta/COcscXjB6ZH0Vm5IpUzjncJ8WNQMc9csVt8S6ANiW6cBvt4BKDclKeV1 EZM9H033ggpYgUcs5uMqxXudzOVczXKBrNEFQk14/ud2kLtinRyYDUjnpywTBiNjLHdr l1Hg== X-Gm-Message-State: AOAM531MAEY3RzxwDb+kTuTO7DTDavo9YpnwBv+UEBADPI6yaFf98BgI ldfTVT34hlpHX6kLfy22bxfAFnD5QzUNAps1LQdstoh/cH4AOn1UZsq0zTsJLxMM5ZZa7NY+U8Q JzWbZqzoFimla/jKP26KW9oZpD5sYfyhXumo2BO59daEe3OTN5Tgo5V77nf4VmTP61FQs41WPpJ 8= X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr1274004edy.112.1627495121355; Wed, 28 Jul 2021 10:58:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4gHGSAZmBJ47kcwcirKdyyuoUO3zwnKgvP0z0hB7kiMHgi3xB/bEEQNlrrpKMhR4eq8es0g== X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr1273996edy.112.1627495121176; Wed, 28 Jul 2021 10:58:41 -0700 (PDT) Received: from lore-desk.redhat.com (net-130-25-106-225.cust.vodafonedsl.it. [130.25.106.225]) by smtp.gmail.com with ESMTPSA id b25sm211938edv.9.2021.07.28.10.58.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 10:58:40 -0700 (PDT) From: Lorenzo Bianconi To: dev@openvswitch.org Date: Wed, 28 Jul 2021 19:58:25 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lorenzo.bianconi@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 1/2] controller: add ipv6_pd debug messages 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" Introduce some log messages in IPv6 Prefix delegation processing useful for debugging Signed-off-by: Lorenzo Bianconi --- controller/pinctrl.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/controller/pinctrl.c b/controller/pinctrl.c index a1fba3bdb..2ac227704 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -770,6 +770,13 @@ pinctrl_parse_dhcpv6_advt(struct rconn *swconn, const struct flow *ip_flow, pfd->state = PREFIX_REQUEST; + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(20, 40); + char ip6_s[INET6_ADDRSTRLEN + 1]; + if (ipv6_string_mapped(ip6_s, &ip_flow->ipv6_src)) { + VLOG_INFO_RL(&rl, "Received DHCPv6 advt from %s with aid %d" + " sending DHCPv6 request", ip6_s, aid); + } + uint64_t packet_stub[256 / 8]; struct dp_packet packet; @@ -938,6 +945,14 @@ pinctrl_parse_dhcpv6_reply(struct dp_packet *pkt_in, in_dhcpv6_data += opt_len; } if (status) { + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(20, 40); + char prefix[INET6_ADDRSTRLEN + 1]; + char ip6_s[INET6_ADDRSTRLEN + 1]; + if (ipv6_string_mapped(ip6_s, &ip_flow->ipv6_src) && + ipv6_string_mapped(prefix, &ipv6)) { + VLOG_INFO_RL(&rl, "Received DHCPv6 reply from %s with prefix %s/%d" + " aid %d", ip6_s, prefix, prefix_len, aid); + } pinctrl_prefixd_state_handler(ip_flow, ipv6, aid, eth->eth_src, in_ip->ip6_src, prefix_len, t1, t2, plife_time, vlife_time, uuid, uuid_len); @@ -1227,19 +1242,27 @@ fill_ipv6_prefix_state(struct ovsdb_idl_txn *ovnsb_idl_txn, pfd->prefix = in6addr_any; } } else if (pfd->state == PREFIX_PENDING && ovnsb_idl_txn) { + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(20, 40); char prefix_str[INET6_ADDRSTRLEN + 1] = {}; struct smap options; + if (!ipv6_string_mapped(prefix_str, &pfd->prefix)) { + goto out; + } + VLOG_INFO_RL(&rl, "updating port_binding for %s with prefix %s/%d" + " aid %d", pb->logical_port, prefix_str, pfd->plen, + pfd->aid); + pfd->state = PREFIX_DONE; pfd->last_complete = time_msec(); pfd->next_announce = pfd->last_complete + pfd->t1; - ipv6_string_mapped(prefix_str, &pfd->prefix); smap_clone(&options, &pb->options); smap_add_format(&options, "ipv6_ra_pd_list", "%d:%s/%d", pfd->aid, prefix_str, pfd->plen); sbrec_port_binding_set_options(pb, &options); smap_destroy(&options); } +out: pfd->last_used = time_msec(); destroy_lport_addresses(&c_addrs); } From patchwork Wed Jul 28 17:58:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1510940 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: 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=ADXDcKUO; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GZhHN0G3Kz9sT6 for ; Thu, 29 Jul 2021 03:58:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3966E4062A; Wed, 28 Jul 2021 17:58:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X3gz0ja7KWtj; Wed, 28 Jul 2021 17:58:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 84AB340627; Wed, 28 Jul 2021 17:58:51 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 59368C001A; Wed, 28 Jul 2021 17:58:51 +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 5B099C000E for ; Wed, 28 Jul 2021 17:58:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3BFD740502 for ; Wed, 28 Jul 2021 17:58:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com 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 77fx_Buiebre for ; Wed, 28 Jul 2021 17:58:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id CC02F404E9 for ; Wed, 28 Jul 2021 17:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627495126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qK6eg2vW3YhqmJSTVb5f+rmP0WPsig9yMf+bLi7PIwI=; b=ADXDcKUOKaU4c4mogdvw1xrZCiEdmsD8GrLFp+uveKlhJynVXZDXJPZi8FO5gS/nI0GTJE EU/CJERmYDr0sid+aQjhfD5Z9pfj48oEO2L4F3edwMSmVh7xG9PaGcoc1dFbpCSBkDyk0K LYiT2qQ2E9WdUVznJWD8EKFibOh5wCA= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-474-6mZQQUvMM02Kicl4GpNRKg-1; Wed, 28 Jul 2021 13:58:45 -0400 X-MC-Unique: 6mZQQUvMM02Kicl4GpNRKg-1 Received: by mail-ed1-f72.google.com with SMTP id b13-20020a056402278db029039c013d5b80so1642666ede.7 for ; Wed, 28 Jul 2021 10:58:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qK6eg2vW3YhqmJSTVb5f+rmP0WPsig9yMf+bLi7PIwI=; b=GldlYelVZKRomEpmZDHGHgaKoClUWUf2ukJrJTMw8buBFVqLkSNgjHTHDO8i01QgYm 5KvnwX9geGrUx1vLKOE5dD8rDPwRw2etjzyUu/0bCNatxdrobmDLBJDfAj8kP9r8Vxtj qGPKlKxc81Dyh6nSnbITKJRIAT7crpkrsN3L983uytWN2FDI+H4v/qD7EWPygWLUYjYM ZCmSD/1PPpQYBFnBG9+46ohugB3E4kIGpLBstWtjocsjWB2C2U4e3DHwRCzT+9gk7fhf CmR9HDAGQs4hgDaFhSCUkBetrP4gFmrU6cL6LbZIVaK1KgWtkKUqBv4FaWfbo/j/f2Oq K8dg== X-Gm-Message-State: AOAM533aJBs7KFKkufRmqQK+Ury9D/EwNF5MyfIgd624M1EMCVarHEDi LbIbGHkJBlLn11Kk9vCfyFcazr9QyT+WO2EYO2BAPlsH6Q+6KCdkOMOr61upAmnIsrRyo8QvYRo QCYKxImkPBjDf1w35RaVtSLuRLkHdgGTGXhQkO8u2ZQMcuJ34dQMDdzjMMFc94lmFygaQzyxyK3 Y= X-Received: by 2002:a05:6402:2788:: with SMTP id b8mr1265127ede.244.1627495123709; Wed, 28 Jul 2021 10:58:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyevBhNaSM9l+PPG2DZtqWbJcFZzbCpphTGUHhP9afyDfAm10q/Ds12mWUWfL95tzGMVlvu1A== X-Received: by 2002:a05:6402:2788:: with SMTP id b8mr1265112ede.244.1627495123518; Wed, 28 Jul 2021 10:58:43 -0700 (PDT) Received: from lore-desk.redhat.com (net-130-25-106-225.cust.vodafonedsl.it. [130.25.106.225]) by smtp.gmail.com with ESMTPSA id b25sm211938edv.9.2021.07.28.10.58.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 10:58:43 -0700 (PDT) From: Lorenzo Bianconi To: dev@openvswitch.org Date: Wed, 28 Jul 2021 19:58:26 +0200 Message-Id: <92a57390b721a8322913f03184ee5f3d690c2ddf.1627494892.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lorenzo.bianconi@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 2/2] controller: ipv6_pd: properly update ipv6_ra_pd_list pb option in sb db 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" Clear ipv6_ra_pd_list option in port_binding option column in order to properly update IPv6 prefix info. https://bugzilla.redhat.com/show_bug.cgi?id=1983862 Fixes: e3a398e914 ("controller: Add ipv6 prefix delegation state machine") Signed-off-by: Lorenzo Bianconi --- controller/pinctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/controller/pinctrl.c b/controller/pinctrl.c index 2ac227704..ea542a59a 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -1257,6 +1257,7 @@ fill_ipv6_prefix_state(struct ovsdb_idl_txn *ovnsb_idl_txn, pfd->last_complete = time_msec(); pfd->next_announce = pfd->last_complete + pfd->t1; smap_clone(&options, &pb->options); + smap_remove(&options, "ipv6_ra_pd_list"); smap_add_format(&options, "ipv6_ra_pd_list", "%d:%s/%d", pfd->aid, prefix_str, pfd->plen); sbrec_port_binding_set_options(pb, &options);