[{"id":1772879,"web_url":"http://patchwork.ozlabs.org/comment/1772879/","msgid":"<87h8vwqfmh.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>","list_archive_url":null,"date":"2017-09-21T14:40:38","subject":"Re: [PATCH net-next 1/2] net: dsa: lan9303: Move tag setup to new\n\tlan9303_setup_tagging","submitter":{"id":15889,"url":"http://patchwork.ozlabs.org/api/people/15889/","name":"Vivien Didelot","email":"vivien.didelot@savoirfairelinux.com"},"content":"Hi Egil,\n\nEgil Hjelmeland <privat@egil-hjelmeland.no> writes:\n\n> Prepare for next patch:\n> Move tag setup from lan9303_separate_ports() to new function\n> lan9303_setup_tagging()\n>\n> Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>\n\nMinor styling issues, otherwise LGTM:\n\nReviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>\n\n> +/* forward special tagged packets from port 0 to port 1 *or* port 2 */\n> +static int lan9303_setup_tagging(struct lan9303 *chip)\n> +{\n> +\tint ret;\n> +\t/* enable defining the destination port via special VLAN tagging\n> +\t * for port 0\n> +\t */\n> +\tret = lan9303_write_switch_reg(chip, LAN9303_SWE_INGRESS_PORT_TYPE,\n> +\t\t\t\t       LAN9303_SWE_INGRESS_PORT_TYPE_VLAN);\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\t/* tag incoming packets at port 1 and 2 on their way to port 0 to be\n> +\t * able to discover their source port\n> +\t */\n> +\treturn lan9303_write_switch_reg(\n> +\t\tchip, LAN9303_BM_EGRSS_PORT_TYPE,\n> +\t\tLAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0);\n\nPlease avoid this kind of alignment as much as possible.\n\n    u32 val = LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0;\n\nwould do the trick for the +80 chars issue.\n\nBTW, it'd be great to see sometime soon a cleanup patch which makes use\nof such temporary u32 val variable for most of the\nlan9303_write_switch_reg and lan9303_write_switch_port calls. ;-)\n\n\nThanks,\n\n        Vivien","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyfWs5Xc0z9t3v\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 22 Sep 2017 00:44:25 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751878AbdIUOoO (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 21 Sep 2017 10:44:14 -0400","from mail.savoirfairelinux.com ([208.88.110.44]:53746 \"EHLO\n\tmail.savoirfairelinux.com\" rhost-flags-OK-OK-OK-OK) by\n\tvger.kernel.org with ESMTP id S1751387AbdIUOoN (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 21 Sep 2017 10:44:13 -0400","from localhost (localhost [127.0.0.1])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTP id 64B379C1A84;\n\tThu, 21 Sep 2017 10:44:12 -0400 (EDT)","from mail.savoirfairelinux.com ([127.0.0.1])\n\tby localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new,\n\tport 10032)\n\twith ESMTP id STY3F1lH3FZ0; Thu, 21 Sep 2017 10:44:11 -0400 (EDT)","from localhost (localhost [127.0.0.1])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTP id 75C5B9C1D4A;\n\tThu, 21 Sep 2017 10:44:11 -0400 (EDT)","from mail.savoirfairelinux.com ([127.0.0.1])\n\tby localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new,\n\tport 10026)\n\twith ESMTP id 7Adp8OUr5ad2; Thu, 21 Sep 2017 10:44:11 -0400 (EDT)","from localhost (modemcable249.105-163-184.mc.videotron.ca\n\t[184.163.105.249])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTPSA id 3F66E9C1A84;\n\tThu, 21 Sep 2017 10:44:11 -0400 (EDT)"],"X-Virus-Scanned":"amavisd-new at mail.savoirfairelinux.com","From":"Vivien Didelot <vivien.didelot@savoirfairelinux.com>","To":"Egil Hjelmeland <privat@egil-hjelmeland.no>, andrew@lunn.ch,\n\tf.fainelli@gmail.com, netdev@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org","Cc":"Egil Hjelmeland <privat@egil-hjelmeland.no>","Subject":"Re: [PATCH net-next 1/2] net: dsa: lan9303: Move tag setup to new\n\tlan9303_setup_tagging","In-Reply-To":"<20170921094139.4250-2-privat@egil-hjelmeland.no>","References":"<20170921094139.4250-1-privat@egil-hjelmeland.no>\n\t<20170921094139.4250-2-privat@egil-hjelmeland.no>","Date":"Thu, 21 Sep 2017 10:40:38 -0400","Message-ID":"<87h8vwqfmh.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>","MIME-Version":"1.0","Content-Type":"text/plain","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]