aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_api.c52
-rw-r--r--net/sched/cls_api.c14
-rw-r--r--net/sched/sch_api.c44
3 files changed, 55 insertions, 55 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index e3d2c78cb52c..102761d294cb 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -644,7 +644,7 @@ errout:
644} 644}
645 645
646static int 646static int
647tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, 647tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 portid, u32 seq,
648 u16 flags, int event, int bind, int ref) 648 u16 flags, int event, int bind, int ref)
649{ 649{
650 struct tcamsg *t; 650 struct tcamsg *t;
@@ -652,7 +652,7 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
652 unsigned char *b = skb_tail_pointer(skb); 652 unsigned char *b = skb_tail_pointer(skb);
653 struct nlattr *nest; 653 struct nlattr *nest;
654 654
655 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*t), flags); 655 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*t), flags);
656 if (!nlh) 656 if (!nlh)
657 goto out_nlmsg_trim; 657 goto out_nlmsg_trim;
658 t = nlmsg_data(nlh); 658 t = nlmsg_data(nlh);
@@ -678,7 +678,7 @@ out_nlmsg_trim:
678} 678}
679 679
680static int 680static int
681act_get_notify(struct net *net, u32 pid, struct nlmsghdr *n, 681act_get_notify(struct net *net, u32 portid, struct nlmsghdr *n,
682 struct tc_action *a, int event) 682 struct tc_action *a, int event)
683{ 683{
684 struct sk_buff *skb; 684 struct sk_buff *skb;
@@ -686,16 +686,16 @@ act_get_notify(struct net *net, u32 pid, struct nlmsghdr *n,
686 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 686 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
687 if (!skb) 687 if (!skb)
688 return -ENOBUFS; 688 return -ENOBUFS;
689 if (tca_get_fill(skb, a, pid, n->nlmsg_seq, 0, event, 0, 0) <= 0) { 689 if (tca_get_fill(skb, a, portid, n->nlmsg_seq, 0, event, 0, 0) <= 0) {
690 kfree_skb(skb); 690 kfree_skb(skb);
691 return -EINVAL; 691 return -EINVAL;
692 } 692 }
693 693
694 return rtnl_unicast(skb, net, pid); 694 return rtnl_unicast(skb, net, portid);
695} 695}
696 696
697static struct tc_action * 697static struct tc_action *
698tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 pid) 698tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 portid)
699{ 699{
700 struct nlattr *tb[TCA_ACT_MAX + 1]; 700 struct nlattr *tb[TCA_ACT_MAX + 1];
701 struct tc_action *a; 701 struct tc_action *a;
@@ -762,7 +762,7 @@ static struct tc_action *create_a(int i)
762} 762}
763 763
764static int tca_action_flush(struct net *net, struct nlattr *nla, 764static int tca_action_flush(struct net *net, struct nlattr *nla,
765 struct nlmsghdr *n, u32 pid) 765 struct nlmsghdr *n, u32 portid)
766{ 766{
767 struct sk_buff *skb; 767 struct sk_buff *skb;
768 unsigned char *b; 768 unsigned char *b;
@@ -799,7 +799,7 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
799 if (a->ops == NULL) 799 if (a->ops == NULL)
800 goto err_out; 800 goto err_out;
801 801
802 nlh = nlmsg_put(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t), 0); 802 nlh = nlmsg_put(skb, portid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t), 0);
803 if (!nlh) 803 if (!nlh)
804 goto out_module_put; 804 goto out_module_put;
805 t = nlmsg_data(nlh); 805 t = nlmsg_data(nlh);
@@ -823,7 +823,7 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
823 nlh->nlmsg_flags |= NLM_F_ROOT; 823 nlh->nlmsg_flags |= NLM_F_ROOT;
824 module_put(a->ops->owner); 824 module_put(a->ops->owner);
825 kfree(a); 825 kfree(a);
826 err = rtnetlink_send(skb, net, pid, RTNLGRP_TC, 826 err = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
827 n->nlmsg_flags & NLM_F_ECHO); 827 n->nlmsg_flags & NLM_F_ECHO);
828 if (err > 0) 828 if (err > 0)
829 return 0; 829 return 0;
@@ -841,7 +841,7 @@ noflush_out:
841 841
842static int 842static int
843tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n, 843tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
844 u32 pid, int event) 844 u32 portid, int event)
845{ 845{
846 int i, ret; 846 int i, ret;
847 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1]; 847 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
@@ -853,13 +853,13 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
853 853
854 if (event == RTM_DELACTION && n->nlmsg_flags & NLM_F_ROOT) { 854 if (event == RTM_DELACTION && n->nlmsg_flags & NLM_F_ROOT) {
855 if (tb[1] != NULL) 855 if (tb[1] != NULL)
856 return tca_action_flush(net, tb[1], n, pid); 856 return tca_action_flush(net, tb[1], n, portid);
857 else 857 else
858 return -EINVAL; 858 return -EINVAL;
859 } 859 }
860 860
861 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) { 861 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
862 act = tcf_action_get_1(tb[i], n, pid); 862 act = tcf_action_get_1(tb[i], n, portid);
863 if (IS_ERR(act)) { 863 if (IS_ERR(act)) {
864 ret = PTR_ERR(act); 864 ret = PTR_ERR(act);
865 goto err; 865 goto err;
@@ -874,7 +874,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
874 } 874 }
875 875
876 if (event == RTM_GETACTION) 876 if (event == RTM_GETACTION)
877 ret = act_get_notify(net, pid, n, head, event); 877 ret = act_get_notify(net, portid, n, head, event);
878 else { /* delete */ 878 else { /* delete */
879 struct sk_buff *skb; 879 struct sk_buff *skb;
880 880
@@ -884,7 +884,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
884 goto err; 884 goto err;
885 } 885 }
886 886
887 if (tca_get_fill(skb, head, pid, n->nlmsg_seq, 0, event, 887 if (tca_get_fill(skb, head, portid, n->nlmsg_seq, 0, event,
888 0, 1) <= 0) { 888 0, 1) <= 0) {
889 kfree_skb(skb); 889 kfree_skb(skb);
890 ret = -EINVAL; 890 ret = -EINVAL;
@@ -893,7 +893,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
893 893
894 /* now do the delete */ 894 /* now do the delete */
895 tcf_action_destroy(head, 0); 895 tcf_action_destroy(head, 0);
896 ret = rtnetlink_send(skb, net, pid, RTNLGRP_TC, 896 ret = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
897 n->nlmsg_flags & NLM_F_ECHO); 897 n->nlmsg_flags & NLM_F_ECHO);
898 if (ret > 0) 898 if (ret > 0)
899 return 0; 899 return 0;
@@ -905,7 +905,7 @@ err:
905} 905}
906 906
907static int tcf_add_notify(struct net *net, struct tc_action *a, 907static int tcf_add_notify(struct net *net, struct tc_action *a,
908 u32 pid, u32 seq, int event, u16 flags) 908 u32 portid, u32 seq, int event, u16 flags)
909{ 909{
910 struct tcamsg *t; 910 struct tcamsg *t;
911 struct nlmsghdr *nlh; 911 struct nlmsghdr *nlh;
@@ -920,7 +920,7 @@ static int tcf_add_notify(struct net *net, struct tc_action *a,
920 920
921 b = skb_tail_pointer(skb); 921 b = skb_tail_pointer(skb);
922 922
923 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*t), flags); 923 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*t), flags);
924 if (!nlh) 924 if (!nlh)
925 goto out_kfree_skb; 925 goto out_kfree_skb;
926 t = nlmsg_data(nlh); 926 t = nlmsg_data(nlh);
@@ -940,7 +940,7 @@ static int tcf_add_notify(struct net *net, struct tc_action *a,
940 nlh->nlmsg_len = skb_tail_pointer(skb) - b; 940 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
941 NETLINK_CB(skb).dst_group = RTNLGRP_TC; 941 NETLINK_CB(skb).dst_group = RTNLGRP_TC;
942 942
943 err = rtnetlink_send(skb, net, pid, RTNLGRP_TC, flags & NLM_F_ECHO); 943 err = rtnetlink_send(skb, net, portid, RTNLGRP_TC, flags & NLM_F_ECHO);
944 if (err > 0) 944 if (err > 0)
945 err = 0; 945 err = 0;
946 return err; 946 return err;
@@ -953,7 +953,7 @@ out_kfree_skb:
953 953
954static int 954static int
955tcf_action_add(struct net *net, struct nlattr *nla, struct nlmsghdr *n, 955tcf_action_add(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
956 u32 pid, int ovr) 956 u32 portid, int ovr)
957{ 957{
958 int ret = 0; 958 int ret = 0;
959 struct tc_action *act; 959 struct tc_action *act;
@@ -971,7 +971,7 @@ tcf_action_add(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
971 /* dump then free all the actions after update; inserted policy 971 /* dump then free all the actions after update; inserted policy
972 * stays intact 972 * stays intact
973 */ 973 */
974 ret = tcf_add_notify(net, act, pid, seq, RTM_NEWACTION, n->nlmsg_flags); 974 ret = tcf_add_notify(net, act, portid, seq, RTM_NEWACTION, n->nlmsg_flags);
975 for (a = act; a; a = act) { 975 for (a = act; a; a = act) {
976 act = a->next; 976 act = a->next;
977 kfree(a); 977 kfree(a);
@@ -984,7 +984,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
984{ 984{
985 struct net *net = sock_net(skb->sk); 985 struct net *net = sock_net(skb->sk);
986 struct nlattr *tca[TCA_ACT_MAX + 1]; 986 struct nlattr *tca[TCA_ACT_MAX + 1];
987 u32 pid = skb ? NETLINK_CB(skb).pid : 0; 987 u32 portid = skb ? NETLINK_CB(skb).portid : 0;
988 int ret = 0, ovr = 0; 988 int ret = 0, ovr = 0;
989 989
990 ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL); 990 ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
@@ -1008,17 +1008,17 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
1008 if (n->nlmsg_flags & NLM_F_REPLACE) 1008 if (n->nlmsg_flags & NLM_F_REPLACE)
1009 ovr = 1; 1009 ovr = 1;
1010replay: 1010replay:
1011 ret = tcf_action_add(net, tca[TCA_ACT_TAB], n, pid, ovr); 1011 ret = tcf_action_add(net, tca[TCA_ACT_TAB], n, portid, ovr);
1012 if (ret == -EAGAIN) 1012 if (ret == -EAGAIN)
1013 goto replay; 1013 goto replay;
1014 break; 1014 break;
1015 case RTM_DELACTION: 1015 case RTM_DELACTION:
1016 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n, 1016 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,
1017 pid, RTM_DELACTION); 1017 portid, RTM_DELACTION);
1018 break; 1018 break;
1019 case RTM_GETACTION: 1019 case RTM_GETACTION:
1020 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n, 1020 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,
1021 pid, RTM_GETACTION); 1021 portid, RTM_GETACTION);
1022 break; 1022 break;
1023 default: 1023 default:
1024 BUG(); 1024 BUG();
@@ -1085,7 +1085,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
1085 goto out_module_put; 1085 goto out_module_put;
1086 } 1086 }
1087 1087
1088 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 1088 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
1089 cb->nlh->nlmsg_type, sizeof(*t), 0); 1089 cb->nlh->nlmsg_type, sizeof(*t), 0);
1090 if (!nlh) 1090 if (!nlh)
1091 goto out_module_put; 1091 goto out_module_put;
@@ -1109,7 +1109,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
1109 nla_nest_cancel(skb, nest); 1109 nla_nest_cancel(skb, nest);
1110 1110
1111 nlh->nlmsg_len = skb_tail_pointer(skb) - b; 1111 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
1112 if (NETLINK_CB(cb->skb).pid && ret) 1112 if (NETLINK_CB(cb->skb).portid && ret)
1113 nlh->nlmsg_flags |= NLM_F_MULTI; 1113 nlh->nlmsg_flags |= NLM_F_MULTI;
1114 module_put(a_o->owner); 1114 module_put(a_o->owner);
1115 return skb->len; 1115 return skb->len;
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index dc3ef5aef355..7ae02892437c 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -343,13 +343,13 @@ errout:
343} 343}
344 344
345static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, 345static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,
346 unsigned long fh, u32 pid, u32 seq, u16 flags, int event) 346 unsigned long fh, u32 portid, u32 seq, u16 flags, int event)
347{ 347{
348 struct tcmsg *tcm; 348 struct tcmsg *tcm;
349 struct nlmsghdr *nlh; 349 struct nlmsghdr *nlh;
350 unsigned char *b = skb_tail_pointer(skb); 350 unsigned char *b = skb_tail_pointer(skb);
351 351
352 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*tcm), flags); 352 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags);
353 if (!nlh) 353 if (!nlh)
354 goto out_nlmsg_trim; 354 goto out_nlmsg_trim;
355 tcm = nlmsg_data(nlh); 355 tcm = nlmsg_data(nlh);
@@ -381,18 +381,18 @@ static int tfilter_notify(struct net *net, struct sk_buff *oskb,
381 unsigned long fh, int event) 381 unsigned long fh, int event)
382{ 382{
383 struct sk_buff *skb; 383 struct sk_buff *skb;
384 u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; 384 u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
385 385
386 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 386 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
387 if (!skb) 387 if (!skb)
388 return -ENOBUFS; 388 return -ENOBUFS;
389 389
390 if (tcf_fill_node(skb, tp, fh, pid, n->nlmsg_seq, 0, event) <= 0) { 390 if (tcf_fill_node(skb, tp, fh, portid, n->nlmsg_seq, 0, event) <= 0) {
391 kfree_skb(skb); 391 kfree_skb(skb);
392 return -EINVAL; 392 return -EINVAL;
393 } 393 }
394 394
395 return rtnetlink_send(skb, net, pid, RTNLGRP_TC, 395 return rtnetlink_send(skb, net, portid, RTNLGRP_TC,
396 n->nlmsg_flags & NLM_F_ECHO); 396 n->nlmsg_flags & NLM_F_ECHO);
397} 397}
398 398
@@ -407,7 +407,7 @@ static int tcf_node_dump(struct tcf_proto *tp, unsigned long n,
407{ 407{
408 struct tcf_dump_args *a = (void *)arg; 408 struct tcf_dump_args *a = (void *)arg;
409 409
410 return tcf_fill_node(a->skb, tp, n, NETLINK_CB(a->cb->skb).pid, 410 return tcf_fill_node(a->skb, tp, n, NETLINK_CB(a->cb->skb).portid,
411 a->cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWTFILTER); 411 a->cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWTFILTER);
412} 412}
413 413
@@ -465,7 +465,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
465 if (t > s_t) 465 if (t > s_t)
466 memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); 466 memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
467 if (cb->args[1] == 0) { 467 if (cb->args[1] == 0) {
468 if (tcf_fill_node(skb, tp, 0, NETLINK_CB(cb->skb).pid, 468 if (tcf_fill_node(skb, tp, 0, NETLINK_CB(cb->skb).portid,
469 cb->nlh->nlmsg_seq, NLM_F_MULTI, 469 cb->nlh->nlmsg_seq, NLM_F_MULTI,
470 RTM_NEWTFILTER) <= 0) 470 RTM_NEWTFILTER) <= 0)
471 break; 471 break;
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index a08b4ab3e421..a18d975db59c 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1185,7 +1185,7 @@ graft:
1185} 1185}
1186 1186
1187static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, 1187static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
1188 u32 pid, u32 seq, u16 flags, int event) 1188 u32 portid, u32 seq, u16 flags, int event)
1189{ 1189{
1190 struct tcmsg *tcm; 1190 struct tcmsg *tcm;
1191 struct nlmsghdr *nlh; 1191 struct nlmsghdr *nlh;
@@ -1193,7 +1193,7 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
1193 struct gnet_dump d; 1193 struct gnet_dump d;
1194 struct qdisc_size_table *stab; 1194 struct qdisc_size_table *stab;
1195 1195
1196 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*tcm), flags); 1196 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags);
1197 if (!nlh) 1197 if (!nlh)
1198 goto out_nlmsg_trim; 1198 goto out_nlmsg_trim;
1199 tcm = nlmsg_data(nlh); 1199 tcm = nlmsg_data(nlh);
@@ -1248,25 +1248,25 @@ static int qdisc_notify(struct net *net, struct sk_buff *oskb,
1248 struct Qdisc *old, struct Qdisc *new) 1248 struct Qdisc *old, struct Qdisc *new)
1249{ 1249{
1250 struct sk_buff *skb; 1250 struct sk_buff *skb;
1251 u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; 1251 u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
1252 1252
1253 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 1253 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
1254 if (!skb) 1254 if (!skb)
1255 return -ENOBUFS; 1255 return -ENOBUFS;
1256 1256
1257 if (old && !tc_qdisc_dump_ignore(old)) { 1257 if (old && !tc_qdisc_dump_ignore(old)) {
1258 if (tc_fill_qdisc(skb, old, clid, pid, n->nlmsg_seq, 1258 if (tc_fill_qdisc(skb, old, clid, portid, n->nlmsg_seq,
1259 0, RTM_DELQDISC) < 0) 1259 0, RTM_DELQDISC) < 0)
1260 goto err_out; 1260 goto err_out;
1261 } 1261 }
1262 if (new && !tc_qdisc_dump_ignore(new)) { 1262 if (new && !tc_qdisc_dump_ignore(new)) {
1263 if (tc_fill_qdisc(skb, new, clid, pid, n->nlmsg_seq, 1263 if (tc_fill_qdisc(skb, new, clid, portid, n->nlmsg_seq,
1264 old ? NLM_F_REPLACE : 0, RTM_NEWQDISC) < 0) 1264 old ? NLM_F_REPLACE : 0, RTM_NEWQDISC) < 0)
1265 goto err_out; 1265 goto err_out;
1266 } 1266 }
1267 1267
1268 if (skb->len) 1268 if (skb->len)
1269 return rtnetlink_send(skb, net, pid, RTNLGRP_TC, 1269 return rtnetlink_send(skb, net, portid, RTNLGRP_TC,
1270 n->nlmsg_flags & NLM_F_ECHO); 1270 n->nlmsg_flags & NLM_F_ECHO);
1271 1271
1272err_out: 1272err_out:
@@ -1289,7 +1289,7 @@ static int tc_dump_qdisc_root(struct Qdisc *root, struct sk_buff *skb,
1289 q_idx++; 1289 q_idx++;
1290 } else { 1290 } else {
1291 if (!tc_qdisc_dump_ignore(q) && 1291 if (!tc_qdisc_dump_ignore(q) &&
1292 tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid, 1292 tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).portid,
1293 cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) 1293 cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0)
1294 goto done; 1294 goto done;
1295 q_idx++; 1295 q_idx++;
@@ -1300,7 +1300,7 @@ static int tc_dump_qdisc_root(struct Qdisc *root, struct sk_buff *skb,
1300 continue; 1300 continue;
1301 } 1301 }
1302 if (!tc_qdisc_dump_ignore(q) && 1302 if (!tc_qdisc_dump_ignore(q) &&
1303 tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid, 1303 tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).portid,
1304 cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) 1304 cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0)
1305 goto done; 1305 goto done;
1306 q_idx++; 1306 q_idx++;
@@ -1375,7 +1375,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
1375 const struct Qdisc_class_ops *cops; 1375 const struct Qdisc_class_ops *cops;
1376 unsigned long cl = 0; 1376 unsigned long cl = 0;
1377 unsigned long new_cl; 1377 unsigned long new_cl;
1378 u32 pid = tcm->tcm_parent; 1378 u32 portid = tcm->tcm_parent;
1379 u32 clid = tcm->tcm_handle; 1379 u32 clid = tcm->tcm_handle;
1380 u32 qid = TC_H_MAJ(clid); 1380 u32 qid = TC_H_MAJ(clid);
1381 int err; 1381 int err;
@@ -1403,8 +1403,8 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
1403 1403
1404 /* Step 1. Determine qdisc handle X:0 */ 1404 /* Step 1. Determine qdisc handle X:0 */
1405 1405
1406 if (pid != TC_H_ROOT) { 1406 if (portid != TC_H_ROOT) {
1407 u32 qid1 = TC_H_MAJ(pid); 1407 u32 qid1 = TC_H_MAJ(portid);
1408 1408
1409 if (qid && qid1) { 1409 if (qid && qid1) {
1410 /* If both majors are known, they must be identical. */ 1410 /* If both majors are known, they must be identical. */
@@ -1418,10 +1418,10 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
1418 /* Now qid is genuine qdisc handle consistent 1418 /* Now qid is genuine qdisc handle consistent
1419 * both with parent and child. 1419 * both with parent and child.
1420 * 1420 *
1421 * TC_H_MAJ(pid) still may be unspecified, complete it now. 1421 * TC_H_MAJ(portid) still may be unspecified, complete it now.
1422 */ 1422 */
1423 if (pid) 1423 if (portid)
1424 pid = TC_H_MAKE(qid, pid); 1424 portid = TC_H_MAKE(qid, portid);
1425 } else { 1425 } else {
1426 if (qid == 0) 1426 if (qid == 0)
1427 qid = dev->qdisc->handle; 1427 qid = dev->qdisc->handle;
@@ -1439,7 +1439,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
1439 1439
1440 /* Now try to get class */ 1440 /* Now try to get class */
1441 if (clid == 0) { 1441 if (clid == 0) {
1442 if (pid == TC_H_ROOT) 1442 if (portid == TC_H_ROOT)
1443 clid = qid; 1443 clid = qid;
1444 } else 1444 } else
1445 clid = TC_H_MAKE(qid, clid); 1445 clid = TC_H_MAKE(qid, clid);
@@ -1478,7 +1478,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
1478 new_cl = cl; 1478 new_cl = cl;
1479 err = -EOPNOTSUPP; 1479 err = -EOPNOTSUPP;
1480 if (cops->change) 1480 if (cops->change)
1481 err = cops->change(q, clid, pid, tca, &new_cl); 1481 err = cops->change(q, clid, portid, tca, &new_cl);
1482 if (err == 0) 1482 if (err == 0)
1483 tclass_notify(net, skb, n, q, new_cl, RTM_NEWTCLASS); 1483 tclass_notify(net, skb, n, q, new_cl, RTM_NEWTCLASS);
1484 1484
@@ -1492,7 +1492,7 @@ out:
1492 1492
1493static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, 1493static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,
1494 unsigned long cl, 1494 unsigned long cl,
1495 u32 pid, u32 seq, u16 flags, int event) 1495 u32 portid, u32 seq, u16 flags, int event)
1496{ 1496{
1497 struct tcmsg *tcm; 1497 struct tcmsg *tcm;
1498 struct nlmsghdr *nlh; 1498 struct nlmsghdr *nlh;
@@ -1500,7 +1500,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,
1500 struct gnet_dump d; 1500 struct gnet_dump d;
1501 const struct Qdisc_class_ops *cl_ops = q->ops->cl_ops; 1501 const struct Qdisc_class_ops *cl_ops = q->ops->cl_ops;
1502 1502
1503 nlh = nlmsg_put(skb, pid, seq, event, sizeof(*tcm), flags); 1503 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags);
1504 if (!nlh) 1504 if (!nlh)
1505 goto out_nlmsg_trim; 1505 goto out_nlmsg_trim;
1506 tcm = nlmsg_data(nlh); 1506 tcm = nlmsg_data(nlh);
@@ -1540,18 +1540,18 @@ static int tclass_notify(struct net *net, struct sk_buff *oskb,
1540 unsigned long cl, int event) 1540 unsigned long cl, int event)
1541{ 1541{
1542 struct sk_buff *skb; 1542 struct sk_buff *skb;
1543 u32 pid = oskb ? NETLINK_CB(oskb).pid : 0; 1543 u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
1544 1544
1545 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 1545 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
1546 if (!skb) 1546 if (!skb)
1547 return -ENOBUFS; 1547 return -ENOBUFS;
1548 1548
1549 if (tc_fill_tclass(skb, q, cl, pid, n->nlmsg_seq, 0, event) < 0) { 1549 if (tc_fill_tclass(skb, q, cl, portid, n->nlmsg_seq, 0, event) < 0) {
1550 kfree_skb(skb); 1550 kfree_skb(skb);
1551 return -EINVAL; 1551 return -EINVAL;
1552 } 1552 }
1553 1553
1554 return rtnetlink_send(skb, net, pid, RTNLGRP_TC, 1554 return rtnetlink_send(skb, net, portid, RTNLGRP_TC,
1555 n->nlmsg_flags & NLM_F_ECHO); 1555 n->nlmsg_flags & NLM_F_ECHO);
1556} 1556}
1557 1557
@@ -1565,7 +1565,7 @@ static int qdisc_class_dump(struct Qdisc *q, unsigned long cl, struct qdisc_walk
1565{ 1565{
1566 struct qdisc_dump_args *a = (struct qdisc_dump_args *)arg; 1566 struct qdisc_dump_args *a = (struct qdisc_dump_args *)arg;
1567 1567
1568 return tc_fill_tclass(a->skb, q, cl, NETLINK_CB(a->cb->skb).pid, 1568 return tc_fill_tclass(a->skb, q, cl, NETLINK_CB(a->cb->skb).portid,
1569 a->cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWTCLASS); 1569 a->cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWTCLASS);
1570} 1570}
1571 1571