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 9C0C5C61DA4 for ; Thu, 9 Mar 2023 20:30:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230511AbjCIUaP (ORCPT ); Thu, 9 Mar 2023 15:30:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbjCIUaJ (ORCPT ); Thu, 9 Mar 2023 15:30:09 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 768A2F8665; Thu, 9 Mar 2023 12:30:05 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id C86765FD3A; Thu, 9 Mar 2023 23:30:03 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1678393803; bh=7S+FEVatmyxfzv6iVztbucqvJz0EITDWICpCYpuxfvk=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type; b=IsAp98zzR9YAzaB3tCd01ZJDaQF5BjfswpzyfTLDIJfApCQK2ojIMCcG9iZYWV8+h EsKsek2lywxioA6h5gidQqnfSyGNusHmr2nMt1zSUixdgkF4k1zrz/hzbcbZSdsmbu 1n091N7EkktU8FVZU7kcFzYPe3HVOILTbO8DKHbF5sZu+MKwAaMWfVjExKsKcCX53r 2Yvaf93Kqo8aYFPsqYRsb+9SnstdPf/cGlMZB/0jElgRhNrnuK1GRVjMz32LncoZL9 e/n0S/x6BpzgVhrmfS0moQIYmB8A3lbXzsqvWemzgS3OGgiDuyq/YDUHyMLcwp2tGD 2xmDzSXt62zVA== 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 23:30:03 +0300 (MSK) Message-ID: <6260a6cc-bd69-72a6-8aa5-34ff68764287@sberdevices.ru> Date: Thu, 9 Mar 2023 23:27:02 +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: <1804d100-1652-d463-8627-da93cb61144e@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 v4 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 18:14:00 #20929517 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since we now no longer use 'skb->len' to update credit, there is no sense to update skbuff state, because it is used only once after dequeue to copy data and then will be released. Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff") 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