All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net/broadcom: Fixup broken build due to function name change
@ 2018-04-01  6:48 Tal Gilboa
  2018-04-01  7:42 ` kbuild test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tal Gilboa @ 2018-04-01  6:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Tariq Toukan, Tal Gilboa, Saeed Mahameed

Fixes: 8c6d6895bebb ("net/dim: Rename *_get_profile() functions to *_get_rx_moderation()")
Signed-off-by: Tal Gilboa <talgi@mellanox.com>
---
 drivers/net/ethernet/broadcom/bcmsysport.c     | 4 ++--
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 53c035f..98c5183 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -654,7 +654,7 @@ static int bcm_sysport_set_coalesce(struct net_device *dev,
 	pkts = priv->rx_max_coalesced_frames;
 
 	if (ec->use_adaptive_rx_coalesce && !priv->dim.use_dim) {
-		moder = net_dim_get_def_profile(priv->dim.dim.mode);
+		moder = net_dim_get_def_rx_moderation(priv->dim.dim.mode);
 		usecs = moder.usec;
 		pkts = moder.pkts;
 	}
@@ -1436,7 +1436,7 @@ static void bcm_sysport_init_rx_coalesce(struct bcm_sysport_priv *priv)
 
 	/* If DIM was enabled, re-apply default parameters */
 	if (dim->use_dim) {
-		moder = net_dim_get_def_profile(dim->dim.mode);
+		moder = net_dim_get_def_rx_moderation(dim->dim.mode);
 		usecs = moder.usec;
 		pkts = moder.pkts;
 	}
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 1c9c75b..ccd9205 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -652,7 +652,7 @@ static void bcmgenet_set_ring_rx_coalesce(struct bcmgenet_rx_ring *ring,
 	pkts = ring->rx_max_coalesced_frames;
 
 	if (ec->use_adaptive_rx_coalesce && !ring->dim.use_dim) {
-		moder = net_dim_get_def_profile(ring->dim.dim.mode);
+		moder = net_dim_get_def_rx_moderation(ring->dim.dim.mode);
 		usecs = moder.usec;
 		pkts = moder.pkts;
 	}
@@ -2101,7 +2101,7 @@ static void bcmgenet_init_rx_coalesce(struct bcmgenet_rx_ring *ring)
 
 	/* If DIM was enabled, re-apply default parameters */
 	if (dim->use_dim) {
-		moder = net_dim_get_def_profile(dim->dim.mode);
+		moder = net_dim_get_def_rx_moderation(dim->dim.mode);
 		usecs = moder.usec;
 		pkts = moder.pkts;
 	}
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net/broadcom: Fixup broken build due to function name change
  2018-04-01  6:48 [PATCH net-next] net/broadcom: Fixup broken build due to function name change Tal Gilboa
@ 2018-04-01  7:42 ` kbuild test robot
  2018-04-01  8:57 ` kbuild test robot
  2018-04-01 16:33 ` Florian Fainelli
  2 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2018-04-01  7:42 UTC (permalink / raw)
  To: Tal Gilboa
  Cc: kbuild-all, David S. Miller, netdev, Tariq Toukan, Tal Gilboa,
	Saeed Mahameed

