Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754165AbcLZCaT (ORCPT ); Sun, 25 Dec 2016 21:30:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57382 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752237AbcLZCaS (ORCPT ); Sun, 25 Dec 2016 21:30:18 -0500 Subject: Re: [PATCH net 3/9] virtio-net: fix page miscount during XDP linearizing To: John Fastabend , mst@redhat.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1482503852-12438-1-git-send-email-jasowang@redhat.com> <1482503852-12438-4-git-send-email-jasowang@redhat.com> <585D48A7.3040701@gmail.com> Cc: john.r.fastabend@intel.com From: Jason Wang Message-ID: <42cb7705-748a-f385-f5cd-e124e0f6e8e0@redhat.com> Date: Mon, 26 Dec 2016 10:30:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <585D48A7.3040701@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 26 Dec 2016 02:30:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 999 Lines: 24 On 2016年12月23日 23:54, John Fastabend wrote: > On 16-12-23 06:37 AM, Jason Wang wrote: >> We don't put page during linearizing, the would cause leaking when >> xmit through XDP_TX or the packet exceeds PAGE_SIZE. Fix them by >> put page accordingly. Also decrease the number of buffers during >> linearizing to make sure caller can free buffers correctly when packet >> exceeds PAGE_SIZE. With this patch, we won't get OOM after linearize >> huge number of packets. >> >> Cc: John Fastabend >> Signed-off-by: Jason Wang >> --- > Thanks! looks good. By the way do you happen to have any actual > configuration where this path is hit? I obviously didn't test this > very long other than a quick test with my hacked vhost driver. > > Acked-by: John Fastabend Yes, I have. Just increase the MTU above 1500 for both virtio and tap and produce some traffic with size which will lead underestimated of rxbuf. Thanks