From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [net RFC] net/mlx4_en: Use frag stride in crossing page boundary condition Date: Thu, 14 Jun 2018 16:49:36 -0700 Message-ID: <1ddecaaa-9613-03ba-d761-a4d3410c4f7d@gmail.com> References: <20180614005309.17357-1-saeedm@mellanox.com> <82f89ebc-713c-1b97-0d0a-e455094e2638@gmail.com> <9a8f7e1b2b51320178f671c2ae57d7d54be5af5a.camel@mellanox.com> <1889d389-a741-aa7b-c2b1-14530fb44ba8@gmail.com> <59c3b776cc0c683fff8090195fd71d7f22305744.camel@mellanox.com> <9146b0a3d34388006d456135c9fe4f618260e63b.camel@mellanox.com> <77a87572d82deef1e035ec3b36027e8f6e0c1ea2.camel@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" , "edumazet@google.com" To: Saeed Mahameed , "eric.dumazet@gmail.com" , "kafai@fb.com" , Tariq Toukan Return-path: Received: from mail-pg0-f43.google.com ([74.125.83.43]:36527 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965001AbeFNXtk (ORCPT ); Thu, 14 Jun 2018 19:49:40 -0400 Received: by mail-pg0-f43.google.com with SMTP id m5-v6so3622613pgd.3 for ; Thu, 14 Jun 2018 16:49:39 -0700 (PDT) In-Reply-To: <77a87572d82deef1e035ec3b36027e8f6e0c1ea2.camel@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 06/14/2018 02:04 PM, Saeed Mahameed wrote: > I was looking at the code without my fix :) > > with my fix: > release = frags->page_offset + frag_info->frag_stride > PAGE_SIZE; > > for XDP: frag_info->frag_stride is PAGE_SIZE, so release will always be > true regardless of PAGE_SIZE. > > So i guess i didn't quite understand your PowerPC concern.. can you > elaborate ? > So your maths with PAGE_SIZE=65536 and MTU 9000 frag_stride is about 9344 So if the last chunk of the page has 9100 bytes, we wont be able to use it, while really we should be able to use it.