diff options
author | Sachin Saxena <sachin.saxena@freescale.com> | 2013-04-12 09:38:48 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-16 22:41:04 (GMT) |
commit | 8507cb00e53316b71d6acc2bc1616c190c487e36 (patch) | |
tree | 7b7589638a295f0c4f5af3023a17210726968988 /net/core | |
parent | 2559f18bc5045d73e120556d4127496407125a25 (diff) | |
download | linux-fsl-qoriq-8507cb00e53316b71d6acc2bc1616c190c487e36.tar.xz |
ASF QoS Configuration intergrated with TC module.
Signed-off-by: Sachin Saxena <sachin.saxena@freescale.com>
CQ ID : ENGR00253307
Change-Id: I7441da8faab12440b51604e6c1d00bccc17a37e5
Reviewed-on: http://git.am.freescale.net:8181/1347
Reviewed-by: Gupta Rajan-B15745 <rajan.gupta@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 68dd7f8..522357f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2299,6 +2299,17 @@ static inline int skb_needs_linearize(struct sk_buff *skb, !(features & NETIF_F_SG))); } +#ifdef CONFIG_ASF_EGRESS_QOS +/* Linux QoS hook to tranfer all packet to ASF QoS */ +static asf_qos_fn_hook *asf_qos_fn; + +void asf_qos_fn_register(asf_qos_fn_hook *fn) +{ + asf_qos_fn = fn; +} +EXPORT_SYMBOL(asf_qos_fn_register); +#endif + int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, struct netdev_queue *txq) { @@ -2617,24 +2628,6 @@ static void skb_update_prio(struct sk_buff *skb) static DEFINE_PER_CPU(int, xmit_recursion); #define RECURSION_LIMIT 10 -#ifdef CONFIG_ASF_EGRESS_QOS -/* Linux QoS hook to tranfer all packet to ASF QoS */ -static asf_qos_fn_hook *asf_qos_fn; - -void asf_qos_fn_register(asf_qos_fn_hook *fn) -{ - asf_qos_fn = fn; -} -EXPORT_SYMBOL(asf_qos_fn_register); - -void asf_qos_fn_unregister(void) -{ - asf_qos_fn = NULL; -} -EXPORT_SYMBOL(asf_qos_fn_unregister); -#endif - - /** * dev_loopback_xmit - loop back @skb * @skb: buffer to transmit @@ -2691,6 +2684,13 @@ int dev_queue_xmit(struct sk_buff *skb) skb_update_prio(skb); +#ifdef CONFIG_ASF_EGRESS_QOS + if (asf_qos_fn) { + rc = asf_qos_fn(skb); + if (!rc) + goto out; + } +#endif txq = netdev_pick_tx(dev, skb); #ifdef CONFIG_AS_FASTPATH if ((dev->features & NETIF_F_HW_QDISC) && @@ -2705,13 +2705,6 @@ int dev_queue_xmit(struct sk_buff *skb) skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_EGRESS); #endif -#ifdef CONFIG_ASF_EGRESS_QOS - if (asf_qos_fn) { - rc = asf_qos_fn(skb); - goto out; - } -#endif - trace_net_dev_queue(skb); if (q->enqueue) { rc = __dev_xmit_skb(skb, q, dev, txq); |