-
Notifications
You must be signed in to change notification settings - Fork 178
Conversation
When you get a chance please rebase and squash these commits so it's clear what the actual change is for review and so they could get merged. That said, both changes look good and since they're not going to disrupt anything could be merged without much delay. (I'm all for removing dead code) |
0e8ff4a
to
8077eca
Compare
@behlendorf changes squashed |
there is one small fix i need to make so that the htonll functions will build correctly on 32 bit systems. Will add comment when fixed. |
should be ready now. |
Functionally these looks good. Although I'm curious why you opted for a static inline rather than a #define for these? Could you also explain where |
The ICP uses these as part of the ccm and gcm implementations I can move this into the ICP if needed, but in Illumos this function was in byteorder.h. For an example of usage, see https://github.com/tcaputi/zfs/blob/master/module/icp/algs/modes/gcm.c#L45 The small fix I mentioned earlier was to change it from a #define to a static inline function. Some places in the ICP pass this function a ulonglong_t instead of a uint64_t. On 32 bit systems this causes it to complain as I saw on this build: http://build.zfsonlinux.org/builders/Ubuntu%2014.04%20i686%20%28BUILD%29/builds/3490/steps/shell_3/logs/make I can change it to use casting if you would like. I just saw other functions (in atomic.h for instance) that used the inline functions and thought I would match that. I will fix the style mistake in a little bit (sorry about that) |
…nd ntohll functions added.
style issue fixed |
This is definitely the right spot for these, let's leave them in Using a static inline is fine with me, in fact I personally like it better because it leaves no ambiguity about the types. I just wanted to understand why. This change LGTM, if you're happy with it as well I'll get it merged. |
I just brought up an ubuntu 14.04-i386 image to be sure everything works on 32 bit. Everything seems good here so I'd say its ready for merge. |
Merged as: 18d2f56 Changes to support zfs encryption |
2 small changes: Deleted struct modlinkage which is currently unused and redefined in the Illumos Crypto Port (see openzfs/zfs#4329). Also added ntohll macros needed by several encryption algorithms.