示例#1
0
 def __fixup_payloadsize(self, tc):
     datasize = len(self.headers.payload.fields.data)
     if datasize != self.payloadsize:
         logger.warn("- Testspec payload data size:%d payloadsize:%d" %\
                 (datasize, self.payloadsize))
         logger.warn("- Fixing payloadsize to data size: %d" % datasize)
         self.payloadsize = datasize
     return
示例#2
0
 def __process_ignore(self, ehdr, ahdr):
     for hdr,fields in self.ignore_fields.items():
         if hdr != ehdr.__class__.__name__: continue
         for f in fields:
             setattr(ehdr, f, 0)
             setattr(ahdr, f, 0)
             logger.warn("- Header:%s Field:%s is ignored. !!" % (hdr, f))
     return
示例#3
0
 def __fixup_payload(self, tc):
     currdata = self.headers.payload.fields.data
     datasize = len(self.headers.payload.fields.data)
     if datasize != self.payloadsize:
         logger.warn("- Testspec payload data size:%d payloadsize:%d" %\
             (len(self.headers.payload.fields.data), self.payloadsize))
         logger.warn("- Fixing payload data.")
         fac = int(self.payloadsize / datasize) + 1
         newdata = currdata * fac
         self.headers.payload.fields.data = newdata[:self.payloadsize]
     return
示例#4
0
 def Consume(self, descriptor):
     logger.warn(
         "RingObject::Consume() - Base Class Implementation - DO NOT USE")
     return
示例#5
0
 def Read(self, index=None):
     # Read the HW state of the ring.
     logger.warn(
         "RingObject::Read() - Base Class Implementation - DO NOT USE")
     return
示例#6
0
 def Post(self, descriptor):
     # 1) Convert descriptor to backend format or bytes
     # 2) Call mem_write of descriptor bytes
     logger.warn(
         "RingObject::Post() - Base Class Implementation - DO NOT USE")
     return
示例#7
0
 def Configure(self):
     # 1) Call the backend API to allocate an address for this ring.
     # 2) Initialize all the elements of the ring to default value.
     logger.warn(
         "RingObject::Configure() - Base Class Implementation - DO NOT USE")
     return
示例#8
0
 def Ring(self, test_spec, lgh=logger):
     logger.warn(
         "Doorbell::Ring() - Base Class Implementation - DO NOT USE")
     return
示例#9
0
 def __set_one_rpc(self, op, rpc):
     self.__rpcs[op] = getattr(self.__stub, rpc, None)
     if not self.__rpcs[op]:
         logger.warn("%s is None for OP: %d" % (rpc, op))
     return
示例#10
0
 def GetTxPacket(self):
     # Base class implementation.
     logger.warn("GetTxPacket(): Base class implmentation called !!!")
     return None
示例#11
0
 def GetTxPktByteStats(self):
     # Base class implementation.
     logger.warn("GetTxPktByteStats(): Base class implmentation called !!!")
     return (None, None)