Announcement

Collapse
No announcement yet.

Another Sizable Performance Optimization To Benefit Network Code With Linux 5.17

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Originally posted by microcode View Post
    No it doesn't. An IP address is never stored in the wrong order to begin with.
    See this: https://www.cs.wcupa.edu/lngo/csc231...ing/index.html
    check 15. IP addresses
    * 32-bit IP addresses are stored in an IP address struct.
    • IP addresses are always stored in memory in network byte order (big-endian byte order)
    • True in general for any integer transferred in a packet header from one machine to another.
      • E.g., the port number used to identify an Internet connection
    The network format is Big Endian..
    You can't route packets between routers in Little Endian, they don't understand it, also ports for protocols and such, you need to convert..
    Last edited by tuxd3v; 27 November 2021, 09:48 PM.

    Comment


    • #62
      Originally posted by microcode View Post

      In this particular case, you could easily just do a halfword swap when storing, as part of your datastructure design. The cost of the swap is nothing or approximately nothing, even on m68k.
      Actually no. On the m68k a swap was 4 cycles, which is basically half of what you could save that way on average per node during a search. On an update the swap would have been a net penalty.

      Comment

      Working...
      X