From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44490A034C for ; Wed, 23 Feb 2022 14:14:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CCE041226; Wed, 23 Feb 2022 14:14:09 +0100 (CET) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id DA27E411B2 for ; Wed, 23 Feb 2022 14:14:07 +0100 (CET) Received: by mail-pg1-f174.google.com with SMTP id p23so19905024pgj.2 for ; Wed, 23 Feb 2022 05:14:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to:cc; bh=nz9T0ozfrwVVr4V1SUvDc/Lbt9JdGplfxGdOD2h1czg=; b=XHjHkFZ+ECNSe7Y/AZHxouC4hU+XSYUe+QyCd5diHWNZx1rRV/Jhp0fICLO/8M5LKy aLJebyruqpXLof8vlqFsPIuysX9qgeoTRW54A2Mp0K4BaZGAZKeJZk/r7k8dRMOSy+/n R9cApwyPiCR49TJCY98/k4S6YAJfeNv1Z0jbFngbT04EHoLS0qeMwRaDrW1IXDnheebM diW5oWzpx2QIzSFdPvSvBO9pFPXgt9yAVS/f1JFniJXNtbBqK5qYScksT2uJNnR3bvbd Q9BVtE0OMCee8qAzWV2Zydz1XXB1mngP5gkTErAXLcb2w3zQR79JF4u8sm1SUGufxG13 YrvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=nz9T0ozfrwVVr4V1SUvDc/Lbt9JdGplfxGdOD2h1czg=; b=YNY+ZqTPAyQo7VH9nwDUCuX/6oYVz4+W8msShcv7h5F4+zx3F9J0W3XYKAo3b/A5GY KHzDGv6+1McR7rgeKjacc8Noo4UimibgPVglcd8Kz7SdP7oQGoTp+qdnGz9nya8TyNNd SPtQB9j9jnNGpay4grx5oA1uYtZs+YkfDp3qCBsgTy2xv9n4aJIUL9/Xp585q4ip/9qJ BVH5WBr57QSOXJdNXEFvMZZFJrKbHdFj2clY4WjJZoQikwu2dZRvEH4qmg9EPJ7C7PcP OmiUCJeGpxUBhRfdvlGOw9426ecWmzv7NsCVKPOhOIuOfTSufH6KR6f0ikCNcVKt42vZ UYhA== X-Gm-Message-State: AOAM532mqGU8nqNTHRS7xXlP6JnNssY1OdlrP4IMEIRIbHqaIJj5YDCH WYwQg42D7Qoii9Ph+ZX8pf+z3wfWHlqWdVO+AF8FH6vX6ZVAgg== X-Google-Smtp-Source: ABdhPJz3r02wCOFcRR3iWLv1EDOtiqg1Le6Vq4OKWo+x4SQdTUQ56zUfPNQcIP0+5pPBnL9jzPKR6X8m/y07y6viKUU= X-Received: by 2002:a63:531d:0:b0:365:5f0c:7cbb with SMTP id h29-20020a63531d000000b003655f0c7cbbmr23566398pgb.150.1645622047041; Wed, 23 Feb 2022 05:14:07 -0800 (PST) MIME-Version: 1.0 From: Harold Huang Date: Wed, 23 Feb 2022 21:13:56 +0800 Message-ID: Subject: Question about the sndbuf of the tap interface with vhost-net To: users@dpdk.org Cc: jasowang@redhat.com, Maxime Coquelin , Chenbo Xia Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org I see in dpdk virtio-user driver, the TUNSETSNDBUF is initialized with INT_MAX, see: https://github.com/DPDK/dpdk/blob/main/drivers/net/virtio/virtio_user/vhost_kernel_tap.c#L169 It is ok because tap driver uses it to support tx baching, see this patch: https://github.com/torvalds/linux/commit/0a0be13b8fe2cac11da2063fb03f0f39359b3069 But in tun_xdp_one, napi is not supported and I want to user napi in tun_get_user to enable gro. As I result, I change the sndbuf to a value such as 212992 in /proc/sys/net/core/wmem_default. But the performance tested by iperf is greatly degraded, from 4.5 Gbps to 750Gbps per flow. I see the the iperf server consume 100% cpu core, which should be the bottleneck of the this test. The perf top result of iperf server cpu core is as follows: ''' Samples: 72 of event 'cycles', 4000 Hz, Event count (approx.): 22685278 lost: 0/0 drop: 0/0 Overhead Shared O Symbol 59.86% [kernel] [k] report_bug 20.66% [kernel] [k] module_find_bug 6.51% [kernel] [k] common_interrupt 2.82% [kernel] [k] __slab_free 1.48% [kernel] [k] copy_user_enhanced_fast_string 1.44% [kernel] [k] __skb_datagram_iter 1.42% [kernel] [k] notifier_call_chain 1.41% [kernel] [k] irq_work_run_list 1.41% [kernel] [k] update_irq_load_avg 1.41% [kernel] [k] task_tick_fair 1.41% [kernel] [k] cmp_ex_search 0.16% [kernel] [k] __ghes_peek_estatus.isra.12 0.02% [kernel] [k] acpi_os_read_memory 0.00% [kernel] [k] native_apic_mem_write ''' I am not clear about the test result. Can we change the sndbuf size in dpdk? Is any way to enable vhost_net to use napi without changing the tun kernel driver?