Eth: Egress timestamp broken

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • MCAL
    • MCAL-27138
    • Hide
      MCUSW_J7_09.02.00
      MCAL_SitaraMPU_09.02.00
      Show
      MCUSW_J7_09.02.00 MCAL_SitaraMPU_09.02.00
    • Hide
      MCAL_SitaraMPU_10.01.00
      MCUSW_J7_11.00.00
      Show
      MCAL_SitaraMPU_10.01.00 MCUSW_J7_11.00.00
    • Hide
      am62a-evm
      am62d-evm
      am62p-evm
      am62x-evm
      j7200-evm
      j721e-evm
      j721s2-evm
      j722s-evm
      j742s2-evm
      j784s4-evm
      Show
      am62a-evm am62d-evm am62p-evm am62x-evm j7200-evm j721e-evm j721s2-evm j722s-evm j742s2-evm j784s4-evm

      The current implementation of the ethernet driver exposes some bugs in the way the driver treats egress timestamps: If the driver starts filling in the time-stamps in the 'cptsCacheEvent' structure, then it can happen that 'stale' entries lead to wrong timestamps being reported back to upper layers.
      The issue was detected when we had multiple packets where egress time-stamping was requested. Let's say there's a transmit packet A buffer sequence ID X and packet B sequence ID Y for which egress timestamps are requested. However the egress timestamps for buffer sequence Y are not queried for some reason.
      In this situation the egress timestamps of B with sequence ID Y can be put into the cache variable 'cptsCacheEvent' by the function CpswCpts_cacheUpdate. If there is no 'query' (i.e.: call to CpswCpts_cacheLookUp with the given sequence Y) of the cache entry, this entry can remain indefinitely in the cache being marked as belonging to sequence 'Y' and remaining marked as 'valid'.
      However the sequence numbers are currently assigned based on the ethernet buffer indices - which can be re-used. If at a later point in time the packet 'A' is again re-transmitted from the ethernet buffer 'Y' (assigning sequence ID Y to it), then the subsequent high-level query of the egress timestamp of packet 'A' will provide an erronous result as the function CpswCpts_getHostEgressTimeStamp first always checks the cache, which may still contain the 'stale' entry for packet 'B' with sequence ID 'Y'.
      To summarize: based on the above scenario it seems that the cache-handling/buffer-assignment is broken in the driver. It seems advisable to clear any stale cache entries when a buffer is re-assigned for a new message.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-4894 - Eth: Egress timestamp broken
                SYNCHRONIZED
                • Last Sync Date: