summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_plug.c
AgeCommit message (Collapse)Author
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21net: sched: sch: add extack for change qdisc opsAlexander Aring
This patch adds extack support for change callback for qdisc ops structtur to prepare per-qdisc specific changes for extack. Cc: David Ahern <dsahern@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Alexander Aring <aring@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-21net: sched: sch: add extack for init callbackAlexander Aring
This patch adds extack support for init callback to prepare per-qdisc specific changes for extack. Cc: David Ahern <dsahern@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Alexander Aring <aring@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-25net_sched: drop packets after root qdisc lock is releasedEric Dumazet
Qdisc performance suffers when packets are dropped at enqueue() time because drops (kfree_skb()) are done while qdisc lock is held, delaying a dequeue() draining the queue. Nominal throughput can be reduced by 50 % when this happens, at a time we would like the dequeue() to proceed as fast as possible. Even FQ is vulnerable to this problem, while one of FQ goals was to provide some flow isolation. This patch adds a 'struct sk_buff **to_free' parameter to all qdisc->enqueue(), and in qdisc_drop() helper. I measured a performance increase of up to 12 %, but this patch is a prereq so that future batches in enqueue() can fly. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-10net_sched: sch_plug: use a private throttled statusEric Dumazet
We want to get rid of generic qdisc throttled management, so this qdisc has to use a private flag. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-08sched: remove qdisc_rehape_failFlorian Westphal
After the removal of TCA_CBQ_POLICE in cbq scheduler qdisc->reshape_fail is always NULL, i.e. qdisc_rehape_fail is now the same as qdisc_drop. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18net: sched: drop all special handling of tx_queue_len == 0Phil Sutter
Those were all workarounds for the formerly double meaning of tx_queue_len, which broke scheduling algorithms if untreated. Now that all in-tree drivers have been converted away from setting tx_queue_len = 0, it should be safe to drop these workarounds for categorically broken setups. Signed-off-by: Phil Sutter <phil@nwl.cc> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-24sch_plug: purge buffered packets during resetWANG Cong
Otherwise the skbuff related structures are not correctly refcount'ed. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-13net_sched: sch_plug: plug_qdisc_ops is staticEric Dumazet
net/sched/sch_plug.c:211:18: warning: symbol 'plug_qdisc_ops' was not declared. Should it be static? Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-07net/sched: sch_plug - Queue traffic until an explicit release commandShriram Rajagopalan
The qdisc supports two operations - plug and unplug. When the qdisc receives a plug command via netlink request, packets arriving henceforth are buffered until a corresponding unplug command is received. Depending on the type of unplug command, the queue can be unplugged indefinitely or selectively. This qdisc can be used to implement output buffering, an essential functionality required for consistent recovery in checkpoint based fault-tolerance systems. Output buffering enables speculative execution by allowing generated network traffic to be rolled back. It is used to provide network protection for Xen Guests in the Remus high availability project, available as part of Xen. This module is generic enough to be used by any other system that wishes to add speculative execution and output buffering to its applications. This module was originally available in the linux 2.6.32 PV-OPS tree, used as dom0 for Xen. For more information, please refer to http://nss.cs.ubc.ca/remus/ and http://wiki.xensource.com/xenwiki/Remus Changes in V3: * Removed debug output (printk) on queue overflow * Added TCQ_PLUG_RELEASE_INDEFINITE - that allows the user to use this qdisc, for simple plug/unplug operations. * Use of packet counts instead of pointers to keep track of the buffers in the queue. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Signed-off-by: Brendan Cully <brendan@cs.ubc.ca> [author of the code in the linux 2.6.32 pvops tree] Signed-off-by: David S. Miller <davem@davemloft.net>
='#n200'>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
---
name: Docker
on:
  push:
    branches:
      - master
  pull_request: null
  workflow_dispatch:
    inputs:
      version:
        description: Version Tag
        default: nightly
        required: true
env:
  DISABLE_TELEMETRY: 1
concurrency:
  group: docker-${{ github.ref }}-${{ github.event_name }}
  cancel-in-progress: true
