From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C14BCCDB464 for ; Wed, 11 Oct 2023 16:30:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqc5Z-0000Ct-S5; Wed, 11 Oct 2023 12:29:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqc5X-0000Ar-Qu for qemu-devel@nongnu.org; Wed, 11 Oct 2023 12:29:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqc5W-0004PE-7V for qemu-devel@nongnu.org; Wed, 11 Oct 2023 12:29:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697041773; 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:autocrypt:autocrypt; bh=w8UOxOzJqxeRs/wqX+fSL2R7V73hI2L433aBKsmaym4=; b=Zyo3WJE3+Sf3F8z/m0tCsYBhn/vVrpjIEYDL7vrwSrA2FHKSA8agNHGH5ryYQ3T5aq5LKS 7rCBOqQb2mjBUVX9uv79aSAE2Fqd0S0QmSb+crLajbI1Boa6tla+75O94UKcS1RUWT22AX R0FAjjSVrantEVtZ9DoFtMF2JbickDY= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-513-_Ot4X965MYmX2thvIKngVw-1; Wed, 11 Oct 2023 12:29:27 -0400 X-MC-Unique: _Ot4X965MYmX2thvIKngVw-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7757523b84aso3336285a.0 for ; Wed, 11 Oct 2023 09:29:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697041766; x=1697646566; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w8UOxOzJqxeRs/wqX+fSL2R7V73hI2L433aBKsmaym4=; b=g7IcQVNDXW74YoJ1zVsNFAp7d/WS3rlga0oYZRUR3GEe0HcULpoMzZy6r4WSI/9q0K 7hJvu9qyscP104KFQl3z4UIYPC/VdGOFMzDZbxnMTWjyOTGnnyHKq8EmFyIOug0puXi0 lHvvcx+AzLIrkWl4tFMO6bF2eFqvNYwVectfFPhAd4B7AS3deOrC5mXKhE9WHIgehFLJ 4U10alln2N5Hi+t15fCgIw8yrZJ//69MBuoUyOtmsn0zlfw9H+XHWJGojOvmNDiL2S5r /EUBq9gQScua1WEFWyU2EVz0VZHfZw23Rgz0zuj12NXQLv4Ne94UR//eVJ5JCl66sPe9 1quQ== X-Gm-Message-State: AOJu0Yyctgzln2GnobMCwj4YaJKVcC0ScoBiCChnaZ1+LC9BwRxdPmJn jTN3KqC9xn7TcAI+o4utRE3bPIqpAnNJKdjXfbuq/VawbFaSxIijkpKEruejfpBTpzTYKiFxT6/ kD8f+J3HScjKTIWE= X-Received: by 2002:a05:620a:444d:b0:76c:ad46:2683 with SMTP id w13-20020a05620a444d00b0076cad462683mr26619366qkp.16.1697041766366; Wed, 11 Oct 2023 09:29:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF1fT3RX1rFjxuZjyegZFJ5mPP2CofmvyDmGkO0qOJ03l9JScB3bv4UamIDBkPmGGnDr8k6/w== X-Received: by 2002:a05:620a:444d:b0:76c:ad46:2683 with SMTP id w13-20020a05620a444d00b0076cad462683mr26619344qkp.16.1697041766097; Wed, 11 Oct 2023 09:29:26 -0700 (PDT) Received: from [192.168.0.5] (ip-109-43-176-176.web.vodafone.de. [109.43.176.176]) by smtp.gmail.com with ESMTPSA id w19-20020a05620a149300b0076eee688a95sm5339732qkj.0.2023.10.11.09.29.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Oct 2023 09:29:25 -0700 (PDT) Message-ID: <3f804d1f-cb72-452c-83b2-80f57331d170@redhat.com> Date: Wed, 11 Oct 2023 18:29:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PULL 02/13] hw/rdma/vmw/pvrdma_cmd: Use correct struct in query_port() Content-Language: en-US To: Stefan Hajnoczi , Michael Tokarev Cc: qemu-devel@nongnu.org, Peter Maydell , qemu-trivial@nongnu.org, qemu-stable@nongnu.org, =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= References: <20231011112054.1031975-1-mjt@tls.msk.ru> <20231011112054.1031975-3-mjt@tls.msk.ru> From: Thomas Huth Autocrypt: addr=thuth@redhat.com; keydata= xsFNBFH7eUwBEACzyOXKU+5Pcs6wNpKzrlJwzRl3VGZt95VCdb+FgoU9g11m7FWcOafrVRwU yYkTm9+7zBUc0sW5AuPGR/dp3pSLX/yFWsA/UB4nJsHqgDvDU7BImSeiTrnpMOTXb7Arw2a2 4CflIyFqjCpfDM4MuTmzTjXq4Uov1giGE9X6viNo1pxyEpd7PanlKNnf4PqEQp06X4IgUacW tSGj6Gcns1bCuHV8OPWLkf4hkRnu8hdL6i60Yxz4E6TqlrpxsfYwLXgEeswPHOA6Mn4Cso9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U0+0QIdYJp/XFsgWxnFIMYwDpxSHS 5fdDxUjsk3UBHZx+IhFjs2siVZi5wnHIqM7eK9abr2cK2weInTBwXwqVWjsXZ4tq5+jQrwDK cvxIcwXdUTLGxc4/Z/VRH1PZSvfQxdxMGmNTGaXVNfdFZjm4fz0mz+OUi6AHC4CZpwnsliGV ODqwX8Y1zic9viSTbKS01ZNp175POyWViUk9qisPZB7ypfSIVSEULrL347qY/hm9ahhqmn17 Ng255syASv3ehvX7iwWDfzXbA0/TVaqwa1YIkec+/8miicV0zMP9siRcYQkyTqSzaTFBBmqD oiT+z+/E59qj/EKfyce3sbC9XLjXv3mHMrq1tKX4G7IJGnS989E/fg6crv6NHae9Ckm7+lSs IQu4bBP2GxiRQ+NV3iV/KU3ebMRzqIC//DCOxzQNFNJAKldPe/bKZMCxEqtVoRkuJtNdp/5a yXFZ6TfE1hGKrDBYAm4vrnZ4CXFSBDllL59cFFOJCkn4Xboj/aVxxJxF30bn In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 11/10/2023 17.38, Stefan Hajnoczi wrote: > On Wed, 11 Oct 2023 at 07:23, Michael Tokarev wrote: >> >> From: Peter Maydell >> >> In query_port() we pass the address of a local pvrdma_port_attr >> struct to the rdma_query_backend_port() function. Unfortunately, >> rdma_backend_query_port() wants a pointer to a struct ibv_port_attr, >> and the two are not the same length. >> >> Coverity spotted this (CID 1507146): pvrdma_port_attr is 48 bytes >> long, and ibv_port_attr is 52 bytes, because it has a few extra >> fields at the end. >> >> Fortunately, all we do with the attrs struct after the call is to >> read a few specific fields out of it which are all at the same >> offsets in both structs, so we can simply make the local variable the >> correct type. This also lets us drop the cast (which should have >> been a bit of a warning flag that we were doing something wrong >> here). >> >> Cc: qemu-stable@nongnu.org >> Signed-off-by: Peter Maydell >> Reviewed-by: Philippe Mathieu-Daudé >> Reviewed-by: Thomas Huth >> Signed-off-by: Michael Tokarev >> --- >> hw/rdma/vmw/pvrdma_cmd.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) > > The following CI failure has occurred: > > ../hw/rdma/vmw/pvrdma_cmd.c:144:59: error: implicit conversion from > enumeration type 'enum ibv_port_state' to different enumeration type > 'enum pvrdma_port_state' [-Werror,-Wenum-conversion] > resp->attrs.state = dev->func0->device_active ? attrs.state : > ~ ~~~~~~^~~~~ > ../hw/rdma/vmw/pvrdma_cmd.c:146:33: error: implicit conversion from > enumeration type 'enum ibv_mtu' to different enumeration type 'enum > pvrdma_mtu' [-Werror,-Wenum-conversion] > resp->attrs.max_mtu = attrs.max_mtu; > ~ ~~~~~~^~~~~~~ > ../hw/rdma/vmw/pvrdma_cmd.c:147:36: error: implicit conversion from > enumeration type 'enum ibv_mtu' to different enumeration type 'enum > pvrdma_mtu' [-Werror,-Wenum-conversion] > resp->attrs.active_mtu = attrs.active_mtu; > ~ ~~~~~~^~~~~~~~~~ > > https://gitlab.com/qemu-project/qemu/-/jobs/5270666420 > > Please take a look. That pvrdma patch unfortunately does not work with Clang, see also: https://lore.kernel.org/qemu-devel/781330fc-85b3-4ef1-8f07-1cc5fc5e4ad2@redhat.com/T/#t Thomas