Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1033

VPP PAPI crash with big size of ACL rules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 18.01
    • None
    • Python API binding
    • None

      There's a count limit in python API vpp_papi.acl_add_replace().
       reply = vpp_papi.acl_add_replace(acl_index=4294967295, r=rules, count=212, tag="acl2")
       
      If count is configured with 212 or more, then VPP PAPI crash is observed as follows:
      Traceback (most recent call last):
      File "acl_new.py", line 333, in <module>
       main()
       File "acl_new.py", line 231, in main count=212, tag="acl2")
       
      File "/opt/cisco/package/sr/vpfa/lib/python2.7/site-packages/vpp_papi-1.4 py2.7.egg/vpp_papi.py", line 361, in <lambda>
       
      f = lambda **kwargs: (self._call_vpp(i, msgdef, multipart, **kwargs))
       
      File "/opt/cisco/package/sr/vpfa/lib/python2.7/site-packages/vpp_papi-1.4
      py2.7.egg/vpp_papi.py", line 551, in _call_vpp
       
      b = self.encode(msgdef, kwargs)
       
      File "/opt/cisco/package/sr/vpfa/lib/python2.7/site-packages/vpp_papi-1.4
      py2.7.egg/vpp_papi.py", line 267, in encode
       
      size = self.__struct_type(True, msgdef, buf, offset, kwargs)
       
      File "/opt/cisco/package/sr/vpfa/lib/python2.7/site-packages/vpp_papi-1.4 py2.7.egg/vpp_papi.py", line 211, in __struct_type
      return self.__struct_type_encode(msgdef, buf, offset, kwargs)
       
      File "/opt/cisco/package/sr/vpfa/lib/python2.7/site-packages/vpp_papi-1.4
      py2.7.egg/vpp_papi.py", line 232, in __struct_type_encode kwargs[k][i])
       
      IndexError: list index out of range
      DEBUG:vpp_papi:Cleaning up VPP on exit
       
      Increasing self.buffersize helped (self.buffersize = 20000 in vpp_papi.py) and made it work.
      But this buffesize shouldn't be fixed but variable depending PAPI's message size.
       

            otroan Ole Trøan
            jonshin Steve Shin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: