Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
fix ghr
Browse files Browse the repository at this point in the history
  • Loading branch information
pudelkoM committed Jul 12, 2022
1 parent 3863d8a commit 349e4e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
name: "Publish Release on GitHub"
command: |
go get -u github.com/tcnksm/ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete r${CIRCLE_BUILD_NUM} ./artifacts/
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace r${CIRCLE_BUILD_NUM} ./artifacts/
publish-github-pre-release:
docker:
Expand All @@ -86,7 +86,7 @@ jobs:
name: "Publish Release on GitHub"
command: |
go get -u github.com/tcnksm/ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete -prerelease ${CIRCLE_BRANCH} ./artifacts/
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace -prerelease ${CIRCLE_BRANCH} ./artifacts/
workflows:
version: 2
Expand Down
30 changes: 7 additions & 23 deletions src/linux/knet/ngknet_extra.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,31 +431,16 @@ ngknet_rx_pkt_filter(struct ngknet_dev *dev, struct sk_buff *skb, struct net_dev
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
static void
ngknet_rl_process(unsigned long data)
{
struct ngknet_rl_ctrl *rc = (struct ngknet_rl_ctrl *)data;
struct ngknet_dev *dev;
unsigned long flags;
int idx;

spin_lock_irqsave(&rc->lock, flags);
rc->rx_pkts = 0;
for (idx = 0; idx < NUM_PDMA_DEV_MAX; idx++) {
dev = &rc->devs[idx];
if (rc->dev_active[idx] && rc->dev_paused[idx]) {
bcmcnet_pdma_dev_rx_resume(&dev->pdma_dev);
rl_ctrl.dev_paused[dev->dev_no] = 0;
}
}
spin_unlock_irqrestore(&rc->lock, flags);

rc->timer.expires = jiffies + HZ / rc->rx_ticks;
add_timer(&rc->timer);
}
#else
static void
ngknet_rl_process(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
struct ngknet_rl_ctrl *rc = (struct ngknet_rl_ctrl *)data;
#else
struct ngknet_rl_ctrl *rc = from_timer(rc, t, timer);
#endif
struct ngknet_dev *dev;
unsigned long flags;
int idx;
Expand All @@ -474,7 +459,6 @@ ngknet_rl_process(struct timer_list *t)
rc->timer.expires = jiffies + HZ / rc->rx_ticks;
add_timer(&rc->timer);
}
#endif

void
ngknet_rx_rate_limit_init(struct ngknet_dev *devs)
Expand All @@ -485,11 +469,11 @@ ngknet_rx_rate_limit_init(struct ngknet_dev *devs)
init_timer(&rl_ctrl.timer);
rl_ctrl.timer.data = (unsigned long)&rl_ctrl;
rl_ctrl.timer.function = ngknet_rl_process;
spin_lock_init(&rl_ctrl.lock);
rl_ctrl.devs = devs;
#else
timer_setup(&rl_ctrl.timer, ngknet_rl_process, 0);
#endif
spin_lock_init(&rl_ctrl.lock);
rl_ctrl.devs = devs;
}

void
Expand Down

0 comments on commit 349e4e7

Please sign in to comment.