From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: Sending undersized ARP packets with VXLAN L3 interface Date: Wed, 27 Aug 2014 10:28:56 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: netdev To: Martin Rusko Return-path: Received: from mail-la0-f42.google.com ([209.85.215.42]:34110 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933836AbaH0R25 (ORCPT ); Wed, 27 Aug 2014 13:28:57 -0400 Received: by mail-la0-f42.google.com with SMTP id pi18so301972lab.1 for ; Wed, 27 Aug 2014 10:28:56 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Aug 27, 2014 at 10:06 AM, Martin Rusko wrote: > > I'm wondering, where is the proper place to fix this. Should > arp_create() function allocate skb big enough to produce ethernet > frame with at least minimum size? Or is it somewhere in NIC drivers > where small packets are padded with zeros? Drivers do that, for example e1000: /* On PCI/PCI-X HW, if packet size is less than ETH_ZLEN, * packets may get corrupted during padding by HW. * To WA this issue, pad all small packets manually. */ if (skb->len < ETH_ZLEN) { if (skb_pad(skb, ETH_ZLEN - skb->len)) return NETDEV_TX_OK; skb->len = ETH_ZLEN; skb_set_tail_pointer(skb, ETH_ZLEN); }