From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none 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=d2ekS51U; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 9182F5A0639 for ; Fri, 14 Feb 2025 23:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739573185; 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=dh24tNjndY8bdGN7AuEOFZ92cjaiIGdsol+wLxr8Sx0=; b=d2ekS51ULb89ov25IBdEJz9RxsSmqCKdveM8UHYvO2Ze5RxBeRt7ro41emjgwrgWgGbAfd htnR0rYG7Gr1foff6GetTTjgPTIx+87zDKcnB7nRYLsETiLMXuij5heWW2ixQTDdYATI91 mpsG77fxi0a3buFCZ7PloXKpQVuYvHU= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-690-XS-j2AbzNhS-AFGc7wjo8A-1; Fri, 14 Feb 2025 17:46:23 -0500 X-MC-Unique: XS-j2AbzNhS-AFGc7wjo8A-1 X-Mimecast-MFC-AGG-ID: XS-j2AbzNhS-AFGc7wjo8A_1739573183 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6e66081351aso74431286d6.0 for ; Fri, 14 Feb 2025 14:46:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739573183; x=1740177983; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dh24tNjndY8bdGN7AuEOFZ92cjaiIGdsol+wLxr8Sx0=; b=YNt1A52UW6u8860YtdeqJVXUeK2wA+B7InQWUvRoMQptxo+YodkWGW3kp0sYAGrZ81 AoA7kPTjeeYc3PdmjHqG7Lr085rvAW9TjXr0G+Gz1ZPrq2Knte938M5n81nuYtqml3/A ulVBMJPt5kWj3kZHD2HTyfvEsTMfxI0f2dYAOYDzyGVQAIy6VHjKADZGY8tWvyip/Iap 3RnX2RO86KrX6Ggz9IOturEcIB9vVG8t7xN5eIs5On05Eo16VcVBg/S+waBOwhlEvWvg 6Wqd5UGK5uP5p85D5Ohmuh0CexNvRsbYEFk74gUs2Mw3oM4MYuCAkPidaMGxMMztwEAF 2GYA== X-Gm-Message-State: AOJu0YxsNKZ2hOYshlPNMrSRgVgy5r8PTlLPhMiwaHf9YyItQqJSLcXk MGcUhqoVCjUVQfhZ5J/g32HzWKrqrP/csB+xAJXaMtbYNOvEeGdY71r6PQlZIScsq0O1wNkKqt+ hF4PQ6vP1Dv3pk8FdKRUwhInSbLTaDdtMR7D/h3MrWONOm94Aeg== X-Gm-Gg: ASbGncusytS3tZ/hzpIGatxlw+iYX3yueqLQ+OHXzpTxsJQb73zLDLnIrcNTdwPfcic FD0tvoPUtn3j+uGCdKaqCJ2P62gZRcbE3BThpeAEhZ4b181Qy30LCRcky3rY5m2Wk+Lel1WkszI ErFkhE1y897H0wV1+NcES57gNe0TO8d5tuVPoqOwLiMd9+/5eznHZ9v0wlWrQfOrzuubPkbus57 Mo4y0TE3n2RFxERnDmTXK+S1dlcEWz2suq0uuevAi5ssERxlDjasBkQqKqmO37B5vfRirUmFYHr tBs= X-Received: by 2002:a05:6214:627:b0:6e4:2d6d:5394 with SMTP id 6a1803df08f44-6e66ccf197emr15088066d6.28.1739573183354; Fri, 14 Feb 2025 14:46:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsviyE/f88VpbOHBd0GwcyJXhjgEdg0AtDhlcCu1kpezBIBkrfs5RNLPwZlCMLm9XndQGGZg== X-Received: by 2002:a05:6214:627:b0:6e4:2d6d:5394 with SMTP id 6a1803df08f44-6e66ccf197emr15087836d6.28.1739573183120; Fri, 14 Feb 2025 14:46:23 -0800 (PST) Received: from [10.0.0.215] ([24.225.235.209]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e65d71721csm25996206d6.0.2025.02.14.14.46.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Feb 2025 14:46:22 -0800 (PST) Message-ID: Date: Fri, 14 Feb 2025 17:46:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tap: always set the no_frag flag in IPv4 headers. To: Stefano Brivio References: <20250212235023.391449-1-jmaloy@redhat.com> <20250214120058.178c4fba@elisabeth> From: Jon Maloy In-Reply-To: <20250214120058.178c4fba@elisabeth> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: JdtUBClTXn764JEqisLRRMIl8Mts96yO7rJjvMeFLyI_1739573183 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: ZK5DGYMVCXDTE2J5ONUMGCBYRQWN54JA X-Message-ID-Hash: ZK5DGYMVCXDTE2J5ONUMGCBYRQWN54JA 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 CC: passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com 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-02-14 06:00, Stefano Brivio wrote: > On Wed, 12 Feb 2025 18:50:23 -0500 > Jon Maloy wrote: > >> When studying the Linux source code and Wireshark dumps it seems like >> the no_frag flag in the IPv4 header is always set. Following discussions >> in the Internet on this subject indicates that modern routers never >> fragment packets, and that it isn't even supported in many cases. >> >> Adding to this that incoming messages forwarded on the tap interface >> never even pass through a router it seems safe to always set this flag. >> >> This makes the IPv4 headers of forwarded messages identical to those >> sent by the external sockets, something we must consider desirable. >> >> Signed-off-by: Jon Maloy >> --- >> tap.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tap.c b/tap.c >> index d0673e5..44b0fc0 100644 >> --- a/tap.c >> +++ b/tap.c >> @@ -153,7 +153,7 @@ static void *tap_push_ip4h(struct iphdr *ip4h, struct in_addr src, >> ip4h->tos = 0; >> ip4h->tot_len = htons(l3len); >> ip4h->id = 0; >> - ip4h->frag_off = 0; >> + ip4h->frag_off = htons(IP_DF); > > $ tshark -r test/test_logs/pasta.pcap -V -Y frame.number==9 | grep "Header Checksum" > Header Checksum: 0x07d4 incorrect, should be 0xc7d3(may be caused by "IP checksum offload"?) > > See L2_BUF_IP4_PSUM(). > Not sure what to do about this. I don't even see we calculate the checksum in our code, so does it matter? ///jon