Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbbKVJUd (ORCPT ); Sun, 22 Nov 2015 04:20:33 -0500 Received: from mail-bn1bon0132.outbound.protection.outlook.com ([157.56.111.132]:7488 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751166AbbKVJUB convert rfc822-to-8bit (ORCPT ); Sun, 22 Nov 2015 04:20:01 -0500 From: Yuval Mintz To: Salil Mehta , David Miller , "robh+dt@kernel.org" , "pawel.moll@arm.com" , "mark.rutland@arm.com" , "paul.gortmaker@windriver.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , "catalin.marinas@arm.com" , "will.deacon@arm.com" , "arnd@arndb.de" , "liguozhu@hisilicon.com" , "yisen.zhuang@huawei.com" , "dingtianhong@huawei.com" , "zhangfei.gao@linaro.org" , "huangdaode@hisilicon.com" , "kenneth-lee-2012@foxmail.com" , "mehta.salil.lnk@gmail.com" , "xuwei5@hisilicon.com" , "lisheng011@huawei.com" , "devicetree@vger.kernel.org" , linux-kernel , "linux-arm-kernel@lists.infradead.org" , netdev , "linuxarm@huawei.com" CC: yankejian , lipeng , "Fengguang Wu" Subject: RE: [PATCH V3 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem Thread-Topic: [PATCH V3 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem Thread-Index: AQHRIwuDN3QougAGVEiZzv2Nr+s0iZ6nwVNQ Date: Sun, 22 Nov 2015 09:19:55 +0000 Message-ID: References: <1447966706-16219-1-git-send-email-salil.mehta@huawei.com> <1447966706-16219-2-git-send-email-salil.mehta@huawei.com> In-Reply-To: <1447966706-16219-2-git-send-email-salil.mehta@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuval.Mintz@qlogic.com; x-originating-ip: [31.168.140.228] x-microsoft-exchange-diagnostics: 1;CO2PR11MB0086;5:UX6eP1JVHhEie4gZqh+WOovrMi6FYbRqVCAZwq60ixCWSfEkCiV+LlX2tP/ohxnl5B1d3RhP4AUVpX82x/7xvnJKcdOd28RLb85g/xAetJCDsws6b2ek98jGulJfBdf9B6PPcuoTB99hI7AWFCfpHQ==;24:+NrvRNs9rra8ah2JKm/kRxW0L7HE2ZRWBi4W/vCvKCag+7m7P5KFypZpvG/Dq07ZTRMjpoKxPwt791iKnt9qkLSyK7ywfjh8COzuaD5K2B0=;20:Ms7p0r7dsVGkiqS6X95WrQ4vZmCUKi6YTSCVMN7ZTfFckCICanKK+LVRBMLif/urwiVGm03K26wvvCUWbyYPATQTprRME+j0jHNw9vi8aRribFaxBmx1jmkF3d1voJ7q2cgZsQfFQKbTOm+Dck2FxKLoa0dcG3I61Cb/nfNeaAw= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR11MB0086; x-ld-processed: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046);SRVR:CO2PR11MB0086;BCL:0;PCL:0;RULEID:;SRVR:CO2PR11MB0086; x-forefront-prvs: 076804FE30 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(81156007)(3846002)(5001770100001)(2501003)(86362001)(97736004)(54356999)(5001920100001)(99286002)(66066001)(101416001)(105586002)(5001960100002)(6116002)(102836003)(2950100001)(2900100001)(189998001)(77096005)(586003)(11100500001)(122556002)(92566002)(76176999)(87936001)(10400500002)(50986999)(33656002)(40100003)(106116001)(5007970100001)(106356001)(5004730100002)(5002640100001)(76576001)(74316001)(5003600100002)(5008740100001)(2201001)(921003)(1121003)(309714004);DIR:OUT;SFP:1102;SCL:1;SRVR:CO2PR11MB0086;H:CO2PR11MB0088.namprd11.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:3;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: qlogic.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2015 09:19:55.5501 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR11MB0086 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1852 Lines: 64 > +void hns_rcbv2_int_ctrl_hw(struct hnae_queue *q, u32 flag, u32 mask) > +{ > + u32 int_mask_en = !!mask; > + > + if (flag & RCB_INT_FLAG_TX) > + dsaf_write_dev(q, RCB_RING_INTMSK_TXWL_REG, > int_mask_en); > + > + if (flag & RCB_INT_FLAG_RX) > + dsaf_write_dev(q, RCB_RING_INTMSK_RXWL_REG, > int_mask_en); > +} > + > +void hns_rcbv2_int_clr_hw(struct hnae_queue *q, u32 flag) > +{ > + u32 clr = 1; > + > + if (flag & RCB_INT_FLAG_TX) > + dsaf_write_dev(q, RCBV2_TX_RING_INT_STS_REG, clr); > + > + if (flag & RCB_INT_FLAG_RX) > + dsaf_write_dev(q, RCBV2_RX_RING_INT_STS_REG, clr); > +} > + Why do you need the int_mask_en, clr variables? Why not directly use values? > +static void fill_v2_desc(struct hnae_ring *ring, void *priv, .... > + hnae_set_field(bn_pid, 0x7, 0, buf_num - 1); Magic values? > +int hns_nic_net_xmit_hw(struct net_device *ndev, > + struct sk_buff *skb, > + struct hns_nic_ring_data *ring_data) > +{ > - /* If everything has gone correctly network should be the > + /** > + * If everything has gone correctly network should be the > * data section of the packet and will be the end of the header. > * If not then it probably represents the end of the last recognized > * header. What happened to the network style comments? > static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data, > struct sk_buff **out_skb, int *out_bnum) > + /** > + * we will be copying header into skb->data in > + * pskb_may_pull so it is in our interest to prefetch > + * it now to avoid a possible cache miss > + */ > + prefetchw(skb->data); > + Likewise -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/