소스 검색

ci: split kernel configuration into separate actions

Add bbrv3
TheWildJames 4 달 전
부모
커밋
57489299e8
3개의 변경된 파일60개의 추가작업 그리고 11개의 파일을 삭제
  1. 52 0
      .github/actions/bbr/action.yml
  2. 1 9
      .github/actions/netfilter-ipset/action.yml
  3. 7 2
      .github/workflows/build.yml

+ 52 - 0
.github/actions/bbr/action.yml

@@ -0,0 +1,52 @@
+name: Setup TCP BBR v3
+description: configure TCP BBR v3
+inputs:
+  kernel_version:
+    description: 'Kernel version (e.g., 6.6)'
+    required: true
+
+runs:
+  using: composite
+  steps:
+    - name: Extract BBG Version
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel/common
+      run: |
+        if [ "$inputs.kernel_version" == "6.1" ]; then
+          cp $GITHUB_WORKSPACE/kernel_patches/bbrv3-a14-6.1.patch $GITHUB_WORKSPACE/kernel/common
+          patch -p1 < $GITHUB_WORKSPACE/kernel/common/bbrv3-a14-6.1.patch
+        fi
+
+    - name: Fix modules.bzl
+      shell: bash
+      if: false
+      working-directory: ${{ github.workspace }}/kernel/common
+      run: |
+        if [ "$inputs.kernel_version" == "6.1" ]; then
+          mods_file=modules.bzl
+          for m in "net/ipv4/tcp_bic.ko" "net/ipv4/tcp_htcp.ko" "net/ipv4/tcp_westwood.ko"; do
+            grep -q "'$m'" "$mods_file" && continue
+            sed -i "/_ARM64_GKI_MODULES_LIST = \[/,/^]/ s/^]/    \"$m\",\n]/" "$mods_file"
+          done
+        fi
+
+    - name: Add BBRv3 Config
+      shell: bash
+      working-directory: ${{ github.workspace }}/kernel/common
+      run: |
+        if [ "$inputs.kernel_version" == "6.1" ]; then
+          cat >> "${{ github.workspace }}/wild_gki.fragment" << 'EOF'
+          CONFIG_TCP_CONG_ADVANCED=y
+          CONFIG_TCP_CONG_BBR=y
+          CONFIG_DEFAULT_BBR=y
+          CONFIG_DEFAULT_TCP_CONG="bbr"
+          CONFIG_NET_SCH_FQ=y
+
+          # CONFIG_TCP_CONG_BIC is not set
+          # CONFIG_TCP_CONG_WESTWOOD is not set
+          # CONFIG_TCP_CONG_HTCP is not set
+          EOF
+        fi
+        
+
+    

+ 1 - 9
.github/actions/configure-kernel/action.yml → .github/actions/netfilter-ipset/action.yml

@@ -1,4 +1,4 @@
-name: 'Configure Kernel Options'
+name: 'Setup netfilter/ipset options'
 description: 'Set up kernel configuration fragment with required options'
 inputs:
   kernel_version:
@@ -19,14 +19,6 @@ runs:
         CONFIG_IP6_NF_TARGET_HL=y
         CONFIG_IP6_NF_MATCH_HL=y
 
-        # BBR TCP Congestion Control
-        CONFIG_TCP_CONG_ADVANCED=y
-        CONFIG_TCP_CONG_BBR=y
-        CONFIG_NET_SCH_FQ=y
-        # CONFIG_TCP_CONG_BIC is not set
-        # CONFIG_TCP_CONG_WESTWOOD is not set
-        # CONFIG_TCP_CONG_HTCP is not set
-
         # IPSet Support
         CONFIG_IP_SET=y
         CONFIG_IP_SET_MAX=65534

+ 7 - 2
.github/workflows/build.yml

@@ -257,8 +257,13 @@ jobs:
       with:
         kernel_version: ${{ steps.parse.outputs.kernel_version }}
 
-    - name: Configure Kernel Options
-      uses: ./.github/actions/configure-kernel
+    - name: Setup netfilter/ipset options
+      uses: ./.github/actions/netfilter-ipset
+      with:
+        kernel_version: ${{ steps.parse.outputs.kernel_version }}
+
+    - name: Setup BBRv3
+      uses: ./.github/actions/bbr
       with:
         kernel_version: ${{ steps.parse.outputs.kernel_version }}