10025 qede: rename OFFSETOF to offsetof and remove local definitions

Review Request #1309 — Created Dec. 2, 2018 and submitted

tsoome
illumos-gate
10025
5c6faea...
general
10025 qede: rename OFFSETOF to offsetof and remove local definitions


rm
  1. So in general, this seems OK. The one worry I have is that when we get updates from QLogic/Cavium is that because all of the 'ecore' code being shared between multiple operating systems is that this'll either get lost or harder to merge. But I'm not sure how much of a concern that should actually be. Since the odds are that'll be me, I'm OK trying to deal with that.
    1. Maybe it's worth keeping their marco in bcam_osal.h, which is kind of like the Intel nic osdep.h and just definining it in terms of the sysmacros.h one instead?

    2. I think it is worth to discuss with the author(s) - we definitely do not want (actually do not need) sysmacros.h - we have offsetof in sys/stddef.h; and we do get it with __containerof.

    3. I totally forgot about the most important reason why we would like to touch such sources in first place - I think all current popular operating systems do have macros like offsetof and we really should avoid such private definitions:)

  2. 
      
andy_js
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...