Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2934546rwd; Mon, 22 May 2023 06:31:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4YMHzm4AVTj08mhU4I7oyeKfkxD2l5NSkQ7oBXBttk76yX6SAI0qnM9+3gTOtgpXQ+J5BM X-Received: by 2002:a17:902:ea04:b0:1ad:e2b6:d2a0 with SMTP id s4-20020a170902ea0400b001ade2b6d2a0mr15912539plg.11.1684762310165; Mon, 22 May 2023 06:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684762310; cv=none; d=google.com; s=arc-20160816; b=WZd6Sem5/P3pMRwARHh2r55Q8Fh5SKWaVkVQTJqZFSiQ3k63R0s5SkwNbaB3zYT0ip fon6K9fqsPs93e6tLkD2n5Z99UgRQ1qBFVhizCMdhGjIMyE1grfuy9rGaMq3Lqgy99bA nS0UTR/mqTTqlV9v9G+KRUHWn7+iswl4EC1KjszOpDHIpHuJIVa57+wJimjVDYG4IVUq Ha+BOL+AzwSvhPmJeryS3+JYyI5aPFkZZhzQxMHQtjJ/odxXWBOwMwuI1ZcrpixsR2p5 ZT9S4jVf5eti7/gvidpO3kPWeUdKVR/t+F8AGpTMxg+77UR0y9Z6WsK0P6UXZxS3cfPM FWMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tu8OvW/hOdbLzHtNqpM5/g+Q4tXiEO+oUgB0ugzeF90=; b=b2WlFTMWwHDAZ+ynOYvEdXTaqR2eLhnp9DgbLrA6yQ8Gu0Ffm5SDxu8+hK3AiDv3AO y2R2X8rTLEwVrqCoUi5zdczHBiMf9S4hMTCWekrhb19DMLXK3dAqQeqzkYB4CpOV+4HF LNwBZQ1WqtgRi3MSIFp7ewKaG9ptXqoUfhJplr1oCaP9b713ere8dCvgMbm1uIlRs9Cr 7qGg5ZeIkHvbVPyp+fwBwwdxcxxql9EI/89Es5uR3xn+MonxrNGwxwmWZ8xVfiyIoykf zxx2WJ/s4ulfftqy7rAkrymq+2ewze0gZ8sVsCgmQRIonGThcDFG4lGTruJSbyUVIaDe q8DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Kccp1ubW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x13-20020a170902ec8d00b001ab1d1a6803si3347250plg.420.2023.05.22.06.31.37; Mon, 22 May 2023 06:31:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Kccp1ubW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233645AbjEVNTv (ORCPT + 99 others); Mon, 22 May 2023 09:19:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232900AbjEVNTu (ORCPT ); Mon, 22 May 2023 09:19:50 -0400 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4886C6; Mon, 22 May 2023 06:19:48 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 1E6555FD53; Mon, 22 May 2023 16:19:47 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1684761587; bh=tu8OvW/hOdbLzHtNqpM5/g+Q4tXiEO+oUgB0ugzeF90=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; b=Kccp1ubWuvXAt6dCkxHCle71V8nDO5PQvKzVtzv2YVentBS5XkE0YEcT7E5qSZi/U v/WM6BiAmanabfGusRfiZrognc21NnELM+agu3LaDqdzm9aOtnWpRQOr++SRVMKf6E zArW0uIvknSwZmZnDx7U4rJpsaS40EC65NMr3rZ+Xf4WYN7bDDVm550AE0ffsyj5pU JTFUAmktEB8TD1YEFRlY6q2+cExVCp4a8F6GctLRMdRl9fv80XRxvgx9W82Vr734xl +9JMBGzTsXRZEuvmz9Y8FFw4dFencnlFh2ypUUkk7KP39rEBmG0tRxqXldo7UCYYD0 9suqELoCDZIMw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Mon, 22 May 2023 16:19:46 +0300 (MSK) Message-ID: Date: Mon, 22 May 2023 16:15:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [RFC PATCH v3 04/17] vsock/virtio: non-linear skb handling for tap Content-Language: en-US To: Simon Horman CC: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Bobby Eshleman , , , , , , References: <20230522073950.3574171-1-AVKrasnov@sberdevices.ru> <20230522073950.3574171-5-AVKrasnov@sberdevices.ru> From: Arseniy Krasnov In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH01.sberdevices.ru (172.16.1.4) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/05/22 08:14:00 #21365129 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.05.2023 16:13, Simon Horman wrote: > On Mon, May 22, 2023 at 10:39:37AM +0300, Arseniy Krasnov wrote: >> For tap device new skb is created and data from the current skb is >> copied to it. This adds copying data from non-linear skb to new >> the skb. >> >> Signed-off-by: Arseniy Krasnov >> --- >> net/vmw_vsock/virtio_transport_common.c | 31 ++++++++++++++++++++++--- >> 1 file changed, 28 insertions(+), 3 deletions(-) >> >> diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c >> index 16effa8d55d2..9854f48a0544 100644 >> --- a/net/vmw_vsock/virtio_transport_common.c >> +++ b/net/vmw_vsock/virtio_transport_common.c >> @@ -106,6 +106,27 @@ virtio_transport_alloc_skb(struct virtio_vsock_pkt_info *info, >> return NULL; >> } >> >> +static void virtio_transport_copy_nonlinear_skb(struct sk_buff *skb, >> + void *dst, >> + size_t len) >> +{ >> + struct iov_iter iov_iter = { 0 }; >> + struct iovec iovec; >> + size_t to_copy; >> + >> + iovec.iov_base = dst; > > Hi Arseniy, > > Sparse seems unhappy about this. > Though, TBH, I'm unsure what should be done about it. > > .../virtio_transport_common.c:117:24: warning: incorrect type in assignment (different address spaces) > .../virtio_transport_common.c:117:24: expected void [noderef] __user *iov_base > .../virtio_transport_common.c:117:24: got void *dst > Got it, i'll check how to resolve this problem! Thanks! > > ...