staging: octeon-ethernet: eliminate USE_SKBUFFS_IN_HW define
We always try to use skbuffs for packet buffers, so eliminate a redundant define. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6646baf704
commit
3a990f390e
|
@ -27,10 +27,6 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A few defines are used to control the operation of this driver:
|
* A few defines are used to control the operation of this driver:
|
||||||
* USE_SKBUFFS_IN_HW
|
|
||||||
* Tells the driver to populate the packet buffers with kernel skbuffs.
|
|
||||||
* This allows the driver to receive packets without copying them. It also
|
|
||||||
* means that 32bit userspace can't access the packet buffers.
|
|
||||||
* USE_ASYNC_IOBDMA
|
* USE_ASYNC_IOBDMA
|
||||||
* Use asynchronous IO access to hardware. This uses Octeon's asynchronous
|
* Use asynchronous IO access to hardware. This uses Octeon's asynchronous
|
||||||
* IOBDMAs to issue IO accesses without stalling. Set this to zero
|
* IOBDMAs to issue IO accesses without stalling. Set this to zero
|
||||||
|
@ -50,7 +46,6 @@
|
||||||
|
|
||||||
#define OCTEON_ETHERNET_VERSION "1.9"
|
#define OCTEON_ETHERNET_VERSION "1.9"
|
||||||
|
|
||||||
#define USE_SKBUFFS_IN_HW 1
|
|
||||||
#ifdef CONFIG_NETFILTER
|
#ifdef CONFIG_NETFILTER
|
||||||
#define REUSE_SKBUFFS_WITHOUT_FREE 0
|
#define REUSE_SKBUFFS_WITHOUT_FREE 0
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -160,7 +160,7 @@ int cvm_oct_mem_fill_fpa(int pool, int size, int elements)
|
||||||
{
|
{
|
||||||
int freed;
|
int freed;
|
||||||
|
|
||||||
if (USE_SKBUFFS_IN_HW && pool == CVMX_FPA_PACKET_POOL)
|
if (pool == CVMX_FPA_PACKET_POOL)
|
||||||
freed = cvm_oct_fill_hw_skbuff(pool, size, elements);
|
freed = cvm_oct_fill_hw_skbuff(pool, size, elements);
|
||||||
else
|
else
|
||||||
freed = cvm_oct_fill_hw_memory(pool, size, elements);
|
freed = cvm_oct_fill_hw_memory(pool, size, elements);
|
||||||
|
@ -169,7 +169,7 @@ int cvm_oct_mem_fill_fpa(int pool, int size, int elements)
|
||||||
|
|
||||||
void cvm_oct_mem_empty_fpa(int pool, int size, int elements)
|
void cvm_oct_mem_empty_fpa(int pool, int size, int elements)
|
||||||
{
|
{
|
||||||
if (USE_SKBUFFS_IN_HW && pool == CVMX_FPA_PACKET_POOL)
|
if (pool == CVMX_FPA_PACKET_POOL)
|
||||||
cvm_oct_free_hw_skbuff(pool, size, elements);
|
cvm_oct_free_hw_skbuff(pool, size, elements);
|
||||||
else
|
else
|
||||||
cvm_oct_free_hw_memory(pool, size, elements);
|
cvm_oct_free_hw_memory(pool, size, elements);
|
||||||
|
|
|
@ -230,7 +230,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
|
||||||
}
|
}
|
||||||
rx_count++;
|
rx_count++;
|
||||||
|
|
||||||
skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1;
|
skb_in_hw = work->word2.s.bufs == 1;
|
||||||
if (likely(skb_in_hw)) {
|
if (likely(skb_in_hw)) {
|
||||||
skb = *pskb;
|
skb = *pskb;
|
||||||
prefetch(&skb->head);
|
prefetch(&skb->head);
|
||||||
|
@ -391,7 +391,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
|
||||||
* Check to see if the skbuff and work share the same
|
* Check to see if the skbuff and work share the same
|
||||||
* packet buffer.
|
* packet buffer.
|
||||||
*/
|
*/
|
||||||
if (USE_SKBUFFS_IN_HW && likely(packet_not_copied)) {
|
if (likely(packet_not_copied)) {
|
||||||
/*
|
/*
|
||||||
* This buffer needs to be replaced, increment
|
* This buffer needs to be replaced, increment
|
||||||
* the number of buffers we need to free by
|
* the number of buffers we need to free by
|
||||||
|
|
Loading…
Reference in New Issue