|
@@ -1849,6 +1849,7 @@ liquidio_push_packet(u32 octeon_id,
|
|
struct sk_buff *skb = (struct sk_buff *)skbuff;
|
|
struct sk_buff *skb = (struct sk_buff *)skbuff;
|
|
struct skb_shared_hwtstamps *shhwtstamps;
|
|
struct skb_shared_hwtstamps *shhwtstamps;
|
|
u64 ns;
|
|
u64 ns;
|
|
|
|
+ u16 vtag = 0;
|
|
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);
|
|
@@ -1925,6 +1926,16 @@ liquidio_push_packet(u32 octeon_id,
|
|
else
|
|
else
|
|
skb->ip_summed = CHECKSUM_NONE;
|
|
skb->ip_summed = CHECKSUM_NONE;
|
|
|
|
|
|
|
|
+ /* inbound VLAN tag */
|
|
|
|
+ if ((netdev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
|
|
|
|
+ (rh->r_dh.vlan != 0)) {
|
|
|
|
+ u16 vid = rh->r_dh.vlan;
|
|
|
|
+ u16 priority = rh->r_dh.priority;
|
|
|
|
+
|
|
|
|
+ vtag = priority << 13 | vid;
|
|
|
|
+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vtag);
|
|
|
|
+ }
|
|
|
|
+
|
|
packet_was_received = napi_gro_receive(napi, skb) != GRO_DROP;
|
|
packet_was_received = napi_gro_receive(napi, skb) != GRO_DROP;
|
|
|
|
|
|
if (packet_was_received) {
|
|
if (packet_was_received) {
|
|
@@ -2900,6 +2911,11 @@ static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|
tx_info->s.gso_size = skb_shinfo(skb)->gso_size;
|
|
tx_info->s.gso_size = skb_shinfo(skb)->gso_size;
|
|
tx_info->s.gso_segs = skb_shinfo(skb)->gso_segs;
|
|
tx_info->s.gso_segs = skb_shinfo(skb)->gso_segs;
|
|
}
|
|
}
|
|
|
|
+ /* HW insert VLAN tag */
|
|
|
|
+ if (skb_vlan_tag_present(skb)) {
|
|
|
|
+ irh->priority = skb_vlan_tag_get(skb) >> 13;
|
|
|
|
+ irh->vlan = skb_vlan_tag_get(skb) & 0xfff;
|
|
|
|
+ }
|
|
|
|
|
|
xmit_more = skb->xmit_more;
|
|
xmit_more = skb->xmit_more;
|
|
|
|
|
|
@@ -3301,11 +3317,17 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
|
|
| NETIF_F_LRO;
|
|
| NETIF_F_LRO;
|
|
netif_set_gso_max_size(netdev, OCTNIC_GSO_MAX_SIZE);
|
|
netif_set_gso_max_size(netdev, OCTNIC_GSO_MAX_SIZE);
|
|
|
|
|
|
- netdev->features = (lio->dev_capability & ~NETIF_F_LRO);
|
|
|
|
-
|
|
|
|
netdev->vlan_features = lio->dev_capability;
|
|
netdev->vlan_features = lio->dev_capability;
|
|
|
|
+ /* Add any unchangeable hw features */
|
|
|
|
+ lio->dev_capability |= NETIF_F_HW_VLAN_CTAG_RX |
|
|
|
|
+ NETIF_F_HW_VLAN_CTAG_TX;
|
|
|
|
+
|
|
|
|
+ netdev->features = (lio->dev_capability & ~NETIF_F_LRO);
|
|
|
|
|
|
netdev->hw_features = lio->dev_capability;
|
|
netdev->hw_features = lio->dev_capability;
|
|
|
|
+ /*HW_VLAN_RX and HW_VLAN_FILTER is always on*/
|
|
|
|
+ netdev->hw_features = netdev->hw_features &
|
|
|
|
+ ~NETIF_F_HW_VLAN_CTAG_RX;
|
|
|
|
|
|
/* Point to the properties for octeon device to which this
|
|
/* Point to the properties for octeon device to which this
|
|
* interface belongs.
|
|
* interface belongs.
|