Skip to content

Run without itimer support in alpine - #143

Open
salsal97 wants to merge 5 commits into
Mellanox:sockperf_v2from
salsal97:notimers
Open

Run without itimer support in alpine #143
salsal97 wants to merge 5 commits into
Mellanox:sockperf_v2from
salsal97:notimers

Conversation

@salsal97

Copy link
Copy Markdown

Added changes to -

  1. Build on alpine
  2. Run without timer support in the kernel using sleep in a separate thread and a signal to callback.

@salsal97 salsal97 changed the title Notimers Run without itimer support in alpine Feb 11, 2021
@swx-jenkins2

Copy link
Copy Markdown

Can one of the admins verify this patch?

Comment thread src/client.cpp Outdated
Comment thread src/client.cpp Outdated
Comment thread src/client.cpp Outdated
Comment thread src/client.cpp Outdated
Comment thread src/vma-redirect.h
#include <stdlib.h>
#include <signal.h>
#include <sys/poll.h>
#include <stdio.h>

@ChrisCoe ChrisCoe Feb 13, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is stdio.h being included to vma-redirect.h when vma-redirect.cpp has not been touched? Not clear to me.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, this is another change required to build sockperf in alpine OS

Comment thread src/ticks.h
#endif

#include "ticks_os.h"
#include "os_abstract.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I see that you use os_thread_t in file client.cpp. Why not include header os_abstract.h in client.h?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the changes required to properly build in alpine OS, the program was not able to find this file

@igor-ivanov

Copy link
Copy Markdown
Collaborator

Hi @salsal97, could you provide a motivation not to use setitimer

@salsal97

Copy link
Copy Markdown
Author

@igor-ivanov , I am running this code inside an Intel SGX secure enclave that does not have support for the itimers syscall yet, hence these modifications in the upstream help us

@igor-ivanov igor-ivanov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows system does not have itimerval too.
Please consider changes in os_abstraction.h|cpp to support Alpine as it is done for WIN.
Probably it is possible to use something as

#ifdef ALPINE 

@salsal97

salsal97 commented Mar 5, 2021

Copy link
Copy Markdown
Author

@igor-ivanov, the changes made to client.cpp support the use of intel sgx enclaves, which might have itimer support as well in the future
the additions in terms of headers to the other two files were what were needed to build the project in alpine. How would one source the header file additions from os_abstract.cpp?

@igor-ivanov

Copy link
Copy Markdown
Collaborator

bot:retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants