Skip to content

Commit

Permalink
Merge branch 'master' into mohsin-perf-bench
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsinkazmi authored Dec 13, 2024
2 parents d3f3cc4 + 69953cc commit 87c461f
Show file tree
Hide file tree
Showing 173 changed files with 2,148 additions and 357 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ jobs:
with:
config_file: '.github/ci/yamllint.yml'

markdownlint:
name: "Lint Markdown"
runs-on: ubuntu-latest
steps:
- uses: DavidAnson/markdownlint-cli2-action@v18
with:
fix: true
globs: '**/*.md'

go-mod:
name: "Check go.mod"
strategy:
Expand Down Expand Up @@ -59,7 +68,7 @@ jobs:
matrix:
go: [ '1.22' ]
env:
VERSION: v0.10.0
VERSION: v0.11.0
runs-on: ubuntu-latest
steps:
- name: "Checkout"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: "Print environment"
run: |
env | sort
- name: "Release Version"
if: success() && startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
matrix:
version:
- 'master'
- '2406'
- '2402'
- '2310'
- '2306'

steps:
- name: "Checkout"
Expand Down
7 changes: 5 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ builds:
- -X go.fd.io/govpp/version.commit={{.FullCommit}}
- -X go.fd.io/govpp/version.branch={{.Branch}}
- -X go.fd.io/govpp/version.buildStamp={{.Timestamp}}
- -X go.fd.io/govpp/version.buildUser={{if index .Env "USER"}}{{.Env.USER}}{{else}}goreleaser{{end}}
- -X go.fd.io/govpp/version.buildHost={{if index .Env "HOSTNAME"}}{{.Env.HOSTNAME}}{{else}}goreleaser{{end}}

archives:
- id: govpp-archive
Expand All @@ -53,10 +55,11 @@ changelog:

dockers:
- dockerfile: Dockerfile.govpp
skip_push: auto
image_templates:
- "ghcr.io/fdio/govpp:{{ .Tag }}"
- "ghcr.io/fdio/govpp:v{{ .Major }}.{{ .Minor }}"
- "ghcr.io/fdio/govpp:latest"
- "{{if not .Prerelease}}ghcr.io/fdio/govpp:v{{ .Major }}.{{ .Minor }}{{end}}"
- "{{if not .Prerelease}}ghcr.io/fdio/govpp:latest{{end}}"
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ This file lists changes for the GoVPP releases.
-
-->

## 0.11.0

> _19 September 2024_
### Changes

- Minor changes (#223)
- Add well-known reply timeout error (#234)

### GoMemif

- Gomemif improvemets (#228)
- Improves gomemif library (#216)

### CI

- Add Release workflow with goreleaser (#202)
- Add Login to ghcr step to release Workflow (#212)
- Extras integration testing (#233)
- lint: check markdown files (#238)

## 0.10.0

> _03 April 2024_
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VPP_VERSION=v24.02
ARG VPP_VERSION=v24.06
ARG UBUNTU_VERSION=22.04

FROM ubuntu:${UBUNTU_VERSION} as vppbuild
Expand Down
12 changes: 11 additions & 1 deletion Dockerfile.govpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
FROM scratch
FROM alpine:3.20

RUN set -eux; \
apk add --no-cache \
bash \
git \
make \
python3 \
py3-ply

COPY govpp /

ENTRYPOINT ["/govpp"]
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ endif
# Package cloud repo for VPP.
VPP_REPO ?= release
# VPP Docker image to use for api generation (gen-binapi-docker)
VPP_IMG ?= ligato/vpp-base:24.02-release
VPP_IMG ?= ligato/vpp-base:24.06-release
# Local VPP directory used for binary api generation (gen-binapi-from-code)
VPP_DIR ?=
# Target directory for generated go api bindings
Expand Down Expand Up @@ -104,6 +104,15 @@ install-proxy: ## Install vpp-proxy
@echo "# installing vpp-proxy ${VERSION}"
@go install ${GO_BUILD_ARGS} ./cmd/vpp-proxy

.PHONY: install-goreleaser
install-goreleaser: ## Install goreleaser
@echo "# installing goreleaser"
@go install github.com/goreleaser/goreleaser/v2@latest

.PHONY: release-snapshot
release-snapshot: ## Release snapshot
@goreleaser release --clean --snapshot

.PHONY: generate
generate: generate-binapi ## Generate all

Expand Down
46 changes: 44 additions & 2 deletions adapter/socketclient/socketclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,10 @@ func (c *Client) Disconnect() error {
// wait for readerLoop to return
c.wg.Wait()

// Don't bother sending a vl_api_sockclnt_delete_t message,
// just close the socket.
if err := c.close(); err != nil {
log.Debugf("closing failed: %v", err)
}

if err := c.disconnect(); err != nil {
return err
}
Expand Down Expand Up @@ -408,6 +410,46 @@ func (c *Client) open(clientName string) error {
return nil
}

func (c *Client) close() error {
var msgCodec = codec.DefaultCodec

req := &memclnt.SockclntDelete{
Index: c.clientIndex,
}
msg, err := msgCodec.EncodeMsg(req, c.sockDelMsgId)
if err != nil {
log.Debugln("Encode error:", err)
return err
}
setMsgRequestHeader(msg, c.clientIndex, uint32(deleteMsgContext))

if err := c.writeMsg(msg); err != nil {
log.Debugln("Write error: ", err)
return err
}

msgReply, err := c.readMsgTimeout(nil, c.disconnectTimeout)
if err != nil {
var nerr net.Error
if errors.As(err, &nerr) && nerr.Timeout() {
log.Debugf("timeout read sockclnt_delete_reply: %w", err)
return nil // we accept timeout for reply
}
log.Debugln("Read sockclnt_delete_reply error:", err)
return err
}

reply := new(memclnt.SockclntDeleteReply)
if err := msgCodec.DecodeMsg(msgReply, reply); err != nil {
log.Debugln("Decoding sockclnt_delete_reply failed:", err)
return err
} else if reply.Response != 0 {
return fmt.Errorf("sockclnt_delete_reply: response error (%d)", reply.Response)
}

return nil
}

func (c *Client) setMsgTable(msgTable map[string]uint16, sockDelMsgId uint16) {
c.msgTableMu.Lock()
defer c.msgTableMu.Unlock()
Expand Down
4 changes: 2 additions & 2 deletions binapi/abf/abf.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/acl/acl.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/acl_types/acl_types.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/adl/adl.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/af_packet/af_packet.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/af_xdp/af_xdp.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/arp/arp.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/arping/arping.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/avf/avf.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/bfd/bfd.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/bier/bier.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions binapi/bond/bond.ba.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 87c461f

Please sign in to comment.