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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90C96C61DA4 for ; Thu, 9 Mar 2023 10:17:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231279AbjCIKRS (ORCPT ); Thu, 9 Mar 2023 05:17:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231381AbjCIKQ5 (ORCPT ); Thu, 9 Mar 2023 05:16:57 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBA61EB89D; Thu, 9 Mar 2023 02:15:59 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id A911F5FD38; Thu, 9 Mar 2023 13:15:49 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1678356949; bh=pEUT86ikon0sBC2KSBuNIGLhBhGsTeozoRveheVlr4Y=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=r7xIN1aIeFVncexr7O9vq3lT3Yp6jfhNFezQpoVfUsCnEEW67fBB6RthuzpWTAB/8 cA5KG/Ig38O6ypd7baQxpmnwu0Q0/wm4RnvzJJFS/Ile2fRBstzc/NUflyp9p1oYmC rFOoRU3rcCBb9KiuZ71MNbADrDlphpnT3lM8lq9HQJzahar7g3zdN8DH4SBrao2JRL eJtqrmYaL8trWLPcp3GQpcNBaOW6VYqb1InqGy7rLDJvmbPgIgbBi3NW002vLrscxF sn8SLtIymetqF8/rwOVIa2Fk4j6Ktpc1QIXsjH4WZ5n5K0PcU8+RReSjfqdGVn4BcE 6U/McRUC5a5gg== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Thu, 9 Mar 2023 13:15:49 +0300 (MSK) Message-ID: Date: Thu, 9 Mar 2023 13:12:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US In-Reply-To: <0abeec42-a11d-3a51-453b-6acf76604f2e@sberdevices.ru> To: Stefan Hajnoczi , Stefano Garzarella , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bobby Eshleman CC: , , , , , , From: Arseniy Krasnov Subject: [RFC PATCH v3 2/4] virtio/vsock: remove redundant 'skb_pull()' call 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/03/09 05:43:00 #20927523 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no sense to update skbuff state, because it is used only once after dequeue to copy data and then will be released. Signed-off-by: Arseniy Krasnov --- net/vmw_vsock/virtio_transport_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 618680fd9906..9a411475e201 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -465,7 +465,6 @@ static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk, dequeued_len = err; } else { user_buf_len -= bytes_to_copy; - skb_pull(skb, bytes_to_copy); } spin_lock_bh(&vvs->rx_lock); -- 2.25.1