-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
12027 lines (10030 loc) · 434 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
===namespace===
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/systemtap_beginners_guide/index
[root@dev-r630-04 ~]# lsns
NS TYPE NPROCS PID USER COMMAND
4026531835 cgroup 358 1 root /usr/lib/systemd/systemd --switched-root --system --deserialize 24
4026531836 pid 358 1 root /usr/lib/systemd/systemd --switched-root --system --deserialize 24
4026531837 user 358 1 root /usr/lib/systemd/systemd --switched-root --system --deserialize 24
4026531838 uts 358 1 root /usr/lib/systemd/systemd --switched-root --system --deserialize 24
4026531839 ipc 358 1 root /usr/lib/systemd/systemd --switched-root --system --deserialize 24
4026531840 mnt 351 1 root /usr/lib/systemd/systemd --switched-root --system --deserialize 24
4026531861 mnt 1 104 root kdevtmpfs
4026532009 net 355 1 root /usr/lib/systemd/systemd --switched-root --system --deserialize 24
4026532912 mnt 1 773 root /usr/lib/systemd/systemd-udevd
4026532962 mnt 1 1157 chrony /usr/sbin/chronyd
4026533015 mnt 1 1737 root /usr/sbin/ypbind -n
4026533526 mnt 2 22595 root bash
4026533718 net 2 22595 root bash
4026533814 mnt 1 29264 root bash
4026533815 net 1 29264 root bash
crash> list -H net_namespace_list -o net.list
ffffffff820d5900
ffff880ec2a798c0
ffff881031fee300
ffff880f5f640000
crash> p &init_net
$4 = (struct net *) 0xffffffff820d5900 <init_net>
crash> task_struct.nsproxy ffff880f7faac880
nsproxy = 0xffff88103419c4d0
crash> struct nsproxy 0xffff88103419c4d0
struct nsproxy {
count = {
counter = 0x1
},
uts_ns = 0xffffffff82012280 <init_uts_ns>,
ipc_ns = 0xffffffff8208b2e0 <init_ipc_ns>,
mnt_ns = 0xffff880f44c80400,
pid_ns_for_children = 0xffffffff82040de0 <init_pid_ns>,
net_ns = 0xffff880ec2a798c0,
cgroup_ns = 0xffffffff82056840 <init_cgroup_ns>
}
struct nsproxy init_nsproxy
struct task_struct init_task
.nsproxy = &init_nsproxy,
===printk===
printk
vprintk_default
vprintk_emit
vprintk_store
log_output
log_store
log_buf
static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN);
static char *log_buf = __log_buf;
static u32 log_buf_len = __LOG_BUF_LEN;
log_next_seq
log_next_idx
===frag===
commit 7257b535ab8e5fafd811c5f6788205eefdd44948
Author: Ben Pfaff <blp@nicira.com>
Date: Wed Oct 19 21:33:44 2011 -0700
Implement new fragment handling policy.
Until now, OVS has handled IP fragments more awkwardly than necessary. It
has not been possible to match on L4 headers, even in fragments with offset
0 where they are actually present. This means that there was no way to
implement ACLs that treat, say, different TCP ports differently, on
fragmented traffic; instead, all decisions for fragment forwarding had to
be made on the basis of L2 and L3 headers alone.
This commit improves the situation significantly. It is still not possible
to match on L4 headers in fragments with nonzero offset, because that
information is simply not present in such fragments, but this commit adds
the ability to match on L4 headers for fragments with zero offset. This
means that it becomes possible to implement ACLs that drop such "first
fragments" on the basis of L4 headers. In practice, that effectively
blocks even fragmented traffic on an L4 basis, because the receiving IP
stack cannot reassemble a full packet when the first fragment is missing.
This commit works by adding a new "fragment type" to the kernel flow match
and making it available through OpenFlow as a new NXM field named
NXM_NX_IP_FRAG. Because OpenFlow 1.0 explicitly says that the L4 fields
are always 0 for IP fragments, it adds a new OpenFlow fragment handling
mode that fills in the L4 fields for "first fragments". It also enhances
ovs-ofctl to allow users to configure this new fragment handling mode and
to parse the new field.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Bug #7557.
commit 83e866067ea67807e573c64fc6ee69d47f6d5b7c
Author: Roi Dayan <roid@mellanox.com>
Date: Mon Mar 12 14:58:47 2018 +0200
netdev-tc-offloads: Add support for IP fragmentation
Add support for frag no, first and later.
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Shahar Klein <shahark@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
https://redmine.mellanox.com/issues/1774992
TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT
FLOW_NW_FRAG_ANY
1 with ovs. which will pass with your fix
1 with tc only which will keep failing until we fix ct in the kernel probably as i think it should work
talked with Paul. frag packet dont have ports
we need src ip dst ip proto and src/dst ports for CT
we dont have src/dst ports in fragmented later packets
This conversation is being saved. You'll see it soon in your Outlook Inbox folder.
so offload will never happen for us but should work with tc sw
===systemd===
builtin_net_id
name_pci
dev_pci_slot
===udev===
devlink port show
dev_change_name
rtnl_phys_port_name_fill or phys_port_name_show
dev_get_phys_port_name
devlink_compat_phys_port_name_get
__devlink_port_phys_port_name_get
register_devlink_port
devlink_port_attrs_pci_vf_set (DEVLINK_PORT_FLAVOUR_PCI_VF)
devlink_port_flavour
phys_switch_id_show
[root@dev-r630-04 ~]# udevadm test-builtin net_id /sys/class/net/enp4s0f0np0
Load module index
Parsed configuration file /usr/lib/systemd/network/99-default.link
Created link configuration context.
Using default interface naming scheme 'v240'.
ID_NET_NAMING_SCHEME=v240
ID_NET_NAME_MAC=enxb8599fbb3182
ID_OUI_FROM_DATABASE=Mellanox Technologies, Inc.
ID_NET_NAME_PATH=enp4s0f0np0
Unload module index
Unloaded link configuration context.
[root@dev-r630-04 ~]# udevadm test-builtin net_id /sys/class/net/enp4s0f0np0v0
Load module index
Parsed configuration file /usr/lib/systemd/network/99-default.link
Created link configuration context.
Using default interface naming scheme 'v240'.
ID_NET_NAMING_SCHEME=v240
ID_NET_NAME_PATH=enp4s0f0np0v0
Unload module index
Unloaded link configuration context.
udevadm test /sys/class/net/enp4s0f0
net_class_attrs
17473 17473 ip device_rename
device_rename 1 [kernel]
do_setlink a1 [kernel]
rtnl_newlink 558 [kernel]
rtnetlink_rcv_msg 27c [kernel]
netlink_rcv_skb 54 [kernel]
rtnetlink_rcv 15 [kernel]
netlink_unicast 1ab [kernel]
netlink_sendmsg 2d1 [kernel]
sock_sendmsg 3e [kernel]
___sys_sendmsg 280 [kernel]
__sys_sendmsg 63 [kernel]
__x64_sys_sendmsg 1f [kernel]
do_syscall_64 5a [kernel]
entry_SYSCALL_64_after_hwframe 44 [kernel]
0xffffffff815c9a70 : dev_change_name 0/0x280 [kernel]
0xffffffff815dc2f9 : rtnl_setlink c9/0x140 [kernel]
0xffffffff815dd3e7 : rtnetlink_rcv_msg 167/0x380 [kernel]
0xffffffff81603fab : netlink_rcv_skb ab/0xc0 [kernel]
0xffffffff815d9405 : rtnetlink_rcv 15/0x20 [kernel]
0xffffffff81603698 : netlink_unicast f8/0x1c0 [kernel]
0xffffffff81603a7f : netlink_sendmsg 31f/0x690 [kernel]
0xffffffff815a60c6 : sock_sendmsg b6/0xf0 [kernel]
0xffffffff815a6651 : SYSC_sendto 121/0x1c0 [kernel]
0xffffffff815a758e : SyS_sendto e/0x10 [kernel]
0xffffffff81712eaa : tracesys 9d/0xc3 [kernel]
0x7f01a45a7ca3
parms: dev=0xffff88080af00000 newname=0xffff880c0c2efaf8
execname: systemd-udevd
ts: 14, 9
0x7f01a45a7ca3 [/usr/lib64/libpthread-2.17.so eca3/0x218000]
http://linux.dell.com/files/biosdevname/
http://linux.dell.com/files/whitepapers/consistent_network_device_naming_in_linux.pdf
# udevadm info --query=property --name /dev/sda
DEVLINKS=/dev/disk/by-id/scsi-36847beb0f962180020e608c514fe9c96 /dev/disk/by-id/wwn-0x6847beb0f962180020e608c514fe9c96 /dev/disk/by-path/pci-0000:03:00.0-scsi-0:2:0:0
DEVNAME=/dev/sda
DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:03:00.0/host0/target0:2:0/0:2:0:0/block/sda
DEVTYPE=disk
ID_BUS=scsi
ID_MODEL=PERC_H330_Mini
ID_MODEL_ENC=PERC\x20H330\x20Mini\x20\x20
ID_PART_TABLE_TYPE=dos
ID_PATH=pci-0000:03:00.0-scsi-0:2:0:0
ID_PATH_TAG=pci-0000_03_00_0-scsi-0_2_0_0
ID_REVISION=4.27
ID_SCSI=1
ID_SCSI_SERIAL=00969cfe14c508e620001862f9b0be47
ID_SERIAL=36847beb0f962180020e608c514fe9c96
ID_SERIAL_SHORT=6847beb0f962180020e608c514fe9c96
ID_TYPE=disk
ID_VENDOR=DELL
ID_VENDOR_ENC=DELL\x20\x20\x20\x20
ID_WWN=0x6847beb0f9621800
ID_WWN_VENDOR_EXTENSION=0x20e608c514fe9c96
ID_WWN_WITH_EXTENSION=0x6847beb0f962180020e608c514fe9c96
MAJOR=8
MINOR=0
SUBSYSTEM=block
TAGS=:systemd:
USEC_INITIALIZED=77440
udevadm info -a --path=/sys/class/net/enp4s0f0
[root@dev-r630-03 devices]# udevadm info /sys/class/net/enp4s0f1
P: /devices/pci0000:00/0000:00:02.0/0000:04:00.1/net/enp4s0f1
E: DEVPATH=/devices/pci0000:00/0000:00:02.0/0000:04:00.1/net/enp4s0f1
E: ID_BUS=pci
E: ID_MM_CANDIDATE=1
E: ID_MODEL_FROM_DATABASE=MT28800 Family [ConnectX-5 Ex]
E: ID_MODEL_ID=0x1019
E: ID_NET_DRIVER=mlx5_core
E: ID_NET_LINK_FILE=/lib/systemd/network/99-default.link
E: ID_NET_NAME=enp4s0f1
E: ID_NET_NAME_MAC=enx248a0788279b
E: ID_NET_NAME_PATH=enp4s0f1
E: ID_OUI_FROM_DATABASE=Mellanox Technologies, Inc.
E: ID_PATH=pci-0000:04:00.1
E: ID_PATH_TAG=pci-0000_04_00_1
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
E: ID_VENDOR_FROM_DATABASE=Mellanox Technologies
E: ID_VENDOR_ID=0x15b3
E: IFINDEX=43
E: INTERFACE=enp4s0f1
E: SUBSYSTEM=net
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp4s0f1 /sys/subsystem/net/devices/enp4s0f1
E: TAGS=:systemd:
E: USEC_INITIALIZED=4239194592
[root@dev-r630-03 devices]# udevadm info /sys/class/net/enp4s0f
/sys/class/net/enp4s0f0np0 /sys/class/net/enp4s0f0np0_0 /sys/class/net/enp4s0f0np0_1 /sys/class/net/enp4s0f0np0_2 /sys/class/net/enp4s0f1
[root@dev-r630-03 devices]# udevadm info /sys/class/net/enp4s0f0np0
P: /devices/pci0000:00/0000:00:02.0/0000:04:00.0/net/enp4s0f0np0
E: DEVPATH=/devices/pci0000:00/0000:00:02.0/0000:04:00.0/net/enp4s0f0np0
E: ID_BUS=pci
E: ID_MM_CANDIDATE=1
E: ID_MODEL_FROM_DATABASE=MT28800 Family [ConnectX-5 Ex]
E: ID_MODEL_ID=0x1019
E: ID_NET_DRIVER=mlx5e_rep
E: ID_NET_LINK_FILE=/lib/systemd/network/99-default.link
E: ID_NET_NAME=enp4s0f0np0
E: ID_NET_NAME_MAC=enx248a0788279a
E: ID_NET_NAME_PATH=enp4s0f0np0
E: ID_OUI_FROM_DATABASE=Mellanox Technologies, Inc.
E: ID_PATH=pci-0000:04:00.0
E: ID_PATH_TAG=pci-0000_04_00_0
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
E: ID_VENDOR_FROM_DATABASE=Mellanox Technologies
E: ID_VENDOR_ID=0x15b3
E: IFINDEX=74
E: INTERFACE=enp4s0f0np0
E: NAME=enp4s0f0np0
E: SUBSYSTEM=net
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp4s0f0np0 /sys/subsystem/net/devices/enp4s0f0np0
E: TAGS=:systemd:
E: USEC_INITIALIZED=5852898643
===block===
fl_change
fl_hw_replace_filter
tc_setup_cb_call
tcf_block_cb_call
mlx5e_rep_setup_tc_cb_egdev
mlx5e_rep_setup_tc_cb
mlx5e_rep_setup_tc_cb_egdev
rep->rep_if[rep_type].load(esw->dev, rep); -> mlx5e_vport_rep_load
esw_offloads_load_reps_type
esw_offloads_load_reps
[170553.596281] esw_offloads_init 444/0x730 [mlx5_core]
[170553.597416] mlx5_eswitch_enable_sriov b5/0x910 [mlx5_core]
[170553.598556] ? tree_put_node 64/0x90 [mlx5_core]
[170553.599706] ? tree_remove_node 12/0x30 [mlx5_core]
[170553.600860] ? mlx5_destroy_flow_table 85/0x2d0 [mlx5_core]
[170553.602021] ? tree_put_node 64/0x90 [mlx5_core]
[170553.603184] mlx5_devlink_eswitch_mode_set 72/0x1d0 [mlx5_core]
[170553.604139] IPv6: ADDRCONF(NETDEV_UP): enp4s0f0_0: link is not ready
[170553.604371] devlink_nl_cmd_eswitch_set_doit 46/0xb0 [devlink]
[170553.606164] IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0f0_0: link becomes ready
[170553.607272] genl_family_rcv_msg 1e4/0x390
[170553.607277] genl_rcv_msg 47/0x90
[170553.607282] ? genl_family_rcv_msg 390/0x390
[170553.610948] enp4s0f0_1: renamed from eth0
[170553.611594] netlink_rcv_skb 4d/0x130
[170553.611597] genl_rcv 24/0x40
[170553.611600] netlink_unicast 196/0x230
[170553.611605] netlink_sendmsg 2ae/0x3a0
[170553.619277] sock_sendmsg 36/0x40
[170553.620300] __sys_sendto 10e/0x140
[170553.621297] ? __sys_recvmsg 5b/0xa0
[170553.622263] ? __sys_recvmsg 5b/0xa0
[170553.623204] __x64_sys_sendto 24/0x30
[170553.624112] do_syscall_64 5b/0x180
[170553.624989] entry_SYSCALL_64_after_hwframe 44/0xa9
0xffffffffa02bed90 : mlx5e_configure_flower 0/0xfa0 [mlx5_core]
0xffffffff81681d8b : tc_setup_cb_call 6b/0x160 [kernel]
0xffffffffa0d2d8c6 : fl_change 1186/0x0 [cls_flower]
0xffffffff816843c5 : tc_new_tfilter 395/0x680 [kernel]
0xffffffff81658386 : rtnetlink_rcv_msg 136/0x330 [kernel]
0xffffffff8168c61d : netlink_rcv_skb 4d/0x130 [kernel]
0xffffffff8168beb6 : netlink_unicast 196/0x230 [kernel]
0xffffffff8168c1fe : netlink_sendmsg 2ae/0x3a0 [kernel]
0xffffffff81622aa6 : sock_sendmsg 36/0x40 [kernel]
0xffffffff8162305f : ___sys_sendmsg 26f/0x2d0 [kernel]
0xffffffff816243ae : __sys_sendmsg 5e/0xa0 [kernel] (inexact)
0xffffffff8100422b : do_syscall_64 5b/0x180 [kernel] (inexact)
0xffffffff81800088 : entry_SYSCALL_64_after_hwframe 44/0xa9 [kernel] (inexact)
0x0 (inexact)
parms: priv=0xffff880fcbd40880 f=0xffffc900017476f8 flags=0x1
execname: handler18
ts: 10, 4
0x7f6a6e63fee4 : sendmsg 54/0xb0 [/usr/lib64/libpthread-2.26.so]
0x537991 : nl_sock_transact_multiple__ 121/0x490 [/usr/sbin/ovs-vswitchd]
0x537dbc : nl_sock_transact_multiple.part.8 bc/0x1a0 [/usr/sbin/ovs-vswitchd]
0x537ee1 : nl_sock_transact 41/0xc0 [/usr/sbin/ovs-vswitchd]
0x538da0 : nl_transact 40/0x60 [/usr/sbin/ovs-vswitchd]
0x53b9e5 : tc_replace_flower 375/0xef0 [/usr/sbin/ovs-vswitchd]
0x534e2c : netdev_tc_flow_put d4c/0x1650 [/usr/sbin/ovs-vswitchd]
0x527031 : dpif_netlink_operate
0x476428 : dpif_operate a8/0x260 [/usr/sbin/ovs-vswitchd]
0x43d591 : recv_upcalls 6f1/0x870 [/usr/sbin/ovs-vswitchd]
0x43d752 : udpif_upcall_handler 42/0x70 [/usr/sbin/ovs-vswitchd]
0x4e9f8d : ovsthread_wrapper 5d/0x70 [/usr/sbin/ovs-vswitchd]
0x7f6a6e63550b : start_thread db/0x3c0 [/usr/lib64/libpthread-2.26.so]
0x7f6a6de1a16f : clone 3f/0x60 [/usr/lib64/libc-2.26.so]
mlx5e_rep_setup_tc_cb
0xffffffffa02b8ee0 : mlx5e_rep_setup_tc_cls_flower 0/0x30 [mlx5_core]
0xffffffff81681d8b : tc_setup_cb_call 6b/0x160 [kernel]
0xffffffffa0d2d8c6 : fl_change 1186/0x0 [cls_flower]
0xffffffff816843c5 : tc_new_tfilter 395/0x680 [kernel]
0xffffffff81658386 : rtnetlink_rcv_msg 136/0x330 [kernel]
0xffffffff8168c61d : netlink_rcv_skb 4d/0x130 [kernel]
0xffffffff8168beb6 : netlink_unicast 196/0x230 [kernel]
0xffffffff8168c1fe : netlink_sendmsg 2ae/0x3a0 [kernel]
0xffffffff81622aa6 : sock_sendmsg 36/0x40 [kernel]
0xffffffff8162305f : ___sys_sendmsg 26f/0x2d0 [kernel]
0xffffffff816243ae : __sys_sendmsg 5e/0xa0 [kernel] (inexact)
0xffffffff8100422b : do_syscall_64 5b/0x180 [kernel] (inexact)
0xffffffff81800088 : entry_SYSCALL_64_after_hwframe 44/0xa9 [kernel] (inexact)
0x0 (inexact)
parms: priv=0xffff880fcbd40880 cls_flower=0xffffc900017776f8 flags=0x1
execname: handler20
ts: 1, 1
0x7f6a6e63fee4 : sendmsg 54/0xb0 [/usr/lib64/libpthread-2.26.so]
0x537991 : nl_sock_transact_multiple__ 121/0x490 [/usr/sbin/ovs-vswitchd]
0x537dbc : nl_sock_transact_multiple.part.8 bc/0x1a0 [/usr/sbin/ovs-vswitchd]
0x537ee1 : nl_sock_transact 41/0xc0 [/usr/sbin/ovs-vswitchd]
0x538da0 : nl_transact 40/0x60 [/usr/sbin/ovs-vswitchd]
0x53b9e5 : tc_replace_flower 375/0xef0 [/usr/sbin/ovs-vswitchd]
0x534e2c : netdev_tc_flow_put d4c/0x1650 [/usr/sbin/ovs-vswitchd]
0x527031 : dpif_netlink_operate.part.35 221/0x520 [/usr/sbin/ovs-vswitchd]
0x476428 : dpif_operate a8/0x260 [/usr/sbin/ovs-vswitchd]
0x43d591 : recv_upcalls.isra.24 6f1/0x870 [/usr/sbin/ovs-vswitchd]
0x43d752 : udpif_upcall_handler 42/0x70 [/usr/sbin/ovs-vswitchd]
0x4e9f8d : ovsthread_wrapper 5d/0x70 [/usr/sbin/ovs-vswitchd]
0x7f6a6e63550b : start_thread db/0x3c0 [/usr/lib64/libpthread-2.26.so]
0x7f6a6de1a16f : clone 3f/0x60 [/usr/lib64/libc-2.26.so]
0xffffffffa02b91e0 : mlx5e_rep_setup_tc 0/0x60 [mlx5_core]
0xffffffff81682560 : tcf_block_get_ext 260/0x410 [kernel]
0xffffffff816809ab : qdisc_create 1ab/0x4c0 [kernel]
0xffffffff81680e72 : tc_modify_qdisc 1b2/0x770 [kernel]
0xffffffff81658386 : rtnetlink_rcv_msg 136/0x330 [kernel]
0xffffffff8168c61d : netlink_rcv_skb 4d/0x130 [kernel]
0xffffffff8168beb6 : netlink_unicast 196/0x230 [kernel]
0xffffffff8168c1fe : netlink_sendmsg 2ae/0x3a0 [kernel]
0xffffffff81622aa6 : sock_sendmsg 36/0x40 [kernel]
0xffffffff8162305f : ___sys_sendmsg 26f/0x2d0 [kernel]
0xffffffff816243ae : __sys_sendmsg 5e/0xa0 [kernel] (inexact)
0xffffffff8100422b : do_syscall_64 5b/0x180 [kernel] (inexact)
0xffffffff81800088 : entry_SYSCALL_64_after_hwframe 44/0xa9 [kernel] (inexact)
0x0 (inexact)
parms: dev=0xffff881002f40000 type=0x5 type_data=0xffffc900015a79d8
execname: ovs-vswitchd
ts: 7, 3
0x7f6a6e63fee4 : sendmsg 54/0xb0 [/usr/lib64/libpthread-2.26.so]
0x537991 : nl_sock_transact_multiple__ 121/0x490 [/usr/sbin/ovs-vswitchd]
0x537dbc : nl_sock_transact_multiple.part.8 bc/0x1a0 [/usr/sbin/ovs-vswitchd]
0x537f52 : nl_sock_transact b2/0xc0 [/usr/sbin/ovs-vswitchd]
0x538da0 : nl_transact 40/0x60 [/usr/sbin/ovs-vswitchd]
0x53b21c : tc_add_del_ingress_qdisc 6c/0xc0 [/usr/sbin/ovs-vswitchd]
0x535ab7 : netdev_tc_init_flow_api 47/0x1e0 [/usr/sbin/ovs-vswitchd]
0x498019 : netdev_ports_insert 1e9/0x240 [/usr/sbin/ovs-vswitchd]
0x474e8b : dpif_port_add db/0x160 [/usr/sbin/ovs-vswitchd]
0x4288aa : port_add 6a/0x140 [/usr/sbin/ovs-vswitchd]
0x41bebe : ofproto_port_add 2e/0x110 [/usr/sbin/ovs-vswitchd]
0x40a005 : bridge_add_ports__ 395/0x870 [/usr/sbin/ovs-vswitchd]
0x40be84 : bridge_reconfigure 384/0x32c0 [/usr/sbin/ovs-vswitchd]
0x40fbc9 : bridge_run 229/0x1930 [/usr/sbin/ovs-vswitchd]
0x4069d5 : main 2d5/0x490 [/usr/sbin/ovs-vswitchd]
0x7f6a6dd45f2a : __libc_start_main ea/0x1c0 [/usr/lib64/libc-2.26.so]
0x40791a : _start 2a/0x30 [/usr/sbin/ovs-vswitchd]
===udp===
commit 5c3c6081b246b05ee5bb2fc1759a7c0c6a0b7c3b
Merge: 6093ec2dc313 d9d30adf5677
Author: David S. Miller <davem@davemloft.net>
Date: Mon Jul 17 09:53:05 2017 -0700
Merge branch 'net-ufo-remove'
David S. Miller says:
====================
net: Remove UDP Fragmentation Offload support
This is a patch series, based upon some discussions with various
developers, that removes UFO offloading.
Very few devices support this operation, it's usefullness is
quesitonable at best, and it adds a non-trivial amount of
complexity to our data paths.
v2: Delete more code thanks to feedback from Willem.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
===netfilter===
modprobe br_netfilter
br_nf_forward_ip
br_handle_frame
netdev_frame_hook
static const struct nf_hook_ops br_nf_ops[] = {
===simx===
yum install virt-manager libvirt libvirt-python libvirt-python python-virtinst
/mswg/release/simx/latest/install.sh
rpm -ql simx-qenu
/opt/simx/bin/manage_virt_manager_device_support.py add
/opt/simx/bin/manage_vm_simx_support.py -n vm1
[root@dev-r630-04 simx]# ./install.sh
[*] Printing build information
simx-qemu-4.5-3836
Package: simx-qemu-4.5-3836.el7.x86_64.rpm
Time: 20200205-180019
GIT URL: /mswg/git/simx.git
GIT branch: master
GIT commit: 23f97bc7dcfe7bebfa8b1e6261d1650a3f175b0a
Lib version: e962ba8ad6ea0733e6aa68be62fe2bb200751111
===perf===
perf stat -e cycles:k,instructions:k -B --cpu=0-15 sleep 2
===outlook===
Click the File tab.
Click Options.
In the left pane, click Mail.
In the right pane, under Replies and forwards, check the Preface comments with box, and type the text you want to use to identify your comments.
===asm===
%rdi, %rsi, %rdx, %rcx, %r8 and %r9 are the
===kdb===
rd
===tmux===
ctl + H/L to resize the page
https://github.com/drmad/tmux-git
tmux show-buffer
tmux save-buffer foo.txt
tmux list-buffers
tmux show-buffer -b n
tmux save-buffer -b n foo.txt
c-a shift+space: adjust pane v to h or h to v.
Prefix + # will list all the paste buffers. Prefix + = will let you select which paste buffer to use.
ConEmu:
win+alt+p configuration
c-w o close all other vim windows
===kernel===
/proc/config.gz
===rcu===
rcu_gp_kthread
swait_event_interruptible
RCU_SOFTIRQ
rcu_process_callbacks
rcu_init(void)
open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);
crash> rcu_sched_data
PER-CPU DATA TYPE:
struct rcu_data rcu_sched_data;
PER-CPU ADDRESSES:
[0]: ffff8807fe01c7c0
[1]: ffff8807fe05c7c0
[2]: ffff8807fe09c7c0
[3]: ffff8807fe0dc7c0
[4]: ffff8807fe11c7c0
[5]: ffff8807fe15c7c0
[6]: ffff8807fe19c7c0
[7]: ffff8807fe1dc7c0
crash> rcu_preempt_data
PER-CPU DATA TYPE:
struct rcu_data rcu_preempt_data;
PER-CPU ADDRESSES:
[0]: ffff8807fe01c4c0
[1]: ffff8807fe05c4c0
[2]: ffff8807fe09c4c0
[3]: ffff8807fe0dc4c0
[4]: ffff8807fe11c4c0
[5]: ffff8807fe15c4c0
[6]: ffff8807fe19c4c0
[7]: ffff8807fe1dc4c0
crash> rcu_data.completed,gpnum rcu_preempt_data:a
[0]: ffff8807fe01c4c0
completed = 0x1a94eb
gpnum = 0x1a94eb
[1]: ffff8807fe05c4c0
completed = 0x1a94eb
gpnum = 0x1a94eb
[2]: ffff8807fe09c4c0
completed = 0x1a94eb
gpnum = 0x1a94eb
[3]: ffff8807fe0dc4c0
completed = 0x1a94ed
gpnum = 0x1a94ed
[4]: ffff8807fe11c4c0
completed = 0x1a94ed
gpnum = 0x1a94ed
[5]: ffff8807fe15c4c0
completed = 0x1a94ed
gpnum = 0x1a94ed
[6]: ffff8807fe19c4c0
completed = 0x1a94ea
gpnum = 0x1a94eb
[7]: ffff8807fe1dc4c0
completed = 0x1a94ed
gpnum = 0x1a94ed
crash> rcu_data.cpu rcu_preempt_data:a
[0]: ffff8807fe01c4c0
cpu = 0x0
[1]: ffff8807fe05c4c0
cpu = 0x1
[2]: ffff8807fe09c4c0
cpu = 0x2
[3]: ffff8807fe0dc4c0
cpu = 0x3
[4]: ffff8807fe11c4c0
cpu = 0x4
[5]: ffff8807fe15c4c0
cpu = 0x5
[6]: ffff8807fe19c4c0
cpu = 0x6
[7]: ffff8807fe1dc4c0
cpu = 0x7
rcu_init_one
rcu_process_callbacks
/* synchronize_rcu - wait until a grace period has elapsed. */
synchronize_rcu
https://www.slideshare.net/vh21/yet-another-introduction-of-linux-rcu
http://www.rdrop.com/~paulmck/RCU/
Hierarchical RCU
https://lwn.net/Articles/305782/
list -H rcu_struct_flavors -o rcu_state.flavors -s rcu_state.gpnum
/* Values for rcu_state structure's gp_state field. */
#define RCU_GP_IDLE 0 /* Initial state and no GP in progress. */
#define RCU_GP_WAIT_GPS 1 /* Wait for grace-period start. */
#define RCU_GP_DONE_GPS 2 /* Wait done for grace-period start. */
#define RCU_GP_WAIT_FQS 3 /* Wait for force-quiescent-state time. */
#define RCU_GP_DOING_FQS 4 /* Wait done for force-quiescent-state time. */
#define RCU_GP_CLEANUP 5 /* Grace-period cleanup started. */
#define RCU_GP_CLEANED 6 /* Grace-period cleanup complete. */
rcu_gp_kthread_wake wakes up the following kthread
/* Body of kthread that handles grace periods. */
rcu_gp_kthread
__call_rcu_core
__note_gp_changes
p rcu_state_p
rcu_state.rda 0xffffffff81c49080
rcu_data 0x1c3c0:a
rcu_data 0x1c3c0:a | grep completed
p rcu_state_p
$5 = (struct rcu_state * const) 0xffffffff81c48140 <rcu_sched_state>
struct rcu_state 0xffffffff81c48140
output *(struct rcu_state *)rcu_state_p
p rcu_num_nodes
p rcu_num_lvls
list -l rcu_state.flavors -H rcu_struct_flavors -s rcu_state
p rcu_preempt_data
p rcu_sched_data
p rcu_bh_data
p rcu_preempt_data:all
p rcu_preempt_data:all | grep -w completed
list -H rcu_struct_flavors
ffffffff81c49c70
ffffffff81c4b530
ffffffff81c4a8f0
crash> sym ffffffff81c49c70
ffffffff81c49c70 (D) rcu_preempt_state bf0
crash> sym ffffffff81c4b530
ffffffff81c4b530 (D) rcu_sched_state bf0
crash> sym ffffffff81c4a8f0
ffffffff81c4a8f0 (D) rcu_bh_state bf0
http://linuxgazette.net/133/saha.html
task_struct.tasks init_task -o
list -l task_struct.tasks -H ffffffff81c10870 -s task_struct
list -l task_struct.tasks -H ffffffff81c10870 -s task_struct.cpu
__call_rcu
===icmpv6===
0xffffffff81743f0d : icmpv6_echo_reply 1cd/0x440 [kernel]
0xffffffff817447ca : icmpv6_rcv 46a/0x550 [kernel]
0xffffffff8171e00c : ip6_input_finish cc/0x4d0 [kernel]
0xffffffff8171e451 : ip6_input 41/0xd0 [kernel]
0xffffffff8171de36 : ip6_rcv_finish 46/0xb0 [kernel]
0xffffffff8171e8c2 : ipv6_rcv 3e2/0x630 [kernel]
0xffffffff816480a6 : __netif_receive_skb_core 3f6/0xb90 [kernel]
===ipv6===
0xffffffff815d9080 : ip6_fragment 0/0xb00 [kernel]
0xffffffff815d9c58 : ip6_finish_output d8/0xf0 [kernel]
0xffffffff815d9cc7 : ip6_output 57/0x100 [kernel]
0xffffffff8161110d : ip6_local_out_sk 2d/0x40 [kernel]
0xffffffff81611135 : ip6_local_out 15/0x20 [kernel]
0xffffffff815da1bd : ip6_send_skb 1d/0x70 [kernel]
0xffffffff815da249 : ip6_push_pending_frames 39/0x40 [kernel]
0xffffffff815f6dd3 : rawv6_sendmsg 823/0x950 [kernel]
0xffffffff815a0f44 : inet_sendmsg 64/0xb0 [kernel]
0xffffffff81510d10 : sock_sendmsg b0/0xf0 [kernel]
0xffffffff81511281 : SYSC_sendto 121/0x1c0 [kernel]
0xffffffff81511d0e : SyS_sendto e/0x10 [kernel]
0xffffffff81645b12 : tracesys dd/0xe2 [kernel]
0x7fc3e50ae2e3
parms: sk=0xffff8807e9613f00 skb=0xffff881050d9a300 output=0xffffffff815d75d0
execname: ping6
0xffffffffa07727e0 : br_nf_dev_queue_xmit 0/0xa0 [bridge]
0xffffffffa0772a81 : br_nf_post_routing 201/0x3a0 [bridge]
0xffffffff8155c750 : nf_iterate 70/0xb0 [kernel]
0xffffffff8155c838 : nf_hook_slow a8/0x110 [kernel]
0xffffffffa076ab16 : br_forward_finish 96/0xb0 [bridge]
0xffffffffa0772cf9 : br_nf_forward_finish d9/0x1f0 [bridge]
0xffffffffa0773063 : br_nf_forward_ip 253/0x410 [bridge]
0xffffffff8155c750 : nf_iterate 70/0xb0 [kernel]
0xffffffff8155c838 : nf_hook_slow a8/0x110 [kernel]
0xffffffffa076ac1e : __br_forward ee/0x130 [bridge]
0xffffffffa076b00b : br_forward 8b/0xa0 [bridge]
0xffffffffa076bfa5 : br_handle_frame_finish 175/0x420 [bridge]
0xffffffffa0773575 : br_nf_pre_routing_finish_ipv6 e5/0x1b0 [bridge]
0xffffffffa0774025 : br_nf_pre_routing 5d5/0x730 [bridge]
0xffffffff8155c750 : nf_iterate 70/0xb0 [kernel]
0xffffffff8155c838 : nf_hook_slow a8/0x110 [kernel]
0xffffffffa076c45a : br_handle_frame 20a/0x2d0 [bridge]
0xffffffff8152a4e2 : __netif_receive_skb_core 1e2/0x7d0 [kernel]
0xffffffff8152aae8 : __netif_receive_skb 18/0x60 [kernel]
0xffffffff8152ab70 : netif_receive_skb 40/0xc0 [kernel]
parms: sk=0x0 skb=0xffff8807d7405c00
br_nf_pre_routing_ipv6
0xffffffff815e7250 : ip6_route_input 0/0xd0 [kernel]
0xffffffff815da4c3 : ip6_rcv_finish 93/0xb0 [kernel]
0xffffffff815dac91 : ipv6_rcv 301/0x540 [kernel]
0xffffffff8152a882 : __netif_receive_skb_core 582/0x7d0 [kernel]
0xffffffff8152aae8 : __netif_receive_skb 18/0x60 [kernel]
0xffffffff8152ab70 : netif_receive_skb 40/0xc0 [kernel]
0xffffffff8152b6e0 : napi_gro_receive 80/0xb0 [kernel]
0xffffffffa06f5bba : mlx5e_handle_rx_cqe_mpwrq 58a/0x900 [mlx5_core]
0xffffffffa06f5fe0 : mlx5e_poll_rx_cq b0/0x8e0 [mlx5_core]
0xffffffffa06f7461 : mlx5e_napi_poll d1/0x470 [mlx5_core]
0xffffffff8152afa2 : net_rx_action 152/0x240 [kernel]
0xffffffff81084b0f : __do_softirq ef/0x280 [kernel]
0xffffffff8164721c : call_softirq 1c/0x30 [kernel]
0xffffffff81016fc5 : do_softirq 65/0xa0 [kernel]
0xffffffff81084ea5 : irq_exit 115/0x120 [kernel]
0xffffffff81647db8 : do_IRQ 58/0xf0 [kernel]
0xffffffff8163d0ed : ret_from_intr 0/0x15 [kernel]
parms: skb=0xffff8807dc64ee00
execname: swapper/2
ts: 14
<no user backtrace at kernel.function("ip6_route_input@net/ipv6/route.c:988")>
===gdb===
set radix 16
p *array@len
(gdb) disassemble /m
Dump of assembler code for function mlx5e_xmit:
439 {
=> 0xffffffffc0275b10 <+0>: nopl 0x0(%rax,%rax,1)
0xffffffffc0275bb2 <+162>: push %rbp
0xffffffffc0275bb3 <+163>: mov %rdi,%rsi
0xffffffffc0275bbc <+172>: mov %rsp,%rbp
440 struct mlx5e_priv *priv = netdev_priv(dev);
441 struct mlx5e_tx_wqe *wqe;
442 struct mlx5e_txqsq *sq;
443 u16 pi;
444
445 sq = priv->txq2sq[skb_get_queue_mapping(skb)];
0xffffffffc0275b15 <+5>: movzwl 0x8c(%rdi),%eax
0xffffffffc0275b1c <+12>: mov 0x8c0(%rsi,%rax,8),%rax
446 mlx5e_sq_fetch_wqe(sq, &wqe, &pi);
447
448 /* might send skbs and update wqe and pi */
449 skb = mlx5e_accel_handle_tx(skb, sq, dev, &wqe, &pi);
450 if (unlikely(!skb))
0xffffffffc0275bad <+157>: test %rdi,%rdi
0xffffffffc0275bb0 <+160>: je 0xffffffffc0275bdf <mlx5e_xmit+207>
0xffffffffc0275bd4 <+196>: test %rdi,%rdi
0xffffffffc0275bdd <+205>: jne 0xffffffffc0275bb2 <mlx5e_xmit+162>
451 return NETDEV_TX_OK;
0xffffffffc0275bdf <+207>: xor %eax,%eax
452
453 return mlx5e_sq_xmit(sq, skb, wqe, pi);
0xffffffffc0275bb6 <+166>: mov %r9d,%ecx
0xffffffffc0275bb9 <+169>: mov %rax,%rdi
0xffffffffc0275bbf <+175>: callq 0xffffffffc0275050 <mlx5e_sq_xmit>
454 }
0xffffffffc0275bc4 <+180>: pop %rbp
0xffffffffc0275bc5 <+181>: retq
0xffffffffc0275be1 <+209>: retq
0xffffffffc0275be2: nopl 0x0(%rax)
0xffffffffc0275be6: nopw %cs:0x0(%rax,%rax,1)
End of assembler dump.
#0 mlx5e_xmit (skb=0xffff88105638d600, dev=0xffff881055900000) at drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:439
#1 0xffffffff816af0e8 in __netdev_start_xmit (more=<optimized out>, dev=<optimized out>, skb=<optimized out>, ops=<optimized out>) at ./include/linux/netdevice.h:4376
(More stack frames follow...)
(gdb) disassemble 0xffffffff816af0e8
no arg, disassemble current code
(gdb) disassemble
(gdb) bt 1
#0 mlx5e_xmit (skb=0xffff88105638d600, dev=0xffff881055900000) at drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:439
# edit file
edit mlx5e_xmit
or
edit 439
To display the backtrace for several or all of the threads
(gdb) thread apply all bt
Print only the innermost n frames
bt 2
Print only the outermost n frames
bt -2
Print the values of the local variables
bt full
bt full 2
(gdb) tbreak
temporary break
info program
info regsiters
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y 0xffffffffc027dc00 in mlx5e_handle_rx_cqe_mpwrq at drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:1200
breakpoint already hit 1 time
(gdb) d 1
(gdb) x/16xh 0xffff88875d92e040
0xffff88875d92e040: 0xffff 0xffff 0xffff 0x2502 0x14d0 0x0201 0xa888 0xe803
0xffff88875d92e050: 0x0608 0x0100 0x0008 0x0406 0x0100 0x2502 0x14d0 0x0201
x 是 examine 的缩写
n表示要显示的内存单元的个数
f表示显示方式, 可取如下值
x 按十六进制格式显示变量。
d 按十进制格式显示变量。
u 按十进制格式显示无符号整型。
o 按八进制格式显示变量。
t 按二进制格式显示变量。
a 按十六进制格式显示变量。
i 指令地址格式
c 按字符格式显示变量。
f 按浮点数格式显示变量。
u表示一个地址单元的长度
b表示单字节,
h表示双字节,
w表示四字节,
g表示八字节
generate-core-file [file]
gcore [file]
# don't print address of a string
set print addr off
# print long string
set print elements 0
# get rid of '<repeats n times>'
set print repeats unlimited
set print pretty on
info threads
thread 10
https://sourceware.org/gdb/wiki/FAQ
set height 0
b find_match_wc
print/x *flow
ptype /o struct shash_node
explore all_ofproto_dpifs
===chrome===
chrome://settings/content
===core===
https://sigquit.wordpress.com/2009/03/13/the-core-pattern/
mkdir -p /tmp/cores
chmod a+rwx /tmp/cores
echo "/tmp/cores/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern
coredumpctl list
ulimit -c unlimited
echo "core" > /proc/sys/kernel/core_pattern
gcc -o main -g a.c
gdb main /tmp/core-main-10815
===idr===
#define __GFP_BITS_SHIFT 26
#define ROOT_IS_IDR ((__force gfp_t)(1 << __GFP_BITS_SHIFT))
idr_get_next
===rtnl===
rtnetlink_rcv_msg
{
RTNL_FLAG_DOIT_UNLOCKED
}
/* control path */
static void rtnetlink_rcv (struct sk_buff *skb)
{
rtnl_lock();
netlink_rcv_skb(skb, &rtnetlink_rcv_msg);
rtnl_unlock();
}
/* fast path */
netif_receive_skb_internal(struct sk_buff *skb)
{
rcu_read_lock();
ret = __netif_receive_skb(skb);
rcu_read_unlock();
}
rtnetlink_init
rtnl_msg_handlers
rtnetlink_rcv_msg
crash> rtnl_link ffff880c88496ab8
struct rtnl_link {
doit = 0xffffffff8163b320 <tc_ctl_tfilter>,
dumpit = 0x0,
calcit = 0x0
}
===olddefconfig===
CONFIG_LOCALVERSION_AUTO
CONFIG_PANIC_ON_OOPS
# systemtap
MODVERSION
UPROBE