net: hns3: remove unused field 'io_base' in struct hns3_enet_ring
[linux-2.6-microblaze.git] / drivers / net / ethernet / hisilicon / hns3 / hns3_enet.c
index c2ea034..1d66f84 100644 (file)
@@ -21,6 +21,7 @@
 #include <net/pkt_cls.h>
 #include <net/tcp.h>
 #include <net/vxlan.h>
+#include <net/geneve.h>
 
 #include "hnae3.h"
 #include "hns3_enet.h"
@@ -780,7 +781,7 @@ static int hns3_get_l4_protocol(struct sk_buff *skb, u8 *ol4_proto,
  * and it is udp packet, which has a dest port as the IANA assigned.
  * the hardware is expected to do the checksum offload, but the
  * hardware will not do the checksum offload when udp dest port is
- * 4789.
+ * 4789 or 6081.
  */
 static bool hns3_tunnel_csum_bug(struct sk_buff *skb)
 {
@@ -789,7 +790,8 @@ static bool hns3_tunnel_csum_bug(struct sk_buff *skb)
        l4.hdr = skb_transport_header(skb);
 
        if (!(!skb->encapsulation &&
-             l4.udp->dest == htons(IANA_VXLAN_UDP_PORT)))
+             (l4.udp->dest == htons(IANA_VXLAN_UDP_PORT) ||
+             l4.udp->dest == htons(GENEVE_UDP_PORT))))
                return false;
 
        skb_checksum_help(skb);
@@ -3091,10 +3093,7 @@ static int hns3_handle_rx_bd(struct hns3_enet_ring *ring)
         * lines. In such a case, single fetch would suffice to cache in the
         * relevant part of the header.
         */
-       prefetch(ring->va);
-#if L1_CACHE_BYTES < 128
-       prefetch(ring->va + L1_CACHE_BYTES);
-#endif
+       net_prefetch(ring->va);
 
        if (!skb) {
                ret = hns3_alloc_skb(ring, length, ring->va);
@@ -3671,12 +3670,10 @@ static void hns3_ring_get_cfg(struct hnae3_queue *q, struct hns3_nic_priv *priv,
                ring = &priv->ring[q->tqp_index];
                desc_num = priv->ae_handle->kinfo.num_tx_desc;
                ring->queue_index = q->tqp_index;
-               ring->io_base = (u8 __iomem *)q->io_base + HNS3_TX_REG_OFFSET;
        } else {
                ring = &priv->ring[q->tqp_index + queue_num];
                desc_num = priv->ae_handle->kinfo.num_rx_desc;
                ring->queue_index = q->tqp_index;
-               ring->io_base = q->io_base;
        }
 
        hnae3_set_bit(ring->flag, HNAE3_RING_TYPE_B, ring_type);