From nobody Mon Feb 9 18:44:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615401105; cv=none; d=zohomail.com; s=zohoarc; b=DOEmt4v2CVaXmGmD8CasX+O0f84LsZk36DSPpli2cSDvm5rwxiSDy+g/4nLg8GKc4RiW0KIpv4NVSjZ0jMdKCiAvZmWr05W9FsiknHxOymH4eHQz1ZW8OAKjj0bmqHyigXC6WETrkhXrUxSpIJvVc5fXRA6/cv3tTdfFWLbIX28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615401105; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=q5DY/aN4CG9GqGVr+tCHRu+SWwcj5rYLvRE4za5fNpY=; b=Zjjxcd2nLm7MyhtoR3w+4O42SKaGpKimCPkkgl5bRH8xzRByESXTJzJrwjtRAIQ87TsUXTD7+GEJ2EtopxrgHoowQ2eqeouQ+wetDEF43scM50IXjpZ3lT+f091GgTIa3DYqXHQibp2M6No3ZEzshHjrlTeVBBZ3Ncp3diX8MAA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615401105283533.8356636417308; Wed, 10 Mar 2021 10:31:45 -0800 (PST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-553-qa5_eb1PPfSBVDEP05q7rQ-1; Wed, 10 Mar 2021 13:31:42 -0500 Received: by mail-ed1-f71.google.com with SMTP id a26so1759642edt.23 for ; Wed, 10 Mar 2021 10:31:42 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id z9sm41099edr.75.2021.03.10.10.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 10:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615401104; 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=q5DY/aN4CG9GqGVr+tCHRu+SWwcj5rYLvRE4za5fNpY=; b=S4pF+w2YKJCPSYtsqrG8EYNby3dYj0jjC2HFANRsnvttItRcLQjIFdHCI1et6SMQ2S+JyX mDS1wYoSAu3VokRmXTivxkHN+tDPw3mSOFDMK+ICYtUlTpElZ5WXk7FOK6BiUiZ9Htefyj YB07ajkdRSJxwfvPXudHhO/+BGGGH0Q= X-MC-Unique: qa5_eb1PPfSBVDEP05q7rQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q5DY/aN4CG9GqGVr+tCHRu+SWwcj5rYLvRE4za5fNpY=; b=Y6vv5v/U/FPaegpbp9YNjhPFvm365hgDgYJ5CHOt0EEtjuffV3EeHOFlhDdQBfV/b0 YxuHRY8oVmZit7plSJlFKKQVR0FVoCTq2nBKDp7da32GAEN13nruMFqDpf4nl+SK/ZE8 F4K4KYeA0fejq5em5jZKAj/X/e4OCwz4EPGkFLxCC40z0pORoDpNj50pyLc2foJRZfLK PhFQrzKyf4Ykb5wo7GE2z3XBkSXhc+w2KKl3EY+6JR4hOYlykvsSNmXF72eSj+lGRtoP 5ScUkhfcNvZ1Rk3tGlpT2lt0Xu+o22puTjxJO+PFlTuMHCHDLXQAj2AdOS9QXICZDSxz ymLQ== X-Gm-Message-State: AOAM530SRAYBrcHUDxZ2TzNRNUG8/xnF0WYQ2vkSTog5vk/7ktV6lie0 olzSaMpKfm03G8vDra6psKBeAct3h32WWUk77+EslYBe9EEvF/YvBD0hnv6E0eCOXYcKVREgIRS emkY0rb1PinxrUA== X-Received: by 2002:a17:907:9709:: with SMTP id jg9mr4969903ejc.276.1615401101540; Wed, 10 Mar 2021 10:31:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWTQg6EygPmC2GgxVCIA7ul6jWqPeNaDFR+Z37X4bE302PLYRiq0SEAQM4DxlQUSPeQ/yRpA== X-Received: by 2002:a17:907:9709:: with SMTP id jg9mr4969891ejc.276.1615401101378; Wed, 10 Mar 2021 10:31:41 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Stefano Garzarella , Thomas Huth , Miroslav Rezanina , Dmitry Fleytman , Paolo Bonzini , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v6 3/7] net/eth: Better describe _eth_get_rss_ex_dst_addr's offset argument Date: Wed, 10 Mar 2021 19:31:19 +0100 Message-Id: <20210310183123.1212612-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210310183123.1212612-1-philmd@redhat.com> References: <20210310183123.1212612-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The 'offset' argument represents the offset to the ip6_ext_hdr header, rename it as 'ext_hdr_offset'. Reviewed-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- net/eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/eth.c b/net/eth.c index b9ceb30a194..ed047b5760b 100644 --- a/net/eth.c +++ b/net/eth.c @@ -401,7 +401,7 @@ eth_is_ip6_extension_header_type(uint8_t hdr_type) =20 static bool _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags, - size_t rthdr_offset, + size_t ext_hdr_offset, struct ip6_ext_hdr *ext_hdr, struct in6_address *dst_addr) { @@ -412,12 +412,12 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int= pkt_frags, size_t input_size =3D iov_size(pkt, pkt_frags); size_t bytes_read; =20 - if (input_size < rthdr_offset + sizeof(*ext_hdr)) { + if (input_size < ext_hdr_offset + sizeof(*ext_hdr)) { return false; } =20 bytes_read =3D iov_to_buf(pkt, pkt_frags, - rthdr_offset + sizeof(*rthdr), + ext_hdr_offset + sizeof(*rthdr), dst_addr, sizeof(*dst_addr)); =20 return bytes_read =3D=3D sizeof(*dst_addr); --=20 2.26.2