From patchwork Tue Jul 12 13:51:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 647401 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rpjzp15Bbz9s6r for ; Tue, 12 Jul 2016 23:51:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=atAlRRKo; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752558AbcGLNvP (ORCPT ); Tue, 12 Jul 2016 09:51:15 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33750 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbcGLNvO (ORCPT ); Tue, 12 Jul 2016 09:51:14 -0400 Received: by mail-lf0-f67.google.com with SMTP id f93so974033lfi.0 for ; Tue, 12 Jul 2016 06:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CeDwkp2S13flBK6Wjw6uH8++oA0trDGNxQtJ/6F3c+g=; b=atAlRRKo5Kio8Mb1zHiNPmMQeZSi5U924Rltl+pBxd9z2R9p7n3OeuaNrR4BXKSRrC KUoQiOLDN6lh5SNwUvXHqG8wzuW4XIu6IvXnfEIVLYVxaaySqMwQpzMmNi3ZVWQhLKGw ujCbGxxtnxEZvwd7GwNx82k149DQNKjpWu8xiVz//5RT5MeDIvQ6gY9nwrMCOiIeB7tJ aS7Qeq3MtgPrPC/6lNtZqYCoAaoXh/pqDPU/WY4C+RsoWULgXKRfYYbMx+TaR82mbEqg bl/0mcEteog2DyrOMV65rFgQ2/7FZ5MFwnYCXF7s1SFOu6QaVuI/v3lR2VPZLbCFwSjb JwKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CeDwkp2S13flBK6Wjw6uH8++oA0trDGNxQtJ/6F3c+g=; b=mdioWJmu8ve4DzlbLd7so263BnhKM7TIw+qLrxauSeNqpMBKhhWQh30JzwrzfREgC5 zCkUiZXmE5+ieKYsSxUqwkw/HRBnp25YwwQvgArLapRFq0SOkmQBJ/0Z5FyXtE4K03jX G7t32t62AujX/eKoJ3eRnbmk5rzoWNIGJEHmatqypE9FN56gcSJzSW//jmAcI8F1PwX0 AWp8WAAsxlHvJ7ZPmVXNBG9wByJvB1GHb7QPgdmHCr9erQ4iQAYqznXAWY37FfwUM8jC ZFLsq+XbMcq/F2gnHBr5Mwp+dBfVTR/+mFtwwwAiFcqhQOEcIgpZ5+9jUKqaCzJhfjcR EniQ== X-Gm-Message-State: ALyK8tIdCVgJIm3Zsv58uH0lXG+n21Xm3L0AsNP/RU2CozIzUGJUZm+03Dh06A1CkEtmVg== X-Received: by 10.25.18.78 with SMTP id h75mr1328732lfi.148.1468331472622; Tue, 12 Jul 2016 06:51:12 -0700 (PDT) Received: from octofox.metropolis ([5.19.183.212]) by smtp.gmail.com with ESMTPSA id 136sm3144576ljj.0.2016.07.12.06.51.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 06:51:11 -0700 (PDT) Date: Tue, 12 Jul 2016 16:51:10 +0300 From: Max Filippov To: Florian Fainelli Cc: netdev@vger.kernel.org, davem@davemloft.net, colin.king@canonical.com, tklauser@distanz.ch, thierry.reding@gmail.com Subject: Re: [PATCH net v2 0/2] net: ethoc: Error path and transmit fixes Message-ID: <20160712135109.GB19495@octofox.metropolis> References: <1468280155-13152-1-git-send-email-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1468280155-13152-1-git-send-email-f.fainelli@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hello, On Mon, Jul 11, 2016 at 04:35:53PM -0700, Florian Fainelli wrote: > This patch series contains two patches for the ethoc driver while testing on a > TS-7300 board where ethoc is provided by an on-board FPGA. > > First patch was cooked after chasing crashes with invalid resources passed to > the driver. > > Second patch was cooked after seeing that an interface configured with IP > 192.168.2.2 was sending ARP packets for 192.168.0.0, no wonder why it could not > work. I can see opencores intrerface sending ARP packets shorter than 64 bytes, but I couldn't reproduce truncation that affects packet contents on my hardware. > I don't have access to any other platform using an ethoc interface so > it could be good to some testing on Xtensa for instance. I've tested success and error paths affected by this series with the following additional change on top of it: Without it the interface becomes non-functional after the first error in skb_put_padto. Tested-by: Max Filippov Reviewed-by: Max Filippov diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index ca678d4..8c94f45 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c @@ -862,7 +862,7 @@ static netdev_tx_t ethoc_start_xmit(struct sk_buff *skb, struct net_device *dev) if (skb_put_padto(skb, ETHOC_ZLEN)) { dev->stats.tx_errors++; - goto out; + return NETDEV_TX_OK; } if (unlikely(skb->len > ETHOC_BUFSIZ)) {