From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=N1mB/84J; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 201A15A0008 for ; Wed, 26 Mar 2025 23:26:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743027999; 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=ejEeKbq9y/z0FKxbWWd6OO/WKdkr9F+KPeKzTf1zOsY=; b=N1mB/84JPs0j0JcTO4HCJ9xneXl/UNbI7R1HUqYEBgijuVWLvm/1cmSiJ8oRFnf0kvlxUC eNUdE+DEL//c2xaPbjky7ixK0BdGrHh/y37KP8rFViVor3PDP8Jbblr+S1eFSxttFpQrae sIeNMnGnsQ+VRbaZYWZV4MisBYqqnCw= Received: from mail-il1-f200.google.com (mail-il1-f200.google.com [209.85.166.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-189-0Kxp_XqrNn2mJacInbFX0Q-1; Wed, 26 Mar 2025 18:24:17 -0400 X-MC-Unique: 0Kxp_XqrNn2mJacInbFX0Q-1 X-Mimecast-MFC-AGG-ID: 0Kxp_XqrNn2mJacInbFX0Q_1743027856 Received: by mail-il1-f200.google.com with SMTP id e9e14a558f8ab-3d43d3338d7so5686475ab.0 for ; Wed, 26 Mar 2025 15:24:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743027856; x=1743632656; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ejEeKbq9y/z0FKxbWWd6OO/WKdkr9F+KPeKzTf1zOsY=; b=HeH5PCX6ciYX3DOPf7n6TAhhcJS4djfVjwlGleySnD0lMm42z6XVBhVo1ZiOwvi5yJ Ut4dcReCmzx5wZPS5HCBSX/oZJ+n6knQM9hno5jcv6ZVBEpn/QHNE5AdzSUnzpTlUVNw UN/jxDJcfTiBoBJqR/xhGI77USiHI5/d1I1AX3Nj2InuoxUMhJKVwMoW0ewdjxN4xg1u VchpluXWCHqqPdML0DOI1BQOCmx+ms7mtfbXAiwScsXqxLf3isCK4005NaouKnF3X2V2 tqufE3IC1RDeLtDieMosVDur0fZ574Dbwl0k+Bq2aMqpJ9nDj5KZQBgzQL+pF9ufH+Rw ZqEQ== X-Forwarded-Encrypted: i=1; AJvYcCX9oomil7sfMOnQhq/Z2IJ+w1AfhT/82oC0P2sMzSk8fnCABFwAlLf3VWEH74Jz53wgn++PHLvPhVU=@passt.top X-Gm-Message-State: AOJu0YyXW8tSaClyhoQCb1IKE/X/8Wo5Gh3RSFFkbJ+tysyww1IaBTva KBOJpHtdaUGM8CFfvZgyrflwBHlJfGWNH0TKkI6yGajyKfIRxaQTmP5K8uhgClRp6IiRvKPdvua eWdm7TQQgdM0YjGrpsQYWp0WRa8a0FFpANeh53zaSNpic7Fnd0kgvFfp8wSPG X-Gm-Gg: ASbGnctmd7LB0pftmyftwyfB1T4aoR6/E/0A6eETSiRZe+5BzHi0WGAavt6zYvf6zRX uo7O/lTIgidXMSqjslJ0iSQX+m5QhJRUjGgoiIIimySvfWNCpcBOvxamr/f7Vpiw/Pb824PhI/+ vIQmV3z1ZuYQf8u2NwgzL3FGyiMr7a2zNWkuUitPLVv9lQr2tCuWTn4vSiWPKTjyTzL7ffouKLS 2K4yvQoIi1FnpJZ8FTLytBM8g3CR4+BkhK7pvBGq4IAMZC4gYJHy39TJ3C3appqlU5cEqx4GO4b wegCd6BsW5aRFitnnnkdg0siztfJSoy+oTC0xko4Fi9C2oLnS0ZFRwwGuGXhy5I= X-Received: by 2002:a05:6e02:1948:b0:3d4:35d3:87d3 with SMTP id e9e14a558f8ab-3d5ccdc5bf5mr18576605ab.4.1743027856291; Wed, 26 Mar 2025 15:24:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGltgDvv/njKWFw7Wo7nYWQNp71njF7EotBh//QHuZ8ttLwg0Z5Rd/EN/SSYxE4r7n/oTh7XA== X-Received: by 2002:a05:6e02:1948:b0:3d4:35d3:87d3 with SMTP id e9e14a558f8ab-3d5ccdc5bf5mr18576455ab.4.1743027855874; Wed, 26 Mar 2025 15:24:15 -0700 (PDT) Received: from ?IPV6:2001:4958:231f:7c01:99a2:ef22:1861:9725? ([2001:4958:231f:7c01:99a2:ef22:1861:9725]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3d59606e99csm29632645ab.1.2025.03.26.15.24.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Mar 2025 15:24:15 -0700 (PDT) Message-ID: Date: Wed, 26 Mar 2025 18:24:14 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] udp: Improve name of UDP related ICMP sending functions To: David Gibson , Stefano Brivio , passt-dev@passt.top References: <20250326001501.1866234-1-david@gibson.dropbear.id.au> <20250326001501.1866234-3-david@gibson.dropbear.id.au> From: Jon Maloy In-Reply-To: <20250326001501.1866234-3-david@gibson.dropbear.id.au> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: j2fjtp1RBAB30MAX9eQXSqPSvnN9NRlIEHYAyweNlCk_1743027856 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: AMQINWL2KQXUULLHH3LP4PLIKGHG6WU6 X-Message-ID-Hash: AMQINWL2KQXUULLHH3LP4PLIKGHG6WU6 X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 2025-03-25 20:15, David Gibson wrote: > udp_send_conn_fail_icmp[46]() aren't actually specific to connections > failing: they can propagate a variety of ICMP errors, which might or might > not break a "connection". They are, however, specific to sending ICMP > errors to the tap connection, not splice or host. Rename them to better > reflect that. > > Signed-off-by: David Gibson > --- > udp.c | 33 ++++++++++++++++----------------- > 1 file changed, 16 insertions(+), 17 deletions(-) > > diff --git a/udp.c b/udp.c > index a706fed9..88128181 100644 > --- a/udp.c > +++ b/udp.c > @@ -411,7 +411,7 @@ static void udp_tap_prepare(const struct mmsghdr *mmh, > } > > /** > - * udp_send_conn_fail_icmp4() - Construct and send ICMPv4 to local peer > + * udp_send_tap_icmp4() - Construct and send ICMPv4 to local peer > * @c: Execution context > * @ee: Extended error descriptor > * @toside: Destination side of flow > @@ -419,11 +419,11 @@ static void udp_tap_prepare(const struct mmsghdr *mmh, > * @in: First bytes (max 8) of original UDP message body > * @dlen: Length of the read part of original UDP message body > */ > -static void udp_send_conn_fail_icmp4(const struct ctx *c, > - const struct sock_extended_err *ee, > - const struct flowside *toside, > - struct in_addr saddr, > - const void *in, size_t dlen) > +static void udp_send_tap_icmp4(const struct ctx *c, > + const struct sock_extended_err *ee, > + const struct flowside *toside, > + struct in_addr saddr, > + const void *in, size_t dlen) > { > struct in_addr oaddr = toside->oaddr.v4mapped.a4; > struct in_addr eaddr = toside->eaddr.v4mapped.a4; > @@ -455,7 +455,7 @@ static void udp_send_conn_fail_icmp4(const struct ctx *c, > > > /** > - * udp_send_conn_fail_icmp6() - Construct and send ICMPv6 to local peer > + * udp_send_tap_icmp6() - Construct and send ICMPv6 to local peer > * @c: Execution context > * @ee: Extended error descriptor > * @toside: Destination side of flow > @@ -464,11 +464,11 @@ static void udp_send_conn_fail_icmp4(const struct ctx *c, > * @dlen: Length of the read part of original UDP message body > * @flow: IPv6 flow identifier > */ > -static void udp_send_conn_fail_icmp6(const struct ctx *c, > - const struct sock_extended_err *ee, > - const struct flowside *toside, > - const struct in6_addr *saddr, > - void *in, size_t dlen, uint32_t flow) > +static void udp_send_tap_icmp6(const struct ctx *c, > + const struct sock_extended_err *ee, > + const struct flowside *toside, > + const struct in6_addr *saddr, > + void *in, size_t dlen, uint32_t flow) > { > const struct in6_addr *oaddr = &toside->oaddr.a6; > const struct in6_addr *eaddr = &toside->eaddr.a6; > @@ -564,12 +564,11 @@ static int udp_sock_recverr(const struct ctx *c, union epoll_ref ref) > * to socket? */ > } else if (hdr->cmsg_level == IPPROTO_IP) { > dlen = MIN(dlen, ICMP4_MAX_DLEN); > - udp_send_conn_fail_icmp4(c, ee, toside, saddr.sa4.sin_addr, > - data, dlen); > + udp_send_tap_icmp4(c, ee, toside, saddr.sa4.sin_addr, > + data, dlen); > } else if (hdr->cmsg_level == IPPROTO_IPV6) { > - udp_send_conn_fail_icmp6(c, ee, toside, > - &saddr.sa6.sin6_addr, > - data, dlen, sidx.flowi); > + udp_send_tap_icmp6(c, ee, toside, &saddr.sa6.sin6_addr, > + data, dlen, sidx.flowi); > } > } else { > trace("Ignoring received IP_RECVERR cmsg on listener socket"); Acked-by: Jon Maloy