staging: octeon-ethernet: eliminate USE_SKBUFFS_IN_HW define
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sat, 4 Apr 2015 19:51:17 +0000 (22:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Apr 2015 15:04:36 +0000 (17:04 +0200)
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>
drivers/staging/octeon/ethernet-defines.h
drivers/staging/octeon/ethernet-mem.c
drivers/staging/octeon/ethernet-rx.c

index a837d895c1a5a9d4a9449077200740c56325966f..b39bb3ddab1fafdbfdef0e24dad46223126e4d80 100644 (file)
 
 /*
  * 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 asynchronous IO access to hardware. This uses Octeon's asynchronous
  *      IOBDMAs to issue IO accesses without stalling. Set this to zero
@@ -50,7 +46,6 @@
 
 #define OCTEON_ETHERNET_VERSION "1.9"
 
-#define USE_SKBUFFS_IN_HW           1
 #ifdef CONFIG_NETFILTER
 #define REUSE_SKBUFFS_WITHOUT_FREE  0
 #else
index 964da860f4c45f9af49df0356415311146cb4248..ea1232cd1a33d2a90ed3a7c5af0f4a82eacd114d 100644 (file)
@@ -160,7 +160,7 @@ int cvm_oct_mem_fill_fpa(int pool, int size, int elements)
 {
        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);
        else
                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)
 {
-       if (USE_SKBUFFS_IN_HW && pool == CVMX_FPA_PACKET_POOL)
+       if (pool == CVMX_FPA_PACKET_POOL)
                cvm_oct_free_hw_skbuff(pool, size, elements);
        else
                cvm_oct_free_hw_memory(pool, size, elements);
index 8d40986f60efd1302e8b37303ebdaa2f07cb5963..91043ccc61db3dd82304b07dc28bbe7b709242b9 100644 (file)
@@ -230,7 +230,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
                }
                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)) {
                        skb = *pskb;
                        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
                 * packet buffer.
                 */
-               if (USE_SKBUFFS_IN_HW && likely(packet_not_copied)) {
+               if (likely(packet_not_copied)) {
                        /*
                         * This buffer needs to be replaced, increment
                         * the number of buffers we need to free by