|
@@ -2263,6 +2263,7 @@ liquidio_push_packet(u32 octeon_id __attribute__((unused)),
|
|
struct skb_shared_hwtstamps *shhwtstamps;
|
|
struct skb_shared_hwtstamps *shhwtstamps;
|
|
u64 ns;
|
|
u64 ns;
|
|
u16 vtag = 0;
|
|
u16 vtag = 0;
|
|
|
|
+ u32 r_dh_off;
|
|
struct net_device *netdev = (struct net_device *)arg;
|
|
struct net_device *netdev = (struct net_device *)arg;
|
|
struct octeon_droq *droq = container_of(param, struct octeon_droq,
|
|
struct octeon_droq *droq = container_of(param, struct octeon_droq,
|
|
napi);
|
|
napi);
|
|
@@ -2308,6 +2309,8 @@ liquidio_push_packet(u32 octeon_id __attribute__((unused)),
|
|
put_page(pg_info->page);
|
|
put_page(pg_info->page);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ r_dh_off = (rh->r_dh.len - 1) * BYTES_PER_DHLEN_UNIT;
|
|
|
|
+
|
|
if (((oct->chip_id == OCTEON_CN66XX) ||
|
|
if (((oct->chip_id == OCTEON_CN66XX) ||
|
|
(oct->chip_id == OCTEON_CN68XX)) &&
|
|
(oct->chip_id == OCTEON_CN68XX)) &&
|
|
ptp_enable) {
|
|
ptp_enable) {
|
|
@@ -2320,16 +2323,27 @@ liquidio_push_packet(u32 octeon_id __attribute__((unused)),
|
|
/* Nanoseconds are in the first 64-bits
|
|
/* Nanoseconds are in the first 64-bits
|
|
* of the packet.
|
|
* of the packet.
|
|
*/
|
|
*/
|
|
- memcpy(&ns, (skb->data), sizeof(ns));
|
|
|
|
|
|
+ memcpy(&ns, (skb->data + r_dh_off),
|
|
|
|
+ sizeof(ns));
|
|
|
|
+ r_dh_off -= BYTES_PER_DHLEN_UNIT;
|
|
shhwtstamps = skb_hwtstamps(skb);
|
|
shhwtstamps = skb_hwtstamps(skb);
|
|
shhwtstamps->hwtstamp =
|
|
shhwtstamps->hwtstamp =
|
|
ns_to_ktime(ns +
|
|
ns_to_ktime(ns +
|
|
lio->ptp_adjust);
|
|
lio->ptp_adjust);
|
|
}
|
|
}
|
|
- skb_pull(skb, sizeof(ns));
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (rh->r_dh.has_hash) {
|
|
|
|
+ __be32 *hash_be = (__be32 *)(skb->data + r_dh_off);
|
|
|
|
+ u32 hash = be32_to_cpu(*hash_be);
|
|
|
|
+
|
|
|
|
+ skb_set_hash(skb, hash, PKT_HASH_TYPE_L4);
|
|
|
|
+ r_dh_off -= BYTES_PER_DHLEN_UNIT;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ skb_pull(skb, rh->r_dh.len * BYTES_PER_DHLEN_UNIT);
|
|
|
|
+
|
|
skb->protocol = eth_type_trans(skb, skb->dev);
|
|
skb->protocol = eth_type_trans(skb, skb->dev);
|
|
if ((netdev->features & NETIF_F_RXCSUM) &&
|
|
if ((netdev->features & NETIF_F_RXCSUM) &&
|
|
(((rh->r_dh.encap_on) &&
|
|
(((rh->r_dh.encap_on) &&
|