From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48944 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248AbeCLPY6 (ORCPT ); Mon, 12 Mar 2018 11:24:58 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2CFLvdT039256 for ; Mon, 12 Mar 2018 11:24:58 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gntg4nc04-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 12 Mar 2018 11:24:57 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Mar 2018 09:24:56 -0600 Subject: Re: [PATCH 3/4 net-next] ibmvnic: Pad small packets to minimum MTU size To: David Miller Cc: netdev@vger.kernel.org, nfont@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com References: <1520623437-5118-1-git-send-email-tlfalcon@linux.vnet.ibm.com> <1520623437-5118-4-git-send-email-tlfalcon@linux.vnet.ibm.com> <20180311.225616.1559105614501920898.davem@davemloft.net> From: Thomas Falcon Date: Mon, 12 Mar 2018 10:24:53 -0500 MIME-Version: 1.0 In-Reply-To: <20180311.225616.1559105614501920898.davem@davemloft.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Message-Id: <9dfa5d43-820d-c208-8919-7cdd94e657e6@linux.vnet.ibm.com> Sender: netdev-owner@vger.kernel.org List-ID: On 03/11/2018 09:56 PM, David Miller wrote: > From: Thomas Falcon > Date: Fri, 9 Mar 2018 13:23:56 -0600 > >> + /* For some backing devices, mishandling of small packets >> + * can result in a loss of connection or TX stall. Device >> + * architects recommend that no packet should be smaller >> + * than the minimum MTU value provided to the driver, so >> + * pad any packets to that length >> + */ >> + if (skb->len < netdev->min_mtu) { >> + return skb_put_padto(skb, netdev->min_mtu); >> + } > Please do not use curly braces for a single statement > basic block. > > Thank you. > Oops, sorry about that. I'll fix that and resend. Thanks.