Skip to content

Commit

Permalink
liquidio: Moved common function skb_iq to to octeon_network.h
Browse files Browse the repository at this point in the history
Moving common function skb_iq to to octeon_network.h

Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com>
Acked-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Intiyaz Basha authored and David S. Miller committed Mar 25, 2018
1 parent 5f8baa7 commit 5da052a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
10 changes: 0 additions & 10 deletions drivers/net/ethernet/cavium/liquidio/lio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1692,16 +1692,6 @@ static int octeon_pci_os_setup(struct octeon_device *oct)
return 0;
}

static inline int skb_iq(struct lio *lio, struct sk_buff *skb)
{
int q = 0;

if (netif_is_multiqueue(lio->netdev))
q = skb->queue_mapping % lio->linfo.num_txpciq;

return q;
}

/**
* \brief Check Tx queue state for a given network buffer
* @param lio per-network private data
Expand Down
10 changes: 0 additions & 10 deletions drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,16 +993,6 @@ static int octeon_pci_os_setup(struct octeon_device *oct)
return 0;
}

static int skb_iq(struct lio *lio, struct sk_buff *skb)
{
int q = 0;

if (netif_is_multiqueue(lio->netdev))
q = skb->queue_mapping % lio->linfo.num_txpciq;

return q;
}

/**
* \brief Check Tx queue state for a given network buffer
* @param lio per-network private data
Expand Down
10 changes: 10 additions & 0 deletions drivers/net/ethernet/cavium/liquidio/octeon_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -566,4 +566,14 @@ static inline void txqs_start(struct net_device *netdev)
}
}

static inline int skb_iq(struct lio *lio, struct sk_buff *skb)
{
int q = 0;

if (netif_is_multiqueue(lio->netdev))
q = skb->queue_mapping % lio->linfo.num_txpciq;

return q;
}

#endif

0 comments on commit 5da052a

Please sign in to comment.