> -----Original Message----- > From: Jacob Keller <jacob.e.keller@xxxxxxxxx> > Sent: Tuesday, April 11, 2023 7:13 PM > To: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>; linux-hyperv@xxxxxxxxxxxxxxx; > netdev@xxxxxxxxxxxxxxx > Cc: Dexuan Cui <decui@xxxxxxxxxxxxx>; KY Srinivasan <kys@xxxxxxxxxxxxx>; > Paul Rosswurm <paulros@xxxxxxxxxxxxx>; olaf@xxxxxxxxx; > vkuznets@xxxxxxxxxx; davem@xxxxxxxxxxxxx; wei.liu@xxxxxxxxxx; > edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; > leon@xxxxxxxxxx; Long Li <longli@xxxxxxxxxxxxx>; > ssengar@xxxxxxxxxxxxxxxxxxx; linux-rdma@xxxxxxxxxxxxxxx; > daniel@xxxxxxxxxxxxx; john.fastabend@xxxxxxxxx; bpf@xxxxxxxxxxxxxxx; > ast@xxxxxxxxxx; Ajay Sharma <sharmaajay@xxxxxxxxxxxxx>; > hawk@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx > Subject: Re: [PATCH V2,net-next, 3/3] net: mana: Add support for jumbo > frame > > > > On 4/7/2023 1:59 PM, Haiyang Zhang wrote: > > During probe, get the hardware-allowed max MTU by querying the device > > configuration. Users can select MTU up to the device limit. > > When XDP is in use, limit MTU settings so the buffer size is within > > one page. > > Also, to prevent changing MTU fails, and leaves the NIC in a bad state, > > pre-allocate all buffers before starting the change. So in low memory > > condition, it will return error, without affecting the NIC. > > > > What happens if XDP gets enabled after MTU larger than PAGE_SIZE is set? > Will XDP fail to enable in that case? Yes, XDP program will fail to enable if MTU is too large. Thanks, - Haiyang