Re: [PATCH v2 1/2] net: ethernet: ti: cpsw: remove rx_descs property

2016-06-11 Thread Ivan Khoronzhuk
On 11.06.16 08:50, David Miller wrote: From: Ivan Khoronzhuk Date: Tue, 7 Jun 2016 16:59:35 +0300 if (!cpsw_common_res_usage_state(priv)) { + int buf_num; struct cpsw_priv *priv_sl0 = cpsw_get_slave_priv(priv, 0); Please

Re: [PATCH v2 1/2] net: ethernet: ti: cpsw: remove rx_descs property

2016-06-11 Thread Ivan Khoronzhuk
On 11.06.16 08:50, David Miller wrote: From: Ivan Khoronzhuk Date: Tue, 7 Jun 2016 16:59:35 +0300 if (!cpsw_common_res_usage_state(priv)) { + int buf_num; struct cpsw_priv *priv_sl0 = cpsw_get_slave_priv(priv, 0); Please always order local variable

Re: [PATCH v2 1/2] net: ethernet: ti: cpsw: remove rx_descs property

2016-06-10 Thread David Miller
From: Ivan Khoronzhuk Date: Tue, 7 Jun 2016 16:59:35 +0300 > if (!cpsw_common_res_usage_state(priv)) { > + int buf_num; > struct cpsw_priv *priv_sl0 = cpsw_get_slave_priv(priv, 0); > Please always order local variable declarations

Re: [PATCH v2 1/2] net: ethernet: ti: cpsw: remove rx_descs property

2016-06-10 Thread David Miller
From: Ivan Khoronzhuk Date: Tue, 7 Jun 2016 16:59:35 +0300 > if (!cpsw_common_res_usage_state(priv)) { > + int buf_num; > struct cpsw_priv *priv_sl0 = cpsw_get_slave_priv(priv, 0); > Please always order local variable declarations from longest to shortest

[PATCH v2 1/2] net: ethernet: ti: cpsw: remove rx_descs property

2016-06-07 Thread Ivan Khoronzhuk
There is no reason in rx_descs property because davinici_cpdma driver splits pool of descriptors equally between tx and rx channels. That is, if number of descriptors 256, 128 of them are for rx channels. While receiving, the descriptor is freed to the pool and then allocated with new skb. And if

[PATCH v2 1/2] net: ethernet: ti: cpsw: remove rx_descs property

2016-06-07 Thread Ivan Khoronzhuk
There is no reason in rx_descs property because davinici_cpdma driver splits pool of descriptors equally between tx and rx channels. That is, if number of descriptors 256, 128 of them are for rx channels. While receiving, the descriptor is freed to the pool and then allocated with new skb. And if