From nobody Wed Nov 19 08:19:47 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1615314457; cv=none; d=zohomail.com; s=zohoarc; b=nwC7s4UvYfMIhqMYbE+ZbPhdDsa78z03jQyCWsXpI+JV4tYcigum11FLE1fU+y0USHQsXP7IkpnkWXTg9QijQz0gKwjoCETN7ne+1DNwsgzhWFTNMMs0BfBhEHRKy7Z81SkjRuw5L9nVkhoMyk7lD71wIDQsAUQ88RqQAtNC8Dc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615314457; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=3Cw7CoH51/r0CFse4vhuIOju4779l3jyBvx4wg2pQlc=; b=FpU2l5zyT5+op7YhmJ8ZH1X49wqioo/XUPPdNpOcO5T3HPJj94cMTy4joEAvsZCX/XxGRD1IMuz+1MXeLYCOjps4LKL9nKQmuiB1RPgw3M75IMvdjGNTGIfyitVb4Z02Ui6wUAjEBnjVTJH6JJPIdyNrtK6hNR1HHjQCvqVyPpc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1615314457199736.6002485265689; Tue, 9 Mar 2021 10:27:37 -0800 (PST) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-534-trvjV3t_MZ2auhrTzwxq9A-1; Tue, 09 Mar 2021 13:27:34 -0500 Received: by mail-ej1-f72.google.com with SMTP id v10so6027080ejh.15 for ; Tue, 09 Mar 2021 10:27:34 -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 b19sm9571453edu.51.2021.03.09.10.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 10:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615314456; 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=3Cw7CoH51/r0CFse4vhuIOju4779l3jyBvx4wg2pQlc=; b=hir0FIrdzP3lpMrHyXhvG7yX9iexrnpVfMbTF9ZxbeSGJfBCDSnV0S7iON/GYeuqAoxBVp 5tH7Jcs/k0xnEeNi4sLwGmtcYlSiq6lsvLAXdFj9BUIILWWdxXoqUMO31G+fd57aRGbG6A tpMo8fh0e9ZBnmxs+6S1ZkMsG53MZQE= X-MC-Unique: trvjV3t_MZ2auhrTzwxq9A-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=3Cw7CoH51/r0CFse4vhuIOju4779l3jyBvx4wg2pQlc=; b=j6A4VHc1yBW4V5hGlnwNSl/TwyFQbxQXb9Sx79G1RE/LjXPDodke4A1jw/59u33XAN AVGt8gBkhc5Y85wyRnVz0VPv4TK31HtNkaVFU5O4tBilKzpNw2Rf7vzaE/R2SUS+TXEe 2i6NLwOOWJKunDKMvzTJClGZWy9AdvDElie2qyR//w2qAoBvEgRCZn7nsN4TjOcdmycS wE+2Yzkyp0+YkDPyUY/W7Yt3+edBodPgLXdvgfdtn1U3wlhp8zgAYO0d68PSVYixeNe6 jVWSMd+QgFmaEUbhCENCbDadJywa3Fvg3wa4GIXVlvWhZpEdXHc2ydXMvihDYHBsmRks zemg== X-Gm-Message-State: AOAM530dJZV+rG/Fg415bovgobAqbbtDERLfhrkXqac24WxHcWWdC9YU jMkjacaswZ8YzVC4SxxujGTSJ5vZa9+yxUhEQIUNvuJQhGJWWXa06QgSTtZIvaA7uEVi2Fa8tLc HgvxBSd/+EdAYOA== X-Received: by 2002:a50:fe08:: with SMTP id f8mr5646695edt.217.1615314453558; Tue, 09 Mar 2021 10:27:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXOcB/iW1PfnTntYx57G0zbFJG1OuN8NJOGsr9wLYuIB3ixSzYgJP8QYeCuM5F2SBbvSIWyA== X-Received: by 2002:a50:fe08:: with SMTP id f8mr5646680edt.217.1615314453455; Tue, 09 Mar 2021 10:27:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Dmitry Fleytman , Miroslav Rezanina , Li Qiang , Paolo Bonzini , Jason Wang , Thomas Huth , Alexander Bulekov , Stefano Garzarella , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 3/6] net/eth: Initialize input_size variable earlier Date: Tue, 9 Mar 2021 19:27:06 +0100 Message-Id: <20210309182709.810955-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210309182709.810955-1-philmd@redhat.com> References: <20210309182709.810955-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) Initialize the 'input_size' variable earlier to make the next commit easier to review. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefano Garzarella --- net/eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/eth.c b/net/eth.c index 6a5a1d04e0b..77af2b673bb 100644 --- a/net/eth.c +++ b/net/eth.c @@ -405,11 +405,10 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int= pkt_frags, struct ip6_ext_hdr *ext_hdr, struct in6_address *dst_addr) { + size_t input_size =3D iov_size(pkt, pkt_frags); struct ip6_ext_hdr_routing *rthdr =3D (struct ip6_ext_hdr_routing *) e= xt_hdr; =20 if ((rthdr->rtype =3D=3D 2) && (rthdr->segleft =3D=3D 1)) { - - size_t input_size =3D iov_size(pkt, pkt_frags); size_t bytes_read; =20 if (input_size < ext_hdr_offset + sizeof(*ext_hdr)) { --=20 2.26.2