diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-11-15 17:21:27 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:06 -0800 |
commit | b12b9465ed13bf2eb7c0fe379c22dcb3b86c4054 (patch) | |
tree | 26301f6017b45756be1c6f6df51be07debef5ce3 /mpm/python/usrp_mpm/liberiotable.py | |
parent | d327a93530033a3e9f08f797e1b04f4357401e8e (diff) | |
download | uhd-b12b9465ed13bf2eb7c0fe379c22dcb3b86c4054.tar.gz uhd-b12b9465ed13bf2eb7c0fe379c22dcb3b86c4054.tar.bz2 uhd-b12b9465ed13bf2eb7c0fe379c22dcb3b86c4054.zip |
mpm/mpmd: Move to request_xport()/commit_xport() architecture
This commit combines code from various branches to finally enable both
UDP and Liberio transports.
Diffstat (limited to 'mpm/python/usrp_mpm/liberiotable.py')
-rw-r--r-- | mpm/python/usrp_mpm/liberiotable.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/mpm/python/usrp_mpm/liberiotable.py b/mpm/python/usrp_mpm/liberiotable.py index 8f70c5ebe..6f2454379 100644 --- a/mpm/python/usrp_mpm/liberiotable.py +++ b/mpm/python/usrp_mpm/liberiotable.py @@ -19,15 +19,13 @@ class LiberioDispatcherTable(object): label -- A label that can be used by udev to find a UIO device """ - MTU_OFFSET = 0x80000 - def __init__(self, label): self.log = get_logger(label) self._regs = UIO(label=label, read_only=False) self.poke32 = self._regs.poke32 self.peek32 = self._regs.peek32 - def set_route(self, sid, dma_channel, mtu): + def set_route(self, sid, dma_channel): """ Sets up routing in the Liberio dispatcher. From sid, only the destination part is important. After this call, any CHDR packet with the @@ -35,14 +33,10 @@ class LiberioDispatcherTable(object): sid -- Full SID, but only destination part matters. dma_channel -- The DMA channel to which these packets should get routed. - mtu -- Max size of bytes per packet. This is important to get right. The - DMA implementation will pad packets smaller than MTU up to the - mtu value, so making MTU extra large is inefficient. Packets - larger than MTU will get chopped up. Even worse. """ self.log.debug( - "Routing SID `{sid}' to DMA channel `{chan}', MTU {mtu} bytes.".format( - sid=str(sid), chan=dma_channel, mtu=mtu + "Routing SID `{sid}' to DMA channel `{chan}'.".format( + sid=str(sid), chan=dma_channel ) ) def poke_and_trace(addr, data): @@ -51,18 +45,12 @@ class LiberioDispatcherTable(object): addr, data )) self.poke32(addr, data) - # Poke reg for destination channel - # Poke reg for MTU try: poke_and_trace( 0 + 4 * sid.dst_ep, dma_channel, ) - poke_and_trace( - self.MTU_OFFSET + 4 * sid.dst_ep, - int(mtu / 8), - ) except Exception as ex: self.log.error( "Unexpected exception while setting route: %s", |