diff options
author | Bogdan Hamciuc <bogdan.hamciuc@freescale.com> | 2013-06-24 23:45:13 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-07-30 20:48:18 (GMT) |
commit | 2ccae6f0622ee3d1998828eeeced7b25d42fb192 (patch) | |
tree | 2df3e412d48110be5fb777fc8951543b2435b654 /drivers/net/ethernet/freescale/dpa | |
parent | 56c123508b44af43ff8d643240b4c32c1cacfad4 (diff) | |
download | linux-fsl-qoriq-2ccae6f0622ee3d1998828eeeced7b25d42fb192.tar.xz |
dpaa_eth: Rename dpa_bp_add_8_pages()
After we no longer allocate full page-size buffers, the main allocation
function needs a rename. Ditto for some internal variable and one
comment.
Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Change-Id: Id3e6888ad6554b696f3b59d39e26562588713d0b
Reviewed-on: http://git.am.freescale.net:8181/3477
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>
Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h index 7d641e98..a111086 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h @@ -476,8 +476,8 @@ void __hot _dpa_process_parse_results(const t_FmPrsResult *parse_results, int *use_gro); #ifdef CONFIG_FSL_DPAA_ETH_SG_SUPPORT -void dpa_bp_add_8_pages(const struct dpa_bp *dpa_bp, int cpu_id); -int _dpa_bp_add_8_pages(const struct dpa_bp *dpa_bp); +void dpa_bp_add_8_bufs(const struct dpa_bp *dpa_bp, int cpu_id); +int _dpa_bp_add_8_bufs(const struct dpa_bp *dpa_bp); #endif /* diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c index 4b4b8f9..c1b71d1 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c @@ -72,7 +72,7 @@ static void dpa_bp_recycle_frag(struct dpa_bp *dpa_bp, unsigned long vaddr) (*count_ptr)++; } -int _dpa_bp_add_8_pages(const struct dpa_bp *dpa_bp) +int _dpa_bp_add_8_bufs(const struct dpa_bp *dpa_bp) { struct bm_buffer bmb[8]; void *new_buf; @@ -109,7 +109,7 @@ release_bufs: return i; bail_out: - net_err_ratelimited("dpa_bp_add_8_pages() failed\n"); + net_err_ratelimited("dpa_bp_add_8_bufs() failed\n"); WARN_ONCE(1, "Memory allocation failure on Rx\n"); bm_buffer_set64(&bmb[i], 0); @@ -124,12 +124,12 @@ bail_out: } /* - * Cold path wrapper over _dpa_bp_add_8_pages(). + * Cold path wrapper over _dpa_bp_add_8_bufs(). */ -void dpa_bp_add_8_pages(const struct dpa_bp *dpa_bp, int cpu) +void dpa_bp_add_8_bufs(const struct dpa_bp *dpa_bp, int cpu) { int *count_ptr = per_cpu_ptr(dpa_bp->percpu_count, cpu); - *count_ptr += _dpa_bp_add_8_pages(dpa_bp); + *count_ptr += _dpa_bp_add_8_bufs(dpa_bp); } void dpa_make_private_pool(struct dpa_bp *dpa_bp) @@ -147,7 +147,7 @@ void dpa_make_private_pool(struct dpa_bp *dpa_bp) * we do it at boot time so it is safe */ for (j = 0; j < dpa_bp->config_count; j += 8) - dpa_bp_add_8_pages(dpa_bp, i); + dpa_bp_add_8_bufs(dpa_bp, i); } } @@ -160,19 +160,19 @@ int dpaa_eth_refill_bpools(struct dpa_percpu_priv_s *percpu_priv) int *countptr = percpu_priv->dpa_bp_count; int count = *countptr; const struct dpa_bp *dpa_bp = percpu_priv->dpa_bp; - int new_pages; + int new_bufs; /* Add pages to the buffer pool */ while (count < CONFIG_FSL_DPAA_ETH_MAX_BUF_COUNT) { - new_pages = _dpa_bp_add_8_pages(dpa_bp); - if (unlikely(!new_pages)) { + new_bufs = _dpa_bp_add_8_bufs(dpa_bp); + if (unlikely(!new_bufs)) { /* Avoid looping forever if we've temporarily * run out of memory. We'll try again at the next * NAPI cycle. */ break; } - count += new_pages; + count += new_bufs; } *countptr = count; @@ -245,7 +245,7 @@ struct sk_buff *_dpa_cleanup_tx_fd(const struct dpa_priv_s *priv, } /* - * TODO: dpa_bp_add_page() ? + * TODO: dpa_bp_recycle_frag() ? * We could put these in the pool, since we allocated them * and we know they're not used by anyone else */ |