Commit f2c1788
committed
Auto merge of #3420 - elecm:main, r=JohnTitor
feat: add GSO flags for linux and android
Add Generic Segmentation Offload (GSO) flags based on [if_tun.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/if_tun.h#L87) header in Linux and [if_tun.h](https://android.googlesource.com/platform/bionic/+/HEAD/libc/kernel/uapi/linux/if_tun.h#71) header in Android source code.
Include the `IFF_NO_CARRIER` flag as well (found in the same files mentioned in the previous paragraph).
There is a [PR](#3320 (comment)) similar to mine, but that PR doesn't include GSO flags for UDP (`TUN_F_USO4` and `TUN_F_USO6`), and it is only for Linux. And also, I used `c_uint`type for GSO flags because related ioctl function (`#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)`) get `unsigned int` but that PR uses `c_ushort`.File tree
5 files changed
+35
-5
lines changed- libc-test
- semver
- src/unix/linux_like
- android
- linux
5 files changed
+35
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1824 | 1824 | | |
1825 | 1825 | | |
1826 | 1826 | | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1827 | 1830 | | |
1828 | 1831 | | |
1829 | 1832 | | |
| |||
3857 | 3860 | | |
3858 | 3861 | | |
3859 | 3862 | | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
3860 | 3866 | | |
3861 | 3867 | | |
3862 | 3868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
| 702 | + | |
702 | 703 | | |
703 | 704 | | |
704 | 705 | | |
| |||
708 | 709 | | |
709 | 710 | | |
710 | 711 | | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
711 | 719 | | |
712 | 720 | | |
713 | 721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
| 935 | + | |
935 | 936 | | |
936 | 937 | | |
937 | 938 | | |
| |||
940 | 941 | | |
941 | 942 | | |
942 | 943 | | |
| 944 | + | |
| 945 | + | |
943 | 946 | | |
944 | 947 | | |
945 | 948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2481 | 2481 | | |
2482 | 2482 | | |
2483 | 2483 | | |
| 2484 | + | |
2484 | 2485 | | |
2485 | 2486 | | |
2486 | 2487 | | |
| |||
2490 | 2491 | | |
2491 | 2492 | | |
2492 | 2493 | | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
2493 | 2502 | | |
2494 | 2503 | | |
2495 | 2504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1866 | 1866 | | |
1867 | 1867 | | |
1868 | 1868 | | |
| 1869 | + | |
| 1870 | + | |
1869 | 1871 | | |
1870 | 1872 | | |
1871 | 1873 | | |
| |||
1886 | 1888 | | |
1887 | 1889 | | |
1888 | 1890 | | |
1889 | | - | |
1890 | | - | |
1891 | | - | |
1892 | | - | |
1893 | | - | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
1894 | 1898 | | |
1895 | 1899 | | |
1896 | 1900 | | |
| |||
0 commit comments