weixin_39611340
weixin_39611340
2020-12-08 19:24

struct lys_module's member deviation_size limit deviation to 255, it seems too small?

Hi,

I find struct lys_module's member deviation_size is of type uint8_t , so it can only suppport 255 deviation, But now i have a module which have 375 deviation. And libyang reports error: "Reached limit (255) for storing deviations." If deviation_size can be changed to uint16_t. So it can support more deviation in one module? Thanks very much.

该提问来源于开源项目:CESNET/libyang

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39857792 weixin_39857792 4月前

    Hi, we do not want to increase all these limits in the current libyang. There will be no hard limit in the new libyang. Can you maybe split the module into 2?

    Regards, Michal

    点赞 评论 复制链接分享
  • weixin_39611340 weixin_39611340 4月前

    Hi,

    Thanks for your reply very much。I consider splitting the module into 2, but i have many yang modules. And if split the module into 2, there will be more yang modules. I know the new libyang , so ,you mean the current libyang will not be maintained ? It seems we will use the current libyang for a long time.

    点赞 评论 复制链接分享
  • weixin_39857876 weixin_39857876 4月前

    It's not recommended but if you have to, you can try to modify the type uint8_t to uint16_t in your own fork repo. Just modify the file in tree_schema.h.

    点赞 评论 复制链接分享
  • weixin_39857792 weixin_39857792 4月前

    Hi, current libyang will still be maintained for quite some time, we are not sure for how long, but no worries. Except we would like to keep the current ABI and do not make non-backwards compatible changes to the API. Changing this variable type is an ABI change.

    Regards, Michal

    点赞 评论 复制链接分享