ocrdma_ah.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*******************************************************************
  2. * This file is part of the Emulex RoCE Device Driver for *
  3. * RoCE (RDMA over Converged Ethernet) adapters. *
  4. * Copyright (C) 2008-2012 Emulex. All rights reserved. *
  5. * EMULEX and SLI are trademarks of Emulex. *
  6. * www.emulex.com *
  7. * *
  8. * This program is free software; you can redistribute it and/or *
  9. * modify it under the terms of version 2 of the GNU General *
  10. * Public License as published by the Free Software Foundation. *
  11. * This program is distributed in the hope that it will be useful. *
  12. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
  13. * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
  14. * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
  15. * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
  16. * TO BE LEGALLY INVALID. See the GNU General Public License for *
  17. * more details, a copy of which can be found in the file COPYING *
  18. * included with this package. *
  19. *
  20. * Contact Information:
  21. * linux-drivers@emulex.com
  22. *
  23. * Emulex
  24. * 3333 Susan Street
  25. * Costa Mesa, CA 92626
  26. *******************************************************************/
  27. #ifndef __OCRDMA_AH_H__
  28. #define __OCRDMA_AH_H__
  29. enum {
  30. OCRDMA_AH_ID_MASK = 0x3FF,
  31. OCRDMA_AH_VLAN_VALID_MASK = 0x01,
  32. OCRDMA_AH_VLAN_VALID_SHIFT = 0x1F
  33. };
  34. struct ib_ah *ocrdma_create_ah(struct ib_pd *, struct ib_ah_attr *);
  35. int ocrdma_destroy_ah(struct ib_ah *);
  36. int ocrdma_query_ah(struct ib_ah *, struct ib_ah_attr *);
  37. int ocrdma_modify_ah(struct ib_ah *, struct ib_ah_attr *);
  38. int ocrdma_process_mad(struct ib_device *,
  39. int process_mad_flags,
  40. u8 port_num,
  41. const struct ib_wc *in_wc,
  42. const struct ib_grh *in_grh,
  43. const struct ib_mad_hdr *in, size_t in_mad_size,
  44. struct ib_mad_hdr *out, size_t *out_mad_size,
  45. u16 *out_mad_pkey_index);
  46. #endif /* __OCRDMA_AH_H__ */