lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 22 Nov 2015 09:19:55 +0000
From:	Yuval Mintz <Yuval.Mintz@...gic.com>
To:	Salil Mehta <salil.mehta@...wei.com>,
	David Miller <davem@...emloft.net>,
	"robh+dt@...nel.org" <robh+dt@...nel.org>,
	"pawel.moll@....com" <pawel.moll@....com>,
	"mark.rutland@....com" <mark.rutland@....com>,
	"paul.gortmaker@...driver.com" <paul.gortmaker@...driver.com>,
	"ijc+devicetree@...lion.org.uk" <ijc+devicetree@...lion.org.uk>,
	"galak@...eaurora.org" <galak@...eaurora.org>,
	"catalin.marinas@....com" <catalin.marinas@....com>,
	"will.deacon@....com" <will.deacon@....com>,
	"arnd@...db.de" <arnd@...db.de>,
	"liguozhu@...ilicon.com" <liguozhu@...ilicon.com>,
	"yisen.zhuang@...wei.com" <yisen.zhuang@...wei.com>,
	"dingtianhong@...wei.com" <dingtianhong@...wei.com>,
	"zhangfei.gao@...aro.org" <zhangfei.gao@...aro.org>,
	"huangdaode@...ilicon.com" <huangdaode@...ilicon.com>,
	"kenneth-lee-2012@...mail.com" <kenneth-lee-2012@...mail.com>,
	"mehta.salil.lnk@...il.com" <mehta.salil.lnk@...il.com>,
	"xuwei5@...ilicon.com" <xuwei5@...ilicon.com>,
	"lisheng011@...wei.com" <lisheng011@...wei.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	netdev <netdev@...r.kernel.org>,
	"linuxarm@...wei.com" <linuxarm@...wei.com>
CC:	yankejian <yankejian@...wei.com>, lipeng <lipeng321@...wei.com>,
	"Fengguang Wu" <fengguang.wu@...el.com>
Subject: RE: [PATCH V3 net-next 1/5] net:hns: Add support of Hip06 SoC to the
 Hislicon Network Subsystem

> +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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists