• Yonghong Song's avatar
    setup some bpf_module data structures correctly when rw_engine is disabled · 31bf1c5c
    Yonghong Song authored
    Commit db7b8eb0 ("add a BPFModule API to disable rw_engine
    sscanf/snprintf functions") permits to disable rw_engine so that
    memory can be saved for structures with large arrays. As a result,
    the function BPFModule::annotate(), which is used to generate
    "sscanf" module, is not called when rw_engine is disabled.
    
    Besides generating "sscanf" module, however, BPFModule::annotate()
    also sets up several other data structures which are used for
    map/table manipulation. This patch implements BPFModule::annotate_light(),
    which will be called when rw_engine is disabled, to
    setup these data structures.
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    31bf1c5c
bpf_module.h 5.31 KB