mirror of
https://github.com/breeze303/nss-packages.git
synced 2025-12-16 08:44:52 +00:00
qca-nss-clients: fix old debug warnings
This commit is contained in:
parent
2c9ffba363
commit
5656e7a050
@ -35,7 +35,7 @@
|
||||
struct nss_mirred_tcf *act;
|
||||
@@ -239,8 +243,13 @@ static int nss_mirred_init(struct net *n
|
||||
}
|
||||
|
||||
|
||||
if (!ret) {
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))
|
||||
ret = tcf_idr_create(tn, index, est, tc_act, &nss_mirred_act_ops,
|
||||
@ -100,7 +100,7 @@
|
||||
struct nss_qdisc *nq = qdisc_priv(sch);
|
||||
unsigned int ret;
|
||||
+ struct sk_buff *to_free = qdisc_peek_head(sch);
|
||||
|
||||
|
||||
if (!nq->is_virtual) {
|
||||
- ret = __qdisc_queue_drop_head(sch, &sch->q);
|
||||
+ ret = __qdisc_queue_drop_head(sch, &sch->q, &to_free);
|
||||
@ -113,11 +113,11 @@
|
||||
+ ret = __qdisc_queue_drop_head(sch, &sch->q, &to_free);
|
||||
spin_unlock_bh(&nq->bounce_protection_lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -1209,10 +1210,10 @@ static bool nss_qdisc_iterate_fl(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0))
|
||||
- status = tc_classify(skb, tcf, &res, false);
|
||||
-#else
|
||||
@ -128,19 +128,10 @@
|
||||
#endif
|
||||
if ((status == TC_ACT_STOLEN) || (status == TC_ACT_QUEUED)) {
|
||||
return 1;
|
||||
@@ -2188,6 +2189,8 @@ int __nss_qdisc_init(struct Qdisc *sch,
|
||||
* This is to prevent mixing NSS and PPE qdisc with linux qdisc.
|
||||
*/
|
||||
if ((parent != TC_H_ROOT) && (root->ops->owner != THIS_MODULE)) {
|
||||
+ nss_qdisc_warning("parent (%d) and TC_H_ROOT (%d))", parent, TC_H_ROOT);
|
||||
+ nss_qdisc_warning("root->ops->owner (%px) and THIS_MODULE (%px))", root->ops->owner , THIS_MODULE);
|
||||
nss_qdisc_warning("NSS qdisc %px (type %d) used along with non-nss qdiscs,"
|
||||
" or the interface is currently down", nq->qdisc, nq->type);
|
||||
}
|
||||
--- a/nss_qdisc/nss_wrr.c
|
||||
+++ b/nss_qdisc/nss_wrr.c
|
||||
@@ -229,7 +229,7 @@ static int nss_wrr_ppe_change_class(stru
|
||||
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0))
|
||||
static int nss_wrr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
||||
- struct nlattr **tca, unsigned long *arg)
|
||||
@ -151,7 +142,7 @@
|
||||
@@ -400,7 +400,11 @@ failure:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0))
|
||||
+static int nss_wrr_delete_class(struct Qdisc *sch, unsigned long arg, struct netlink_ext_ack *extack)
|
||||
+#else
|
||||
|
||||
@ -139,7 +139,16 @@
|
||||
|
||||
--- a/nss_qdisc/nss_qdisc.c
|
||||
+++ b/nss_qdisc/nss_qdisc.c
|
||||
@@ -2608,12 +2608,14 @@ int nss_qdisc_init(struct Qdisc *sch, st
|
||||
@@ -2189,7 +2189,7 @@ int __nss_qdisc_init(struct Qdisc *sch,
|
||||
* This is to prevent mixing NSS and PPE qdisc with linux qdisc.
|
||||
*/
|
||||
if ((parent != TC_H_ROOT) && (root->ops->owner != THIS_MODULE)) {
|
||||
- nss_qdisc_warning("NSS qdisc %px (type %d) used along with non-nss qdiscs,"
|
||||
+ nss_qdisc_info("NSS qdisc %px (type %d) used along with non-nss qdiscs,"
|
||||
" or the interface is currently down", nq->qdisc, nq->type);
|
||||
}
|
||||
|
||||
@@ -2606,12 +2606,14 @@ int nss_qdisc_init(struct Qdisc *sch, st
|
||||
* Wrapper around gnet_stats_copy_basic()
|
||||
*/
|
||||
int nss_qdisc_gnet_stats_copy_basic(struct Qdisc *sch, struct gnet_dump *d,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user