From nobody Wed Nov 19 10:07:53 2025 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=1615392119; cv=none; d=zohomail.com; s=zohoarc; b=h/hp13tKQi55mvTTtgHfCAS9IJhhM5FCHcFWzYscvVNJVoL/COJ7oDaOtFFIb/9KggikZNRQS9eMeODSLTB0RvrEfQNcjeI/dukOLvUmGfW7TYMfyQtqBW+PNnrJ8KZId/UwBV5mkt/SpI/uyp7Db19DmxGllN1dcqTfRxwpang= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615392119; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=o4IDrBOrBdc79jZ9ab97ouOR74cgvk509Hp9kOypaec=; b=FhijAE98zXXzOCQZHbuDXBF153c9zdD3MygyLhXzhtdqyhB2s6qZ4KAeowzTHqqatuK7hnqTnf9xFuUu7tXQklBmBzMtlHAwyx5AL5dRO1ZJ1sxLXaWjGzxn47FQpbLSIyXmRNGLPcxi2wY7StVaKsxpIvMBOFRjpn02Wd8dV4s= 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 1615392119424264.5230098295767; Wed, 10 Mar 2021 08:01:59 -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-173-tTeOiLeWOuemmhD25XwaGw-1; Wed, 10 Mar 2021 11:01:56 -0500 Received: by mail-ej1-f72.google.com with SMTP id di5so7423636ejc.1 for ; Wed, 10 Mar 2021 08:01:55 -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 ho11sm9907130ejc.112.2021.03.10.08.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 08:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615392117; 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=o4IDrBOrBdc79jZ9ab97ouOR74cgvk509Hp9kOypaec=; b=R41fxkyimM+t6Bq+fkdTMXk9phS58vuHDJh0CYPAQAhN/SaRVLUqiHcqlrUGjHMtsWKyS9 tCLcr/jNwr5qRZ4Hmw5EWM7TdxXK9nNCFvkkz9+990LYCDx8Cq5oyAkZ3rB7NUl74jJjiq 9MAGHvkd1CfSDCJwnWjW/b9WuY6YdQE= X-MC-Unique: tTeOiLeWOuemmhD25XwaGw-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=o4IDrBOrBdc79jZ9ab97ouOR74cgvk509Hp9kOypaec=; b=KSjrDmi/tqQZJmFFzJ5varHc2CeaIZeCIuLKNlFw3yPE49MQC7bhsWm4MjZrxLLNi0 nj6hg9UIs2YTIUsV8ukAWxkZRre0AqRqggoyVXMtVe3xPOJxpIX17eBYadNIe7mE4+Mj +6HrmOxjzUek5kDIhwQeRWqPJOgOpDrv7EPuT5I6GshqUlR7nX0aTI2vHdMkIYwnaHY4 HIJtciEreELGg7waN+8hFnuGdr2r2EiIdjmS+oorvcYSt9a9nCH1NJqsxkI1/iGaCJSm VA35/frMPO62wdU2NM7iRbQx92ffwlTWOLuIYE/YexrpJX7LPZF/+9n9lceEGRORu6h2 3M5Q== X-Gm-Message-State: AOAM5335GXDjIZBW27RBTSCL2l6v7MIeaSKArW84Ct/dZ7g8HJ8TX/Gw T9LfqyzCNc0WsPeRfIcQtcLWBcrP3//mCDNnhYwU2QpbLuCVOtn+YWsczyuzLx1d+gTWYMX0J6t ePBt4p/hb9fYCYw== X-Received: by 2002:a17:906:9243:: with SMTP id c3mr4582481ejx.388.1615392113973; Wed, 10 Mar 2021 08:01:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwshEyQD5OOAxhL+9S0JWpdZzEgb6dt3if4I7T53s82MWq/jTX5P6wVuUr755mnoZ1LPnzDMg== X-Received: by 2002:a17:906:9243:: with SMTP id c3mr4582008ejx.388.1615392108920; Wed, 10 Mar 2021 08:01:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Stefano Garzarella , Dmitry Fleytman , Paolo Bonzini , Miroslav Rezanina , Jason Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v5 2/7] net/eth: Better describe _eth_get_rss_ex_dst_addr's offset argument Date: Wed, 10 Mar 2021 17:01:30 +0100 Message-Id: <20210310160135.1148272-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210310160135.1148272-1-philmd@redhat.com> References: <20210310160135.1148272-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 7d4dd48c1ff..6a5a1d04e0b 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(*ext_hdr), + ext_hdr_offset + sizeof(*ext_hdr), dst_addr, sizeof(*dst_addr)); =20 return bytes_read =3D=3D sizeof(*dst_addr); --=20 2.26.2