DPA Application Security Attributes to Blob
dpa-app-attributes2blob is a tool for converting between FlexIO attributes YAML files and binary blob files, and vice versa. It is typically used to generate binary configuration blobs from human-readable YAML attributes, or to reverse the process for inspection and debugging.
Converts attributes YAML files to binary blobs (default mode)
Converts binary blobs back to attributes YAML files
Supports a nested
Feature_liststructureValidates input files and provides clear error messages
Sets default values to
falsefor unspecified fieldsProvides detailed feature descriptions in generated YAML files
Supports error modes for blob-to-YAML conversion
Configurable blob size for YAML-to-binary conversion
Comprehensive bit validation in binary blobs
dpa-app-attributes2blob [--help] [--version] [mode] [error_mode] [blob_size] <input-file> <output-file>
Option | Description | Notes |
| Convert an attributes YAML file to a binary blob | Default |
| Convert a binary blob to an attributes YAML file | N/A |
| Treat invalid bits in a binary blob as errors |
|
| Treat invalid bits in a binary blob as warnings | bin2yaml only |
| Specify the output size of the blob in bytes. The size must be a multiple of 4 and less than 1024. |
|
Examples
Convert YAML to binary blob:
dpa-app-attributes2blob --yaml2bin config.yaml output.bin
Simple convert YAML to binary blob:
dpa-app-attributes2blob config.yaml output.bin
Convert YAML to binary blob with custom size:
dpa-app-attributes2blob --yaml2bin --blob-size 16 config.yaml output.bin
Convert binary blob to YAML:
dpa-app-attributes2blob --bin2yaml output.bin config.yaml
Convert binary blob to YAML with warning mode:
dpa-app-attributes2blob --bin2yaml --notification output.bin config.yaml
The attributes must have a top-level mapping containing only a
Feature_listkey.The
Feature_listvalue must be a mapping containing feature flags.Field values must be boolean (
true/false,yes/no,on/off).Fields not explicitly set default to
false.Supported fields:
Congestion_Control_Flow_Context_Access: Enables the application to access the Congestion Control Flow Context.Programmable_Congestion_Control: Enables the application to serve Programmable Congestion Control events.Generating_Empty_CQE: Enables the application to generate an Empty CQE on a given CQ (e.g., for triggering other software entries).Device_Emulation: Enables the application to emulate a PCIe device.
Example Attributes YAML
Feature_list:
Congestion_Control_Flow_Context_Access: true
Programmable_Congestion_Control: false
Generating_Empty_CQE: true
Device_Emulation: true
Generated YAML Output
When converting from binary to YAML, the tool generates descriptive comments:
# This file was generated by dpa-app-attributes2blob
# A dictionary of features enabled/disabled for the application
Feature_list:
# Enables application to access Congestion Control Flow Context
Congestion_Control_Flow_Context_Access: true
# Disables application to serve Programmable Congestion Control events
Programmable_Congestion_Control: false
# Enables application to generate Empty CQE on a given CQ, e.g. for triggering other SW entries
Generating_Empty_CQE: true
# Enables application to emulate a PCI device
Device_Emulation: true
The tool checks for duplicate fields, unknown fields, invalid boolean values, and malformed YAML structure.
Only one document and the specified nested structure are allowed in the YAML.
Sequences and aliases/anchors are not supported.
In blob-to-YAML mode, the tool validates that only valid feature bits are set in the binary blob.
Invalid bits can be treated as errors (default) or warnings (using
--notification).The tool provides detailed error messages showing which specific bits are invalid in the binary blob.
Command-line validation ensures error modes are only used with
--bin2yamland size options are only used with--yaml2bin.
The binary blob is stored in big-endian byte order.
Custom blob sizes can be specified using the
--blob-sizeoption.The blob size must be a multiple of 4 bytes and cannot exceed 1024 bytes.
Only the bits corresponding to defined features are validated; other bits are checked to ensure they are not set to
1.