cryptodev-vhost-user.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * QEMU Crypto Device Common Vhost User Implement
  3. *
  4. * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
  5. *
  6. * Authors:
  7. * Gonglei <arei.gonglei@huawei.com>
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2.1 of the License, or (at your option) any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  21. *
  22. */
  23. #ifndef CRYPTODEV_VHOST_USER_H
  24. #define CRYPTODEV_VHOST_USER_H
  25. #include "system/cryptodev-vhost.h"
  26. #define VHOST_USER_MAX_AUTH_KEY_LEN 512
  27. #define VHOST_USER_MAX_CIPHER_KEY_LEN 64
  28. /**
  29. * cryptodev_vhost_user_get_vhost:
  30. * @cc: the client object for each queue
  31. * @b: the cryptodev backend common vhost object
  32. * @queue: the queue index
  33. *
  34. * Gets a new cryptodev backend common vhost object based on
  35. * @b and @queue
  36. *
  37. * Returns: the cryptodev backend common vhost object
  38. */
  39. CryptoDevBackendVhost *
  40. cryptodev_vhost_user_get_vhost(
  41. CryptoDevBackendClient *cc,
  42. CryptoDevBackend *b,
  43. uint16_t queue);
  44. #endif /* CRYPTODEV_VHOST_USER_H */