jobs:
  file-check: # Check what files changed if we’re being run in a PR or on a push.
    name: Check Modified Files
    runs-on: ubuntu-latest
    outputs:
      run: ${{ steps.check-run.outputs.run }}
    steps:
      - name: Checkout
        id: checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          submodules: recursive
      - name: Check files
        id: file-check
        uses: tj-actions/changed-files@v40
        with:
          since_last_remote_commit: ${{ github.event_name != 'pull_request' }}
          files: |
            **.c
            **.cc
            **.h
            **.hh
            **.in
            .dockerignore
            configure.ac
            netdata-installer.sh
            **/Makefile*
            Makefile*
            .github/workflows/docker.yml
            .github/scripts/docker-test.sh
            build/**
            packaging/docker/**
            packaging/installer/**
            aclk/aclk-schemas/
            ml/dlib/
            mqtt_websockets
            web/server/h2o/libh2o
          files_ignore: |
            netdata.spec.in
            **.md
      - name: Check Run
        id: check-run
        run: |
          if [ "${{ steps.file-check.outputs.any_modified }}" == "true" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
            echo 'run=true' >> "${GITHUB_OUTPUT}"
          else
            echo 'run=false' >> "${GITHUB_OUTPUT}"
          fi

  docker-test:
    name: Docker Runtime Test
    needs:
      - file-check
    runs-on: ubuntu-latest
    steps:
      - name: Skip Check
        id: skip
        if: needs.file-check.outputs.run != 'true'
        run: echo "SKIPPED"
      - name: Checkout
        id: checkout
        if: needs.file-check.outputs.run == 'true'
        uses: actions/checkout@v4
        with:
          submodules: recursive
      - name: Setup Buildx
        id: prepare
        if: needs.file-check.outputs.run == 'true'
        uses: docker/setup-buildx-action@v3
      - name: Test Build
        id: build
        if: needs.file-check.outputs.run == 'true'
        uses: docker/build-push-action@v5
        with:
          load: true
          push: false
          tags: netdata/netdata:test
      - name: Test Image
        id: test
        if: needs.file-check.outputs.run == 'true'
        run: .github/scripts/docker-test.sh
      - name: Failure Notification
        uses: rtCamp/action-slack-notify@v2
        env:
          SLACK_COLOR: 'danger'
          SLACK_FOOTER: ''
          SLACK_ICON_EMOJI: ':github-actions:'
          SLACK_TITLE: 'Docker runtime testing failed:'
          SLACK_USERNAME: 'GitHub Actions'
          SLACK_MESSAGE: |-
              ${{ github.repository }}: Building or testing Docker image for linux/amd64 failed.
              CHeckout: ${{ steps.checkout.outcome }}
              Setup buildx: ${{ steps.prepare.outcome }}
              Build image: ${{ steps.build.outcome }}
              Test image: ${{ steps.test.outcome }}
          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
        if: >-
          ${{
            failure()
            && github.event_name != 'pull_request'
            && startsWith(github.ref, 'refs/heads/master')
            && github.repository == 'netdata/netdata'
            && needs.file-check.outputs.run == 'true'
          }}

  docker-ci:
    if: github.event_name != 'workflow_dispatch'
    name: Docker Alt Arch Builds
    needs:
      - docker-test
      - file-check
    runs-on: ubuntu-latest
    strategy:
      matrix:
        platforms:
          - linux/i386
          - linux/arm/v7
          - linux/arm64
          - linux/ppc64le
    steps:
      - name: Skip Check
        id: skip
        if: needs.file-check.outputs.run != 'true'
        run: echo "SKIPPED"
      - name: Checkout
        id: checkout
        if: needs.file-check.outputs.run == 'true'
        uses: actions/checkout@v4
        with:
          submodules: recursive
      - name: Setup QEMU
        id: qemu
        if: matrix.platforms != 'linux/i386' && needs.file-check.outputs.run == 'true'
        uses: docker/setup-qemu-action@v3
      - name: Setup Buildx
        id: buildx
        if: needs.file-check.outputs.run == 'true'
        uses: docker/setup-buildx-action@v3
      - name: Build
        id: build
        if: needs.file-check.outputs.run == 'true'
        uses: docker/build-push-action@v5
        with:
          platforms: ${{ matrix.platforms }}
          load: false
          push: false
          tags: netdata/netdata:test
      - name: Failure Notification
        uses: rtCamp/action-slack-notify@v2
        env:
          SLACK_COLOR: 'danger'
          SLACK_FOOTER: ''
          SLACK_ICON_EMOJI: ':github-actions:'
          SLACK_TITLE: 'Docker build testing failed:'
          SLACK_USERNAME: 'GitHub Actions'
          SLACK_MESSAGE: |-
              ${{ github.repository }}: Building Docker image for ${{ matrix.platforms }} failed.
              CHeckout: ${{ steps.checkout.outcome }}
              Setup QEMU: ${{ steps.qemu.outcome }}
              Setup buildx: ${{ steps.buildx.outcome }}
              Build image: ${{ steps.build.outcome }}
          SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
        if: >-
          ${{
            failure()
            && github.event_name != 'pull_request'
            && startsWith(github.ref, 'refs/heads/master')
            && github.repository == 'netdata/netdata'
            && needs.file-check.outputs.run == 'true'
          }}

  normalize-tag: # Fix the release tag if needed
    name: Normalize Release Tag
    runs-on: ubuntu-latest
    if: github.event_name == 'workflow_dispatch'
    outputs:
      tag: ${{ steps.tag.outputs.tag }}
    steps:
      - name: Normalize Tag
        id: tag
        run: |
          if echo ${{ github.event.inputs.version }} | grep -qE '^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$'; then
            echo "tag=v${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
          else
            echo "tag=${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
          fi

  docker-publish:
    if: github.event_name == 'workflow_dispatch'
    name: Docker Build and Publish
    needs:
      - docker-test
      - normalize-tag
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        id: checkout
        uses: actions/checkout@v4
        with:
          submodules: recursive
      - name: Determine which tags to use
        id: release-tags
        if: github.event.inputs.version != 'nightly'
        run: |
          echo "tags=netdata/netdata:latest,netdata/netdata:stable,ghcr.io/netdata/netdata:latest,ghcr.io/netdata/netdata:stable,quay.io/netdata/netdata:latest,quay.io/netdata/netdata:stable,$(.github/scripts/gen-docker-tags.py ${{ needs.normalize-tag.outputs.tag }} '')" \
              >> "${GITHUB_ENV}"
      - name: Determine which tags to use
        id: nightly-tags
        if: github.event.inputs.version == 'nightly'
        run: |
          echo "tags=netdata/netdata:latest,netdata/netdata:edge,ghcr.io/netdata/netdata:latest,ghcr.io/netdata/netdata:edge,quay.io/netdata/netdata:latest,quay.io/netdata/netdata:edge" >> "${GITHUB_ENV}"
      - name: Mark image as official
        id: env
        if: github.repository == 'netdata/netdata'
        run: echo "OFFICIAL_IMAGE=true" >> "${GITHUB_ENV}"
      - name: Setup QEMU
        id: qemu
        uses: docker/setup-qemu-action@v3
      - name: Setup Buildx
        id: buildx
        uses: docker/setup-buildx-action@v3
      - name: Docker Hub Login
        id: docker-hub-login
        if: github.repository == 'netdata/netdata'
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKER_HUB_USERNAME }}
          password: ${{ secrets.DOCKER_HUB_PASSWORD }}
      - name: GitHub Container Registry Login
        id: ghcr-login
        if: github.repository == 'netdata/netdata'
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - name: Quay.io Login
        id: quay-login
        if: github.repository == 'netdata/netdata'
        uses: docker/login-action@v3
        with:
          registry: quay.io
          username: ${{ secrets.NETDATABOT_QUAY_USERNAME }}
          password: ${{ secrets.NETDATABOT_QUAY_TOKEN }}
      - name: Docker Build
        id: build
        uses: docker/build-push-action@v5
        with:
          platforms: linux/amd64,linux/i386,linux/arm/v7,linux/arm64,linux/ppc64le
          push: ${{ github.repository == 'netdata/netdata' }}
          tags: ${{ env.tags }}
          build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
      - <