[-- Attachment #1: Type: text/plain, Size: 3504 bytes --]

Hi Tal,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Tal-Gilboa/net-broadcom-Fixup-broken-build-due-to-function-name-change/20180401-145037
config: x86_64-randconfig-x005-201813 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/net/ethernet/broadcom/bcmsysport.c: In function 'bcm_sysport_set_coalesce':
>> drivers/net/ethernet/broadcom/bcmsysport.c:657:11: error: implicit declaration of function 'net_dim_get_def_rx_moderation'; did you mean 'net_dim_get_def_profile'? [-Werror=implicit-function-declaration]
      moder = net_dim_get_def_rx_moderation(priv->dim.dim.mode);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              net_dim_get_def_profile
>> drivers/net/ethernet/broadcom/bcmsysport.c:657:9: error: incompatible types when assigning to type 'struct net_dim_cq_moder' from type 'int'
      moder = net_dim_get_def_rx_moderation(priv->dim.dim.mode);
            ^
   drivers/net/ethernet/broadcom/bcmsysport.c: In function 'bcm_sysport_init_rx_coalesce':
   drivers/net/ethernet/broadcom/bcmsysport.c:1439:9: error: incompatible types when assigning to type 'struct net_dim_cq_moder' from type 'int'
      moder = net_dim_get_def_rx_moderation(dim->dim.mode);
            ^
   cc1: some warnings being treated as errors

vim +657 drivers/net/ethernet/broadcom/bcmsysport.c

   624	
   625	static int bcm_sysport_set_coalesce(struct net_device *dev,
   626					    struct ethtool_coalesce *ec)
   627	{
   628		struct bcm_sysport_priv *priv = netdev_priv(dev);
   629		struct net_dim_cq_moder moder;
   630		u32 usecs, pkts;
   631		unsigned int i;
   632	
   633		/* Base system clock is 125Mhz, DMA timeout is this reference clock
   634		 * divided by 1024, which yield roughly 8.192 us, our maximum value has
   635		 * to fit in the RING_TIMEOUT_MASK (16 bits).
   636		 */
   637		if (ec->tx_max_coalesced_frames > RING_INTR_THRESH_MASK ||
   638		    ec->tx_coalesce_usecs > (RING_TIMEOUT_MASK * 8) + 1 ||
   639		    ec->rx_max_coalesced_frames > RDMA_INTR_THRESH_MASK ||
   640		    ec->rx_coalesce_usecs > (RDMA_TIMEOUT_MASK * 8) + 1)
   641			return -EINVAL;
   642	
   643		if ((ec->tx_coalesce_usecs == 0 && ec->tx_max_coalesced_frames == 0) ||
   644		    (ec->rx_coalesce_usecs == 0 && ec->rx_max_coalesced_frames == 0) ||
   645		    ec->use_adaptive_tx_coalesce)
   646			return -EINVAL;
   647	
   648		for (i = 0; i < dev->num_tx_queues; i++)
   649			bcm_sysport_set_tx_coalesce(&priv->tx_rings[i], ec);
   650	
   651		priv->rx_coalesce_usecs = ec->rx_coalesce_usecs;
   652		priv->rx_max_coalesced_frames = ec->rx_max_coalesced_frames;
   653		usecs = priv->rx_coalesce_usecs;
   654		pkts = priv->rx_max_coalesced_frames;
   655	
   656		if (ec->use_adaptive_rx_coalesce && !priv->dim.use_dim) {
 > 657			moder = net_dim_get_def_rx_moderation(priv->dim.dim.mode);
   658			usecs = moder.usec;
   659			pkts = moder.pkts;
   660		}
   661	
   662		priv->dim.use_dim = ec->use_adaptive_rx_coalesce;
   663	
   664		/* Apply desired coalescing parameters */
   665		bcm_sysport_set_rx_coalesce(priv, usecs, pkts);
   666	
   667		return 0;
   668	}
   669	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36307 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net/broadcom: Fixup broken build due to function name change
  2018-04-01  6:48 [PATCH net-next] net/broadcom: Fixup broken build due to function name change Tal Gilboa
  2018-04-01  7:42 ` kbuild test robot
@ 2018-04-01  8:57 ` kbuild test robot
  2018-04-01 16:33 ` Florian Fainelli
  2 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2018-04-01  8:57 UTC (permalink / raw)
  To: Tal Gilboa
  Cc: kbuild-all, David S. Miller, netdev, Tariq Toukan, Tal Gilboa,
	Saeed Mahameed

[-- Attachment #1: Type: text/plain, Size: 2634 bytes --]

Hi Tal,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Tal-Gilboa/net-broadcom-Fixup-broken-build-due-to-function-name-change/20180401-145037
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   drivers/net/ethernet/broadcom/genet/bcmgenet.c: In function 'bcmgenet_set_ring_rx_coalesce':
>> drivers/net/ethernet/broadcom/genet/bcmgenet.c:655:11: error: implicit declaration of function 'net_dim_get_def_rx_moderation'; did you mean 'net_dim_get_def_profile'? [-Werror=implicit-function-declaration]
      moder = net_dim_get_def_rx_moderation(ring->dim.dim.mode);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              net_dim_get_def_profile
>> drivers/net/ethernet/broadcom/genet/bcmgenet.c:655:9: error: incompatible types when assigning to type 'struct net_dim_cq_moder' from type 'int'
      moder = net_dim_get_def_rx_moderation(ring->dim.dim.mode);
            ^
   drivers/net/ethernet/broadcom/genet/bcmgenet.c: In function 'bcmgenet_init_rx_coalesce':
   drivers/net/ethernet/broadcom/genet/bcmgenet.c:2104:9: error: incompatible types when assigning to type 'struct net_dim_cq_moder' from type 'int'
      moder = net_dim_get_def_rx_moderation(dim->dim.mode);
            ^
   cc1: some warnings being treated as errors

vim +655 drivers/net/ethernet/broadcom/genet/bcmgenet.c

   642	
   643	static void bcmgenet_set_ring_rx_coalesce(struct bcmgenet_rx_ring *ring,
   644						  struct ethtool_coalesce *ec)
   645	{
   646		struct net_dim_cq_moder moder;
   647		u32 usecs, pkts;
   648	
   649		ring->rx_coalesce_usecs = ec->rx_coalesce_usecs;
   650		ring->rx_max_coalesced_frames = ec->rx_max_coalesced_frames;
   651		usecs = ring->rx_coalesce_usecs;
   652		pkts = ring->rx_max_coalesced_frames;
   653	
   654		if (ec->use_adaptive_rx_coalesce && !ring->dim.use_dim) {
 > 655			moder = net_dim_get_def_rx_moderation(ring->dim.dim.mode);
   656			usecs = moder.usec;
   657			pkts = moder.pkts;
   658		}
   659	
   660		ring->dim.use_dim = ec->use_adaptive_rx_coalesce;
   661		bcmgenet_set_rx_coalesce(ring, usecs, pkts);
   662	}
   663	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53225 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net/broadcom: Fixup broken build due to function name change
  2018-04-01  6:48 [PATCH net-next] net/broadcom: Fixup broken build due to function name change Tal Gilboa
  2018-04-01  7:42 ` kbuild test robot
  2018-04-01  8:57 ` kbuild test robot
@ 2018-04-01 16:33 ` Florian Fainelli
  2018-04-01 20:29   ` Tal Gilboa
  2 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2018-04-01 16:33 UTC (permalink / raw)
  To: Tal Gilboa, David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed

Le 03/31/18 à 23:48, Tal Gilboa a écrit :
> Fixes: 8c6d6895bebb ("net/dim: Rename *_get_profile() functions to *_get_rx_moderation()")
> Signed-off-by: Tal Gilboa <talgi@mellanox.com>

I think David just backed out your entire patch series adding TX DIM so
you would have to incorporate that change into your series and
re-submit. Thanks!
-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next] net/broadcom: Fixup broken build due to function name change
  2018-04-01 16:33 ` Florian Fainelli
@ 2018-04-01 20:29   ` Tal Gilboa
  0 siblings, 0 replies; 5+ messages in thread
From: Tal Gilboa @ 2018-04-01 20:29 UTC (permalink / raw)
  To: Florian Fainelli, David S. Miller; +Cc: netdev, Tariq Toukan, Saeed Mahameed

On 4/1/2018 7:33 PM, Florian Fainelli wrote:
> Le 03/31/18 à 23:48, Tal Gilboa a écrit :
>> Fixes: 8c6d6895bebb ("net/dim: Rename *_get_profile() functions to *_get_rx_moderation()")
>> Signed-off-by: Tal Gilboa <talgi@mellanox.com>
> 
> I think David just backed out your entire patch series adding TX DIM so
> you would have to incorporate that change into your series and
> re-submit. Thanks!
> 
I see. Re-submitted the original series with a fix.
Please ignore this patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-01 20:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-01  6:48 [PATCH net-next] net/broadcom: Fixup broken build due to function name change Tal Gilboa
2018-04-01  7:42 ` kbuild test robot
2018-04-01  8:57 ` kbuild test robot
2018-04-01 16:33 ` Florian Fainelli
2018-04-01 20:29   ` Tal Gilboa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.