devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Salil Mehta <salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Yuval Mintz <Yuval.Mintz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>,
	David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"pawel.moll-5wv7dgnIgG8@public.gmane.org"
	<pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	"mark.rutland-5wv7dgnIgG8@public.gmane.org"
	<mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org"
	<paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>,
	"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"catalin.marinas-5wv7dgnIgG8@public.gmane.org"
	<catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
	"will.deacon-5wv7dgnIgG8@public.gmane.org"
	<will.deacon-5wv7dgnIgG8@public.gmane.org>,
	"arnd-r2nGTMty4D4@public.gmane.org"
	<arnd-r2nGTMty4D4@public.gmane.org>,
	"liguozhu-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org"
	<liguozhu-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
	"yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org"
	<yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org"
	<dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org"
	<huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
	"kenneth-lee-2012-H32Fclmsjq1BDgjK7y7TUQ@public.gmane.org"
	<kenneth-lee-2012-H32Fclmsjq1BDgjK7y7TUQ@public.gmane.org>,
	"mehta.salil.lnk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<mehta.sal>
Cc: yankejian <yankejian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	lipeng <lipeng321-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Fengguang Wu
	<fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH V3 net-next 1/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem
Date: Thu, 26 Nov 2015 07:44:25 +0000	[thread overview]
Message-ID: <5656B859.7010106@huawei.com> (raw)
In-Reply-To: <CO2PR11MB0088145308CE8BF0C504C9C497180-aWXWhCNu7Z/c7AgKY82GyJPPoyLQLiKMvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>


On 11/22/2015 9:19 AM, Yuval Mintz wrote:
>> +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?
'clr' variable can be avoided and is kind of redundant as it always 
holds the
same value. This chnage is now part of latest floated PATCH V5.

Purpose of the mask is coming from the previous/legacy
SoC Hip05 where operation is done on the basis of RX or TX direction.
This mask does not seem very useful for now but we would like to take
this change in future, if there is not any API's using this kind of 
interface.
-Salil
>
>> +static void fill_v2_desc(struct hnae_ring *ring, void *priv,
> ....
>> +	hnae_set_field(bn_pid, 0x7, 0, buf_num - 1);
> Magic values?
Changed to macro in PATCH V5. Thanks!
-Salil
>
>> +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?
Fixed this in PATCH V5. Thanks !!
-Salil
>
>>   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
Fixed this in PATCH V5. Thanks !!
-Salil
>


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-11-26  7:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 20:58 [PATCH V3 net-next 0/5] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem Salil Mehta
     [not found] ` <1447966706-16219-1-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-11-19 20:58   ` [PATCH V3 net-next 1/5] " Salil Mehta
     [not found]     ` <1447966706-16219-2-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-11-22  9:19       ` Yuval Mintz
2015-11-22  9:19     ` Yuval Mintz
     [not found]       ` <CO2PR11MB0088145308CE8BF0C504C9C497180-aWXWhCNu7Z/c7AgKY82GyJPPoyLQLiKMvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-11-26  7:44         ` Salil Mehta [this message]
2015-11-19 20:58 ` [PATCH V3 net-next 2/5] net:hns: Add Hip06 "RSS(Receive Side Scaling)" support to HNS Driver Salil Mehta
     [not found]   ` <1447966706-16219-3-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-11-22  9:30     ` Yuval Mintz
2015-11-22  9:30   ` Yuval Mintz
     [not found]     ` <CO2PR11MB0088B852596B9F86F7BDCF6F97180-aWXWhCNu7Z/c7AgKY82GyJPPoyLQLiKMvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-11-26  7:31       ` Salil Mehta
2015-11-19 20:58 ` [PATCH V3 net-next 3/5] net:hns: Add Hip06 "TSO(TCP Segment Offload)" support " Salil Mehta
     [not found]   ` <1447966706-16219-4-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-11-22  8:49     ` Yuval Mintz
2015-11-22  8:49   ` Yuval Mintz
2015-11-26  8:19     ` Salil Mehta
     [not found]     ` <CO2PR11MB00885067453FB6462178765497180-aWXWhCNu7Z/c7AgKY82GyJPPoyLQLiKMvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-11-26  8:19       ` Salil Mehta
2015-11-19 20:58 ` [PATCH V3 net-next 4/5] net:hns: Add support of ethtool TSO set option for Hip06 in HNS Salil Mehta
2015-11-20 14:07   ` Sergei Shtylyov
2015-11-23 12:05     ` Salil Mehta
2015-11-19 20:58 ` [PATCH V3 net-next 5/5] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist" Salil Mehta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5656B859.7010106@huawei.com \
    --to=salil.mehta-hv44wf8li93qt0dzr+alfa@public.gmane.org \
    --cc=Yuval.Mintz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=huangdaode-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=kenneth-lee-2012-H32Fclmsjq1BDgjK7y7TUQ@public.gmane.org \
    --cc=liguozhu-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org \
    --cc=lipeng321-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=yankejian-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=yisen.zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).