Commit 17d49e6e authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'remove-NAPI_POLL_WEIGHT-copies'



Merge branch 'remove-NAPI_POLL_WEIGHT-copies'

Jakub Kicinski says:

====================
remove copies of the NAPI_POLL_WEIGHT define

netif_napi_add() takes weight as the last argument. The value of
that parameter is hard to come up with and depends on many factors,
so driver authors are encouraged to use NAPI_POLL_WEIGHT.

We should probably move weight to an "advanced" version of the API
(__netif_napi_add()?) and simplify the life of most driver authors.

In preparation for such API changes this series removes local
defines equivalent to NAPI_POLL_WEIGHT from drivers, so that a simple
coccinelle / spatch script does not get thrown off by them.

v2:
 - drop staging bits (patch 2)
 - fix subject (patch 8)
 - add qeth change (patch 15)
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5da66099 4bb0c7f0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -265,8 +265,6 @@
#define SLIC_NUM_STAT_DESC_ARRAYS	4
#define SLIC_INVALID_STAT_DESC_IDX	0xffffffff

#define SLIC_NAPI_WEIGHT		64

#define SLIC_UPR_LSTAT			0
#define SLIC_UPR_CONFIG			1

+1 −1
Original line number Diff line number Diff line
@@ -1803,7 +1803,7 @@ static int slic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
		goto unmap;
	}

	netif_napi_add(dev, &sdev->napi, slic_poll, SLIC_NAPI_WEIGHT);
	netif_napi_add(dev, &sdev->napi, slic_poll, NAPI_POLL_WEIGHT);
	netif_carrier_off(dev);

	err = register_netdev(dev);
+0 −2
Original line number Diff line number Diff line
@@ -65,8 +65,6 @@
 */
#define AQ_CFG_RESTART_DESC_THRES   (AQ_CFG_SKB_FRAGS_MAX * 2)

#define AQ_CFG_NAPI_WEIGHT     64U

/*#define AQ_CFG_MAC_ADDR_PERMANENT {0x30, 0x0E, 0xE3, 0x12, 0x34, 0x56}*/

#define AQ_CFG_FC_MODE AQ_NIC_FC_FULL
+1 −1
Original line number Diff line number Diff line
@@ -1218,7 +1218,7 @@ int aq_ptp_init(struct aq_nic_s *aq_nic, unsigned int idx_vec)
	atomic_set(&aq_ptp->offset_ingress, 0);

	netif_napi_add(aq_nic_get_ndev(aq_nic), &aq_ptp->napi,
		       aq_ptp_poll, AQ_CFG_NAPI_WEIGHT);
		       aq_ptp_poll, NAPI_POLL_WEIGHT);

	aq_ptp->idx_vector = idx_vec;

+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ struct aq_vec_s *aq_vec_alloc(struct aq_nic_s *aq_nic, unsigned int idx,
	self->rx_rings = 0;

	netif_napi_add(aq_nic_get_ndev(aq_nic), &self->napi,
		       aq_vec_poll, AQ_CFG_NAPI_WEIGHT);
		       aq_vec_poll, NAPI_POLL_WEIGHT);

err_exit:
	return self;
Loading