Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21935
b: refs/heads/master
c: 44af79f
h: refs/heads/master
i:
  21933: bc6b1f7
  21931: b82111c
  21927: 5ded107
  21919: 51358f9
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed Mar 20, 2006
1 parent 8a9a7e2 commit a038764
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d9781c5ce1a517a07dbf03c37323c011037fe79
refs/heads/master: 44af79f9524c29d6850591cc972f2667a27234d4
10 changes: 8 additions & 2 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,16 @@ struct ipoib_neigh {
struct list_head list;
};

/*
* We stash a pointer to our private neighbour information after our
* hardware address in neigh->ha. The ALIGN() expression here makes
* sure that this pointer is stored aligned so that an unaligned
* load is not needed to dereference it.
*/
static inline struct ipoib_neigh **to_ipoib_neigh(struct neighbour *neigh)
{
return (struct ipoib_neigh **) (neigh->ha + 24 -
(offsetof(struct neighbour, ha) & 4));
return (void*) neigh + ALIGN(offsetof(struct neighbour, ha) +
INFINIBAND_ALEN, sizeof(void *));
}

extern struct workqueue_struct *ipoib_workqueue;
Expand Down

0 comments on commit a038764

Please sign in to comment.