From patchwork Wed Jan 17 14:21:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Pattrick X-Patchwork-Id: 1887464 X-Patchwork-Delegate: i.maximets@samsung.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=B0zhwxQC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.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 4TFSk15krSz1yPh for ; Thu, 18 Jan 2024 01:21:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2D21A83DB1; Wed, 17 Jan 2024 14:21:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2D21A83DB1 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=B0zhwxQC 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 fiWhG3ilfyt2; Wed, 17 Jan 2024 14:21:42 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id 50C3C83D3C; Wed, 17 Jan 2024 14:21:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 50C3C83D3C Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 23218C0DD6; Wed, 17 Jan 2024 14:21:39 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 09AA8C0037 for ; Wed, 17 Jan 2024 14:21:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B5CEC41E32 for ; Wed, 17 Jan 2024 14:21:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B5CEC41E32 Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=B0zhwxQC 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 RCQ9bP4JtQa4 for ; Wed, 17 Jan 2024 14:21:36 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id E60DE41F95 for ; Wed, 17 Jan 2024 14:21:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E60DE41F95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705501294; 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=jMJWdnPbUoOtFrVCVv1RFaoTUNV3iVXhODcx5BpDoEg=; b=B0zhwxQCmFOYBvYb/r/zZXMiVnBD8cLqleYnHWPEKrsLi2HVkmxzRx6mOX1zXDDlfJ7L+n hWEj8hu3UQ9e7ok/HT/BLb2aiuz/KxTws1OI0+baBBOCeIVAXdgiguEZ2e3UUWtAXvec7i 9hIii10Aydz5G3GzddIwV0F4jrWXTy8= 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-186-6ginYTl3OWS31ezfEb9L2w-1; Wed, 17 Jan 2024 09:21:31 -0500 X-MC-Unique: 6ginYTl3OWS31ezfEb9L2w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 D31EC811E9E for ; Wed, 17 Jan 2024 14:21:28 +0000 (UTC) Received: from mpattric.remote.csb (unknown [10.22.8.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96F7A1C066AB; Wed, 17 Jan 2024 14:21:28 +0000 (UTC) From: Mike Pattrick To: dev@openvswitch.org Date: Wed, 17 Jan 2024 09:21:23 -0500 Message-Id: <20240117142124.241050-2-mkp@redhat.com> In-Reply-To: <20240117142124.241050-1-mkp@redhat.com> References: <20240117142124.241050-1-mkp@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v6 2/3] userspace: Correct IPv6 header in software-GSO. 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" Correct the length field in IPv6 packets when applying software fallback GSO. Previosuly the field retained an IPv4 header size, which was incorrect. Signed-off-by: Mike Pattrick Fixes: 8b5fe2dc6080 ("userspace: Add Generic Segmentation Offloading.") Acked-by: Simon Horman --- v6: include ip6 extensions --- lib/dp-packet-gso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dp-packet-gso.c b/lib/dp-packet-gso.c index e2c141b32..847685ad9 100644 --- a/lib/dp-packet-gso.c +++ b/lib/dp-packet-gso.c @@ -142,7 +142,7 @@ dp_packet_gso(struct dp_packet *p, struct dp_packet_batch **batches) struct ovs_16aligned_ip6_hdr *ip6_hdr = dp_packet_l3(seg); ip6_hdr->ip6_ctlun.ip6_un1.ip6_un1_plen - = htons(sizeof *ip_hdr + dp_packet_l4_size(seg)); + = htons(dp_packet_l3_size(seg) - sizeof *ip6_hdr); } /* Update L4 header. */