-
Notifications
You must be signed in to change notification settings - Fork 56
rpma: adopt usage_to_access to support iWARP specificity #1044
rpma: adopt usage_to_access to support iWARP specificity #1044
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1044 +/- ##
=======================================
Coverage 99.83% 99.84%
=======================================
Files 15 15
Lines 1247 1251 +4
=======================================
+ Hits 1245 1249 +4
Misses 2 2 |
4881eb8
to
ad6a127
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 10 of 10 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @ldorau)
src/peer.c, line 32 at r1 (raw file):
}; /* helper functions */
This is not a helper any more. It is an internal API now.
src/peer.c, line 54 at r1 (raw file):
access |= IBV_ACCESS_LOCAL_WRITE; /* XXX */
Just a reminder.
tests/unit/peer/peer-common.h, line 28 at r1 (raw file):
* RPMA_MR_USAGE_* values. */ #define MOCK_USAGE (unsigned)255
Can we just make it a combination instead of using a hardcoded value?
tests/unit/peer/peer-mr_reg.c, line 40 at r1 (raw file):
struct ibv_mr *mr = NULL; int ret = rpma_peer_mr_reg(peer, &mr, MOCK_ADDR, MOCK_LEN, MOCK_USAGE);
Since the usage -> access calculation is now a part of the peer module I think also the testing of it should go here.
Moreover, we will need two protection domains: one iWARP and one non-iWARP to test both implementations.
1cca380
to
bfe7459
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 8 of 10 files reviewed, 4 unresolved discussions (waiting on @janekmi)
src/peer.c, line 32 at r1 (raw file):
Previously, janekmi (Jan Michalski) wrote…
This is not a helper any more. It is an internal API now.
Done.
src/peer.c, line 54 at r1 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Just a reminder.
Done.
tests/unit/peer/peer-common.h, line 28 at r1 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Can we just make it a combination instead of using a hardcoded value?
Done.
tests/unit/peer/peer-mr_reg.c, line 40 at r1 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Since the usage -> access calculation is now a part of the peer module I think also the testing of it should go here.
Moreover, we will need two protection domains: one iWARP and one non-iWARP to test both implementations.
Can it be done as a separate pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ldorau)
src/peer.c, line 33 at r2 (raw file):
/* * usage_to_access -- convert usage to access
Name.
src/peer.c, line 80 at r2 (raw file):
} /* internal librpma API */
Bring it one function up. ;-)
tests/unit/peer/peer-mr_reg.c, line 40 at r1 (raw file):
Previously, ldorau (Lukasz Dorau) wrote…
Can it be done as a separate pull request?
I can agree to it if you will leave a big XXX somewhere. xD
bfe7459
to
7c1e8de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 9 of 10 files reviewed, 3 unresolved discussions (waiting on @janekmi and @ldorau)
src/peer.c, line 33 at r2 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Name.
Done.
src/peer.c, line 80 at r2 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Bring it one function up. ;-)
Done.
7c1e8de
to
e1703a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 7 of 10 files reviewed, 3 unresolved discussions (waiting on @janekmi)
tests/unit/peer/peer-mr_reg.c, line 40 at r1 (raw file):
Previously, janekmi (Jan Michalski) wrote…
I can agree to it if you will leave a big XXX somewhere. xD
Done.
cf5c2cb
to
5fbfa08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ldorau)
tests/unit/peer/peer-mr_reg.c, line 166 at r3 (raw file):
struct ibv_pd *mock_ibv_pd = MOCK_IBV_PD; int n_iters = sizeof(usage2access) / sizeof(struct usage2access_s);
These should come as prestates.
tests/unit/peer/peer-mr_reg.c, line 166 at r3 (raw file):
struct ibv_pd *mock_ibv_pd = MOCK_IBV_PD; int n_iters = sizeof(usage2access) / sizeof(struct usage2access_s);
Having these, tests for rpma_mr_reg()
are too extensive: https://github.com/pmem/rpma/blob/master/tests/unit/mr/mr-reg.c#L23
4886bc5
to
c861cad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 8 of 11 files reviewed, 2 unresolved discussions (waiting on @janekmi and @ldorau)
tests/unit/peer/peer-mr_reg.c, line 166 at r3 (raw file):
Previously, janekmi (Jan Michalski) wrote…
These should come as prestates.
Done.
191031f
to
4d31802
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 8 of 12 files reviewed, 2 unresolved discussions (waiting on @janekmi)
tests/unit/peer/peer-mr_reg.c, line 166 at r3 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Having these, tests for
rpma_mr_reg()
are too extensive: https://github.com/pmem/rpma/blob/master/tests/unit/mr/mr-reg.c#L23
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r4.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @ldorau)
tests/unit/peer/peer-common.h, line 47 at r4 (raw file):
int is_odp_capable; struct rpma_peer *peer; };
Please put this structure just before setup__peer_prestates()
.
tests/unit/peer/peer-common.h, line 55 at r4 (raw file):
int teardown__peer(void **peer_ptr); int setup__peer_prestates(void **in_out);
pprestate
tests/unit/peer/peer-common.h, line 56 at r4 (raw file):
int setup__peer_prestates(void **in_out); int teardown__peer_prestates(void **peer_ptr);
.
tests/unit/peer/peer-common.c, line 81 at r4 (raw file):
* Note: * - in - int is_odp_capable * - out - struct rpma_peer *
Copy-pasted inadequately.
4d31802
to
e442b98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 10 of 12 files reviewed, 4 unresolved discussions (waiting on @janekmi)
tests/unit/peer/peer-common.h, line 47 at r4 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Please put this structure just before
setup__peer_prestates()
.
Done.
tests/unit/peer/peer-common.h, line 55 at r4 (raw file):
Previously, janekmi (Jan Michalski) wrote…
pprestate
Done.
tests/unit/peer/peer-common.h, line 56 at r4 (raw file):
Previously, janekmi (Jan Michalski) wrote…
.
Done.
tests/unit/peer/peer-common.c, line 81 at r4 (raw file):
Previously, janekmi (Jan Michalski) wrote…
Copy-pasted inadequately.
It is not the same as in setup__peer()
- I have changed it, but perhaps it will be better to remove it at all.
e442b98
to
c8c0323
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r5.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ldorau)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @ldorau)
This change is