diff --git a/arch/arm64/configs/tici_defconfig b/arch/arm64/configs/tici_defconfig index a407fc11cc73..4964dc2e0048 100644 --- a/arch/arm64/configs/tici_defconfig +++ b/arch/arm64/configs/tici_defconfig @@ -1006,45 +1006,45 @@ CONFIG_NET_SCHED=y # # Queueing/Scheduling # -# CONFIG_NET_SCH_CBQ is not set +CONFIG_NET_SCH_CBQ=y CONFIG_NET_SCH_HTB=y -# CONFIG_NET_SCH_HFSC is not set +CONFIG_NET_SCH_HFSC=y CONFIG_NET_SCH_PRIO=y CONFIG_NET_SCH_MULTIQ=y -# CONFIG_NET_SCH_RED is not set -# CONFIG_NET_SCH_SFB is not set -# CONFIG_NET_SCH_SFQ is not set -# CONFIG_NET_SCH_TEQL is not set -# CONFIG_NET_SCH_TBF is not set -# CONFIG_NET_SCH_GRED is not set -# CONFIG_NET_SCH_DSMARK is not set +CONFIG_NET_SCH_RED=y +CONFIG_NET_SCH_SFB=y +CONFIG_NET_SCH_SFQ=y +CONFIG_NET_SCH_TEQL=y +CONFIG_NET_SCH_TBF=y +CONFIG_NET_SCH_GRED=y +CONFIG_NET_SCH_DSMARK=y CONFIG_NET_SCH_NETEM=y -# CONFIG_NET_SCH_DRR is not set -# CONFIG_NET_SCH_MQPRIO is not set -# CONFIG_NET_SCH_CHOKE is not set -# CONFIG_NET_SCH_QFQ is not set -# CONFIG_NET_SCH_CODEL is not set -# CONFIG_NET_SCH_FQ_CODEL is not set -# CONFIG_NET_SCH_FQ is not set -# CONFIG_NET_SCH_HHF is not set -# CONFIG_NET_SCH_PIE is not set +CONFIG_NET_SCH_DRR=y +CONFIG_NET_SCH_MQPRIO=y +CONFIG_NET_SCH_CHOKE=y +CONFIG_NET_SCH_QFQ=y +CONFIG_NET_SCH_CODEL=y +CONFIG_NET_SCH_FQ_CODEL=y +CONFIG_NET_SCH_FQ=y +CONFIG_NET_SCH_HHF=y +CONFIG_NET_SCH_PIE=y CONFIG_NET_SCH_INGRESS=y -# CONFIG_NET_SCH_PLUG is not set +CONFIG_NET_SCH_PLUG=y # # Classification # CONFIG_NET_CLS=y # CONFIG_NET_CLS_BASIC is not set -# CONFIG_NET_CLS_TCINDEX is not set -# CONFIG_NET_CLS_ROUTE4 is not set +CONFIG_NET_CLS_TCINDEX=y +CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_FW=y CONFIG_NET_CLS_U32=y -# CONFIG_CLS_U32_PERF is not set -# CONFIG_CLS_U32_MARK is not set +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y # CONFIG_NET_CLS_RSVP is not set # CONFIG_NET_CLS_RSVP6 is not set -# CONFIG_NET_CLS_FLOW is not set +CONFIG_NET_CLS_FLOW=y # CONFIG_NET_CLS_CGROUP is not set # CONFIG_NET_CLS_BPF is not set # CONFIG_NET_CLS_FLOWER is not set @@ -1094,7 +1094,7 @@ CONFIG_RMNET_DATA_DEBUG_PKT=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_CGROUP_NET_PRIO is not set +CONFIG_CGROUP_NET_PRIO=y # CONFIG_CGROUP_NET_CLASSID is not set CONFIG_NET_RX_BUSY_POLL=y CONFIG_BQL=y diff --git a/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_wmm.c b/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_wmm.c index 2e568294581f..1a2a8b2a38e1 100644 --- a/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_wmm.c +++ b/drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_wmm.c @@ -92,14 +92,14 @@ void wlan_hdd_process_peer_unauthorised_pause(hdd_adapter_t *adapter) /* Linux based UP -> AC Mapping */ const uint8_t hdd_linux_up_to_ac_map[HDD_WMM_UP_TO_AC_MAP_SIZE] = { - HDD_LINUX_AC_BE, - HDD_LINUX_AC_BK, - HDD_LINUX_AC_BK, - HDD_LINUX_AC_BE, - HDD_LINUX_AC_VI, - HDD_LINUX_AC_VI, - HDD_LINUX_AC_VO, - HDD_LINUX_AC_VO + HDD_LINUX_AC_BE, // 2 + HDD_LINUX_AC_BK, // 3 + HDD_LINUX_AC_BK, // 3 + HDD_LINUX_AC_BE, // 2 + HDD_LINUX_AC_VI, // 1 + HDD_LINUX_AC_VI, // 1 + HDD_LINUX_AC_VO, // 0 + HDD_LINUX_AC_VO // 0 }; #ifndef WLAN_MDM_CODE_REDUCTION_OPT @@ -1281,8 +1281,10 @@ QDF_STATUS hdd_wmm_init(hdd_adapter_t *pAdapter) /* DSCP to User Priority Lookup Table * By default use the 3 Precedence bits of DSCP as the User Priority */ - for (dscp = 0; dscp <= WLAN_HDD_MAX_DSCP; dscp++) + for (dscp = 0; dscp <= WLAN_HDD_MAX_DSCP; dscp++) { + hddWmmDscpToUpMap[dscp] = dscp >> 3; + } /* Special case for Expedited Forwarding (DSCP 46) */ hddWmmDscpToUpMap[46] = SME_QOS_WMM_UP_VO; @@ -1433,6 +1435,7 @@ void hdd_wmm_classify_pkt(hdd_adapter_t *adapter, /* case 1: Ethernet II IP packet */ ip_hdr = (struct iphdr *)&pkt[sizeof(eth_hdr->eth_II)]; tos = ip_hdr->tos; + printk(KERN_ALERT "hdd_wmm_classify_pkt: Ethernet II IP packet, tos: %d\n", tos); #ifdef HDD_WMM_DEBUG hdd_info("Ethernet II IP Packet, tos is %d", tos); #endif /* HDD_WMM_DEBUG */ @@ -1440,6 +1443,7 @@ void hdd_wmm_classify_pkt(hdd_adapter_t *adapter, } else if (eth_hdr->eth_II.h_proto == htons(ETH_P_IPV6)) { ipv6hdr = ipv6_hdr(skb); tos = ntohs(*(const __be16 *)ipv6hdr) >> 4; + printk(KERN_ALERT "hdd_wmm_classify_pkt: Ethernet II IPv6 Packet, tos: %d\n", tos); #ifdef HDD_WMM_DEBUG hdd_info("Ethernet II IPv6 Packet, tos is %d", tos); #endif /* HDD_WMM_DEBUG */ @@ -1451,11 +1455,13 @@ void hdd_wmm_classify_pkt(hdd_adapter_t *adapter, /* case 2: 802.3 LLC/SNAP IP packet */ ip_hdr = (struct iphdr *)&pkt[sizeof(eth_hdr->eth_8023)]; tos = ip_hdr->tos; + printk(KERN_ALERT "hdd_wmm_classify_pkt: 802.3 LLC/SNAP IP packet, tos: %d\n", tos); #ifdef HDD_WMM_DEBUG hdd_info("802.3 LLC/SNAP IP Packet, tos is %d", tos); #endif /* HDD_WMM_DEBUG */ } else if (eth_hdr->eth_II.h_proto == htons(ETH_P_8021Q)) { /* VLAN tagged */ + printk(KERN_ALERT "hdd_wmm_classify_pkt: VLAN tagged\n"); if (eth_hdr->eth_IIv.h_vlan_encapsulated_proto == htons(ETH_P_IP)) { @@ -1484,6 +1490,7 @@ void hdd_wmm_classify_pkt(hdd_adapter_t *adapter, (struct iphdr *) &pkt[sizeof(eth_hdr->eth_8023v)]; tos = ip_hdr->tos; + printk(KERN_ALERT "hdd_wmm_classify_pkt: 802.3 LLC/SNAP vlan-tagged IP packet, tos: %d\n", tos); #ifdef HDD_WMM_DEBUG hdd_info("802.3 LLC/SNAP VLAN tagged IP Packet, tos is %d", tos); @@ -1494,6 +1501,7 @@ void hdd_wmm_classify_pkt(hdd_adapter_t *adapter, hdd_warn("VLAN tagged Unhandled Protocol, using default tos"); #endif /* HDD_WMM_DEBUG */ tos = 0; + printk(KERN_ALERT "hdd_wmm_classify_pkt: VLAN tagged Unhandled Protocol, using default tos\n"); } } else { /* default */ @@ -1504,13 +1512,16 @@ void hdd_wmm_classify_pkt(hdd_adapter_t *adapter, if (eth_hdr->eth_II.h_proto == htons(HDD_ETHERTYPE_802_1_X)) { tos = 0xC0; + printk(KERN_ALERT "hdd_wmm_classify_pkt: 802.1x packet, tos: %d\n", tos); *is_eapol = true; } else tos = 0; + printk(KERN_ALERT "hdd_wmm_classify_pkt: Unhandled Protocol, using default tos\n"); } dscp = (tos >> 2) & 0x3f; *user_pri = adapter->hddWmmDscpToUpMap[dscp]; + printk(KERN_ALERT "hdd_wmm_classify_pkt: dscp: %d, user_pri: %d\n", dscp, *user_pri); #ifdef HDD_WMM_DEBUG hdd_debug("tos is %d, dscp is %d, up is %d", tos, dscp, *user_pri); @@ -1592,6 +1603,7 @@ uint16_t hdd_hostapd_select_queue(struct net_device *dev, struct sk_buff *skb skb->priority = up; queueIndex = hdd_get_queue_index(skb->priority, is_eapol); + return queueIndex; } @@ -1607,6 +1619,7 @@ uint16_t hdd_hostapd_select_queue(struct net_device *dev, struct sk_buff *skb uint16_t hdd_wmm_select_queue(struct net_device *dev, struct sk_buff *skb) { sme_QosWmmUpType up = SME_QOS_WMM_UP_BE; + printk(KERN_ALERT "wlan_hdd_wmm: up: %d\n", up); uint16_t queueIndex; hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev); bool is_crtical = false; @@ -1616,6 +1629,7 @@ uint16_t hdd_wmm_select_queue(struct net_device *dev, struct sk_buff *skb) status = wlan_hdd_validate_context(hdd_ctx); if (status != 0) { skb->priority = SME_QOS_WMM_UP_BE; + printk(KERN_ALERT "wlan_hdd_wmm: status: %d\n", status); return HDD_LINUX_AC_BE; } @@ -1629,6 +1643,7 @@ uint16_t hdd_wmm_select_queue(struct net_device *dev, struct sk_buff *skb) } spin_unlock_bh(&adapter->pause_map_lock); skb->priority = up; + printk(KERN_ALERT "wlan_hdd_wmm: up2: %d\n", up); queueIndex = hdd_get_queue_index(skb->priority, is_crtical); return queueIndex; @@ -1898,6 +1913,7 @@ QDF_STATUS hdd_wmm_assoc(hdd_adapter_t *pAdapter, status = sme_update_dsc_pto_up_mapping(pHddCtx->hHal, pAdapter->hddWmmDscpToUpMap, pAdapter->sessionId); + printk(KERN_ALERT "dscp to up mapping updated, status: %d\n", status); if (!QDF_IS_STATUS_SUCCESS(status)) hdd_wmm_init(pAdapter); diff --git a/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c b/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c index d3c16621870c..0c25fb03da9e 100644 --- a/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c +++ b/drivers/staging/qcacld-3.0/core/sme/src/common/sme_api.c @@ -13947,6 +13947,7 @@ QDF_STATUS sme_update_dsc_pto_up_mapping(tHalHandle hHal, FL("User Priority %d isn't used"), i); break; } + printk(KERN_ALERT "DSCP %d is mapped to UP %d\n", j, i); dscpmapping[j] = i; } } diff --git a/net/core/dev.c b/net/core/dev.c index c6a8932a69d3..b1bb58779f17 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3196,6 +3196,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, rc = NET_XMIT_DROP; } else if ((q->flags & TCQ_F_CAN_BYPASS) && !qdisc_qlen(q) && qdisc_run_begin(q)) { + printk(KERN_ALERT "TCQ_F_CAN_BYPASS, skb->queue_mapping: %d\n", skb->queue_mapping); /* * This is a work-conserving queue; there are no old skbs * waiting to be sent out; and the qdisc is not running - @@ -3215,7 +3216,10 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q, rc = NET_XMIT_SUCCESS; } else { + printk(KERN_ALERT "sk_buff prio4: %d\n", skb->priority, __LINE__, __func__); rc = q->enqueue(skb, q, &to_free) & NET_XMIT_MASK; + printk(KERN_ALERT "enqueue done!\n", __LINE__, __func__); + if (qdisc_run_begin(q)) { if (unlikely(contended)) { spin_unlock(&q->busylock); @@ -3354,23 +3358,35 @@ static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb) static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb) { + printk(KERN_ALERT "__netdev 1 prio: %d", skb->priority); struct sock *sk = skb->sk; + printk(KERN_ALERT "__netdev 2 prio: %d", skb->priority); int queue_index = sk_tx_queue_get(sk); + printk(KERN_ALERT "__netdev 3 prio: %d", skb->priority); if (queue_index < 0 || skb->ooo_okay || queue_index >= dev->real_num_tx_queues) { + printk(KERN_ALERT "__netdev 4 prio: %d", skb->priority); int new_index = get_xps_queue(dev, skb); - if (new_index < 0) + printk(KERN_ALERT "__netdev 5 prio: %d", skb->priority); + if (new_index < 0) { new_index = skb_tx_hash(dev, skb); + printk(KERN_ALERT "__netdev 6 prio: %d", skb->priority); + } if (queue_index != new_index && sk && sk_fullsock(sk) && - rcu_access_pointer(sk->sk_dst_cache)) + rcu_access_pointer(sk->sk_dst_cache)) { + printk(KERN_ALERT "__netdev 7 prio: %d", skb->priority); + sk_tx_queue_set(sk, new_index); + printk(KERN_ALERT "__netdev 8 prio: %d", skb->priority); + } queue_index = new_index; } + printk(KERN_ALERT "__netdev 9 prio: %d", skb->priority); return queue_index; } @@ -3379,6 +3395,7 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev, void *accel_priv) { int queue_index = 0; + printk(KERN_ALERT "netdev 1 prio: %d", skb->priority); #ifdef CONFIG_XPS u32 sender_cpu = skb->sender_cpu - 1; @@ -3386,20 +3403,30 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev, if (sender_cpu >= (u32)NR_CPUS) skb->sender_cpu = raw_smp_processor_id() + 1; #endif + printk(KERN_ALERT "netdev 2 prio: %d", skb->priority); if (dev->real_num_tx_queues != 1) { const struct net_device_ops *ops = dev->netdev_ops; - if (ops->ndo_select_queue) + if (ops->ndo_select_queue) { queue_index = ops->ndo_select_queue(dev, skb, accel_priv, __netdev_pick_tx); - else + printk(KERN_ALERT "netdev 3 prio: %d", skb->priority); + } + else { queue_index = __netdev_pick_tx(dev, skb); + printk(KERN_ALERT "netdev 4 prio: %d", skb->priority); - if (!accel_priv) + } + + if (!accel_priv) { queue_index = netdev_cap_txqueue(dev, queue_index); + printk(KERN_ALERT "netdev 5 prio: %d", skb->priority); + } } + printk(KERN_ALERT "netdev 6 prio: %d", skb->priority); skb_set_queue_mapping(skb, queue_index); + printk(KERN_ALERT "netdev 7 prio: %d", skb->priority); return netdev_get_tx_queue(dev, queue_index); } @@ -3434,6 +3461,7 @@ static int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv, bool skb_list) { struct net_device *dev = skb->dev; + printk(KERN_ALERT "net device name: %s\n", dev->name); struct netdev_queue *txq; struct Qdisc *q; int rc = -ENOMEM; @@ -3448,14 +3476,20 @@ static int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv, */ rcu_read_lock_bh(); + printk(KERN_ALERT "sk_buff prio1: %d\n", skb->priority, __LINE__, __func__); + skb_update_prio(skb); + printk(KERN_ALERT "sk_buff prio2: %d\n", skb->priority, __LINE__, __func__); + qdisc_pkt_len_init(skb); + printk(KERN_ALERT "sk_buff prio2.1: %d\n", skb->priority, __LINE__, __func__); #ifdef CONFIG_NET_CLS_ACT skb->tc_verd = SET_TC_AT(skb->tc_verd, AT_EGRESS); # ifdef CONFIG_NET_EGRESS if (static_key_false(&egress_needed)) { skb = sch_handle_egress(skb, &rc, dev); + printk(KERN_ALERT "sk_buff prio2.1: %d\n", skb->priority, __LINE__, __func__); if (!skb) goto out; } @@ -3464,19 +3498,31 @@ static int __dev_queue_xmit(struct sk_buff *skb, void *accel_priv, /* If device/qdisc don't need skb->dst, release it right now while * its hot in this cpu cache. */ - if (dev->priv_flags & IFF_XMIT_DST_RELEASE) + printk(KERN_ALERT "sk_buff prio2.1: %d\n", skb->priority, __LINE__, __func__); + if (dev->priv_flags & IFF_XMIT_DST_RELEASE) { + printk(KERN_ALERT "here1\n"); skb_dst_drop(skb); - else + } + else { + printk(KERN_ALERT "here2\n"); skb_dst_force(skb); + } + printk(KERN_ALERT "sk_buff prio2.11: %d\n", skb->priority, __LINE__, __func__); txq = netdev_pick_tx(dev, skb, accel_priv); + printk(KERN_ALERT "sk_buff prio2.12: %d\n", skb->priority, __LINE__, __func__); q = rcu_dereference_bh(txq->qdisc); + printk(KERN_ALERT "sk_buff prio2.1: %d\n", skb->priority, __LINE__, __func__); trace_net_dev_queue(skb); + printk(KERN_ALERT "sk_buff prio2.1: %d\n", skb->priority, __LINE__, __func__); if (q->enqueue) { + printk(KERN_ALERT "has enqueue\n"); + printk(KERN_ALERT "sk_buff prio3: %d\n", skb->priority, __LINE__, __func__); rc = __dev_xmit_skb(skb, q, dev, txq); goto out; } + printk(KERN_ALERT "sk_buff prio3.5: %d\n", skb->priority, __LINE__, __func__); /* The device has no queue. Common case for software devices: loopback, all the sorts of tunnels... diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 9eb0aee9105b..f11c2cfab424 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c @@ -145,6 +145,7 @@ u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata, u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) { + printk("ieee80211_select_queue\n"); struct ieee80211_local *local = sdata->local; struct sta_info *sta = NULL; const u8 *ra = NULL; diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 230f7e918d99..42930574218e 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -35,6 +35,7 @@ struct prio_sched_data { static struct Qdisc * prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) { + printk(KERN_ALERT "\n"); struct prio_sched_data *q = qdisc_priv(sch); u32 band = skb->priority; struct tcf_result res; @@ -42,9 +43,11 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) int err; *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; + printk(KERN_ALERT "prio_classify: band=%d, TC_H_MAJ=%d, sch->handle=%d\n", band, TC_H_MAJ(band), sch->handle); if (TC_H_MAJ(skb->priority) != sch->handle) { fl = rcu_dereference_bh(q->filter_list); err = tc_classify(skb, fl, &res, false); + printk(KERN_ALERT "prio_classify: err=%d, res.classid=%d\n", err, res.classid); #ifdef CONFIG_NET_CLS_ACT switch (err) { case TC_ACT_STOLEN: @@ -57,13 +60,19 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) if (!fl || err < 0) { if (TC_H_MAJ(band)) band = 0; + printk(KERN_ALERT "prio_classify: queue idx: %d\n", q->prio2band[band & TC_PRIO_MAX]); return q->queues[q->prio2band[band & TC_PRIO_MAX]]; } band = res.classid; + printk(KERN_ALERT "set band to %d\n", band); } + printk(KERN_ALERT "final band: %d\n", band); band = TC_H_MIN(band) - 1; - if (band >= q->bands) + if (band >= q->bands) { + printk(KERN_ALERT "band >= q->bands, returning: %d\n", q->prio2band[0]); return q->queues[q->prio2band[0]]; + } + return q->queues[band]; }