Skip to content

Conversation

@arnavk23
Copy link

@arnavk23 arnavk23 commented Nov 5, 2025

  • I regenerated from the BESS proto sources (the authoritative proto inputs) to ensure the generated Go code matches upstream definitions.
  • I used the same generator versions as your Dockerfile (protoc-gen-go v1.36.10, protoc-gen-go-grpc v1.5.1) so runtime and generated code align.
  • Recommendation : Merging pfcpiface: add parse-error diagnostics, safe handling, raw dump and test #950 before this pr.

arnavk23 and others added 14 commits November 3, 2025 23:05
…ploy_debug script

Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
…(keeps letters, digits, '.', '-', '' and replaces everything else with '').

Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Co-authored-by: Gabriel Arrobo <gabriel.arrobo@intel.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
…nRegenerated .pb.go files from latest BESS protobufs using protoc + protoc-gen-go/protoc-gen-go-grpc.\n\nSigned-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>

Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
@arnavk23 arnavk23 changed the title Chore/protobuf upgrade protobuf upgrade Nov 5, 2025
@gab-arrobo
Copy link
Contributor

Thanks for opening this PR. Have you tested the changes? Do not we need to make changes also in the BESS repo (https://github.com/omec-project/bess/blob/main/env/rebuild_images.py)? I am asking this because the UPF image is based on the BESS image

@gab-arrobo
Copy link
Contributor

Yes, this is clear :-)

@gab-arrobo gab-arrobo requested a review from Copilot November 5, 2025 23:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the protobuf-generated code to use newer generator versions (protoc-gen-go v1.36.10 and protoc-gen-go-grpc v1.5.1) and introduces several enhancements:

  • Regenerated Go code from BESS proto sources using updated protoc generator versions
  • Added robust error handling and debugging capabilities for PFCP message parsing failures
  • Introduced a canonical UnknownString constant to eliminate repeated string literals
  • Added comprehensive test coverage for PFCP message handling edge cases

Reviewed Changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
pfcpiface/utils.go Defines UnknownString constant for consistent "unknown" value representation
pfcpiface/messages_parse_test.go New test file verifying PFCP message handler gracefully handles truncated messages
pfcpiface/messages.go Enhanced error logging with address context, added PFCP dump functionality via environment variables, implemented pruning logic for dump directories
pfcpiface/datapath.go Updated to use new UnknownString constant
pfcpiface/bess_pb/util_msg.pb.go Regenerated with protoc-gen-go v1.36.10 - updated field ordering, unsafe package usage, and modern protobuf patterns
pfcpiface/bess_pb/service_grpc.pb.go New gRPC service definitions generated with protoc-gen-go-grpc v1.5.1
pfcpiface/bess_pb/ports/port_msg.pb.go Regenerated with updated protoc versions and Intel copyright added
pfcpiface/bess_pb/error.pb.go Regenerated with protoc-gen-go v1.36.10
pfcpiface/bess.go Updated to use new UnknownString constant

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

func RegisterBESSControlServer(s grpc.ServiceRegistrar, srv BESSControlServer) {
// If the following call pancis, it indicates UnimplementedBESSControlServer was
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'pancis' to 'panics'.

Suggested change
// If the following call pancis, it indicates UnimplementedBESSControlServer was
// If the following call panics, it indicates UnimplementedBESSControlServer was

Copilot uses AI. Check for mistakes.
GetModuleInfo(ctx context.Context, in *GetModuleInfoRequest, opts ...grpc.CallOption) (*GetModuleInfoResponse, error)
// / Connect two modules.
// /
// / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'ackets' to 'packets'.

Suggested change
// / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate
// / Connect between m1's ogate and n2's igate (i.e., packets sent to m1's ogate

Copilot uses AI. Check for mistakes.
// / Connect two modules.
// /
// / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate
// / will be fed to m2's igate). The oate can be connected to only one igate,
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'oate' to 'ogate'.

Suggested change
// / will be fed to m2's igate). The oate can be connected to only one igate,
// / will be fed to m2's igate). The ogate can be connected to only one igate,

Copilot uses AI. Check for mistakes.
DumpMempool(ctx context.Context, in *DumpMempoolRequest, opts ...grpc.CallOption) (*DumpMempoolResponse, error)
// / Send a command to the specified module instance.
// /
// / Each module type defines a list of modyle-specific commands, which
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'modyle-specific' to 'module-specific'.

Suggested change
// / Each module type defines a list of modyle-specific commands, which
// / Each module type defines a list of module-specific commands, which

Copilot uses AI. Check for mistakes.
// /
// / NOTE: There should be no running worker to run this command.
CreateModule(ctx context.Context, in *CreateModuleRequest, opts ...grpc.CallOption) (*CreateModuleResponse, error)
// / Destroy an exsting module
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'exsting' to 'existing'.

Suggested change
// / Destroy an exsting module
// / Destroy an existing module

Copilot uses AI. Check for mistakes.
GetModuleInfo(context.Context, *GetModuleInfoRequest) (*GetModuleInfoResponse, error)
// / Connect two modules.
// /
// / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'ackets' to 'packets'.

Suggested change
// / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate
// / Connect between m1's ogate and n2's igate (i.e., packets sent to m1's ogate

Copilot uses AI. Check for mistakes.
// / Connect two modules.
// /
// / Connect between m1's ogate and n2's igate (i.e., ackets sent to m1's ogate
// / will be fed to m2's igate). The oate can be connected to only one igate,
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'oate' to 'ogate'.

Suggested change
// / will be fed to m2's igate). The oate can be connected to only one igate,
// / will be fed to m2's igate). The ogate can be connected to only one igate,

Copilot uses AI. Check for mistakes.
DumpMempool(context.Context, *DumpMempoolRequest) (*DumpMempoolResponse, error)
// / Send a command to the specified module instance.
// /
// / Each module type defines a list of modyle-specific commands, which
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'modyle-specific' to 'module-specific'.

Suggested change
// / Each module type defines a list of modyle-specific commands, which
// / Each module type defines a list of module-specific commands, which

Copilot uses AI. Check for mistakes.
// /
// / NOTE: There should be no running worker to run this command.
CreateModule(context.Context, *CreateModuleRequest) (*CreateModuleResponse, error)
// / Destroy an exsting module
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'exsting' to 'existing'.

Suggested change
// / Destroy an exsting module
// / Destroy an existing module

Copilot uses AI. Check for mistakes.
// / Destroy an exsting module
// /
// / If the module is connected to other modules' input/output gate, they are
// / disconnected first. All tasks created by the module will also be destoyed.
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'destoyed' to 'destroyed'.

Suggested change
// / disconnected first. All tasks created by the module will also be destoyed.
// / disconnected first. All tasks created by the module will also be destroyed.

Copilot uses AI. Check for mistakes.
@gab-arrobo
Copy link
Contributor

Fixes #953

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