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

collection: don't copy btf.Spec in CollectionSpec.Copy() #584

Merged
merged 1 commit into from Feb 23, 2022

Commits on Feb 23, 2022

  1. collection: don't copy btf.Spec in CollectionSpec.Copy()

    Copying btf.Spec requires updating Map/Program.BTF.(S,s)pec, which gets
    complicated due to btf.Map/Program being pointers.
    
    Instead of implementing a full deep-copy, avoid copying btf.Spec for now,
    since it's considered read-only. Since we're planning to get rid of
    btf.Program/Map anyway, this would not be worth the investment.
    
    Add a test that loads both a copy and an original CollectionSpec.
    
    Signed-off-by: Timo Beckers <timo@isovalent.com>
    ti-mo committed Feb 23, 2022
    Copy the full SHA
    1c32cfe View commit details
    Browse the repository at this point in the history