Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1262090imm; Thu, 4 Oct 2018 10:36:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV60DdEZw/rH9J4jyqd/yogfh3xIFOXQqGMKuIDa7VybLPZ+fZmedgYptGq3vrAnxY9rALa3n X-Received: by 2002:a17:902:6b09:: with SMTP id o9-v6mr7746008plk.316.1538674583250; Thu, 04 Oct 2018 10:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538674583; cv=none; d=google.com; s=arc-20160816; b=043bzmCpn9ODA6IiDofFnilNO7dHvoO0eBKTRyfWmhvstJibjPNSAvOva+C5sh6Apg TaK6RR5IPzSgXf+vx8gciAZ8Wi7eCMUclBEoeJlXbBG5do/WmwMcNvBfwI61oxcV2pYh 1FnAxCbvAPbyPmnSNt7AGkIzhkugHlYwZ2siygu7NvwACzXf9ix4AbyYVAuw43V2bHxq 1sP5RJWQ+wI+E5iMU9FW0iZpu9hSqQOMJM6Wsug+3HZuM8QeIVqaapSX1u92hcH/hI+W 6RtZ4lktpf8R2y3/vHm7VDwi1mflaHCRMwdIJmAsEjQ3nsLQuuMddF+z9BQFjxhW8RAl ZsTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id; bh=y8YOyZ9C/ajSYMcBrXpAwMi/Oc5CGxZRfVNGgvI0UFY=; b=XMEUgRy9ltSegLDWjsYVg7IdOkoH40IoC8R6kRaCZ2uIMq6GyxL+Xa8N5PVPaGXTLC HGoTF+RE3XES91mOsHfbEMP+ahpFJPpOMwnP0oVtqzd6N2uiR0YULCtniRqdhUsTKogZ iG4ygKngliZjagxNnKJqlYvQLVQ0OV+/UmDbg3YGAujLXX9AS0hhn3xpFh23tteTL0Qp nR75p7YkQYFbPH8XdxzK1OTb7XjtJMouNMoL0OYYPw1GS1LWzRcLbtE6gXPHHSm3y17Q XzIoNn1cD5P7zS6TogpSqzl0A8MnYlE/8N6bh9En9i/4m/rqqGZIHHYOX6k66r7k0guC /gSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si6053548pla.286.2018.10.04.10.36.07; Thu, 04 Oct 2018 10:36:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbeJEAaL (ORCPT + 99 others); Thu, 4 Oct 2018 20:30:11 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:49939 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727406AbeJEAaK (ORCPT ); Thu, 4 Oct 2018 20:30:10 -0400 Received: from [148.252.241.226] (helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1g86sG-00014P-Mi; Thu, 04 Oct 2018 17:53:16 +0100 Message-ID: <1538671996.3024.269.camel@codethink.co.uk> Subject: Re: [Linux-kernel] [PATCH 2/4] usbnet: smsc95xx: align tx-buffer to word From: Ben Hutchings To: Ben Dooks , netdev@vger.kernel.org Cc: linux-kernel@lists.codethink.co.uk, linux-usb@vger.kernel.org, oneukum@suse.com, linux-kernel@vger.kernel.org, davem@davemloft.net Date: Thu, 04 Oct 2018 17:53:16 +0100 In-Reply-To: <20181002092645.1115-3-ben.dooks@codethink.co.uk> References: <20181002092645.1115-1-ben.dooks@codethink.co.uk> <20181002092645.1115-3-ben.dooks@codethink.co.uk> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-10-02 at 10:26 +0100, Ben Dooks wrote: > The tegra driver requires alignment of the buffer, so try and > make this better by pushing the buffer start back to an word > aligned address. At the worst this makes memcpy() easier as > it is word aligned, at best it makes sure the usb can directly > map the buffer. > > Signed-off-by: Ben Dooks > [todo - make this configurable] [...] I don't think you need a separate kconfig symbol for this. Aligning RX buffers to words (or better, cache lines) is almost always a win, so long as the CPU can handle misaligned fields in the network/transport headers. You can use #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to check that. It seems like NET_IP_ALIGN should be defined to 0 or 2 depending on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, but NET_IP_ALIGN predates the latter. Ben. -- Ben Hutchings, Software Developer   Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom