Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove local caching and conversion to uintptr #88

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

jayanthvn
Copy link
Contributor

Issue #, if available: N/A

Description of changes:
Bulk update refresh caches the input and converts String to byte ptr. On high scale, the byte ptr is getting GC'ed and data is invalid which would cause update to fail.

Unable to Bulk Refresh eBPF map:  unable to update map: invalid argument
FAILED
Let's unmount BPF FS
===========================================================
                   TESTING SUMMARY                         
===========================================================
                   TestCase|Result
             Test loading V6 Program|SUCCESS
              Test loading TC filter|SUCCESS
   Test loading Maps without Program|SUCCESS
         Test loading Map operations|SUCCESS
              Test updating Map size|SUCCESS
            Test bulk Map operations|SUCCESS <- succeeded with just using update API (UpdateMapEntry)
    Test bulk refresh Map operations|FAILED <- failed with 32K (BulkRefreshMapEntries API is failing with high scale)
                Test loading Program|SUCCESS
===========================================================

With fix -

Updated 32K entries successfully
SUCCESS!
Let's unmount BPF FS
===========================================================
                   TESTING SUMMARY                         
===========================================================
                   TestCase|Result
             Test loading V6 Program|SUCCESS
              Test loading TC filter|SUCCESS
   Test loading Maps without Program|SUCCESS
         Test loading Map operations|SUCCESS
              Test updating Map size|SUCCESS
            Test bulk Map operations|SUCCESS
    Test bulk refresh Map operations|SUCCESS
                Test loading Program|SUCCESS
===========================================================

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jayanthvn jayanthvn requested a review from a team as a code owner August 23, 2024 22:13
pkg/maps/loader.go Outdated Show resolved Hide resolved
@jayanthvn jayanthvn force-pushed the refactor_update branch 2 times, most recently from 5ee4bb7 to d28ba28 Compare August 25, 2024 01:06
@jayanthvn jayanthvn merged commit 9138d08 into aws:main Aug 26, 2024
2 checks passed
@jayanthvn jayanthvn deleted the refactor_update branch August 26, 2024 23:22
jayanthvn added a commit that referenced this pull request Aug 29, 2024
* Fixup update flow (#88)

* Bump golang.org/x/sys from 0.20.0 to 0.24.0 (#89)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.20.0 to 0.24.0.
- [Commits](golang/sys@v0.20.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix test on rel-branch

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jayanthvn added a commit that referenced this pull request Nov 5, 2024
* Use default error formating instead of wrap when errors.Wrap isn't implemented.

Use default error formatting when the error wrap isn't available.

The error message that was seen was

```{"level":"error","ts":"2024-06-30T10:52:42.597Z","caller":"ebpf/bpf_client.go:563","msg":"failed to find device by name eni3d4ff16416b: %!w(netlink.LinkNotFoundError={0xc0007ae7c0})"}
```

* Fixup update flow (#88)

* Bump golang.org/x/sys from 0.20.0 to 0.24.0 (#89)

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.20.0 to 0.24.0.
- [Commits](golang/sys@v0.20.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix test on rel-branch

* Log the return error no from syscall

* Fix PR checks

Fix PR checks

* fix go dependencies.

* fix go.sum dependencies.

* Bump github.com/vishvananda/netlink from 1.1.0 to 1.3.0

Bumps [github.com/vishvananda/netlink](https://github.com/vishvananda/netlink) from 1.1.0 to 1.3.0.
- [Release notes](https://github.com/vishvananda/netlink/releases)
- [Commits](vishvananda/netlink@v1.1.0...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/vishvananda/netlink
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Updated go.mod dependencies.

* Bump golang.org/x/sys from 0.24.0 to 0.26.0

Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.24.0 to 0.26.0.
- [Commits](golang/sys@v0.24.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* updated go mod and go sum.

* added GetBPFmapInfo method to support PIN_NONE where pinpath does not exist (#96)

Co-authored-by: Nithish Kumar Murcherla <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Senthil Kumaran <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jay Deokar <[email protected]>
Co-authored-by: Yash Thakkar <[email protected]>
Co-authored-by: Senthil Kumaran <[email protected]>
Co-authored-by: Nithish Murcherla <[email protected]>
Co-authored-by: Nithish Kumar Murcherla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants