Tushar Mathur | 6650654 | 2014-04-03 22:01:40 +0530 | [diff] [blame] | 1 | /* |
| 2 | ************************************************************************** |
| 3 | * Copyright (c) 2014, The Linux Foundation. All rights reserved. |
| 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all copies. |
| 7 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 8 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 9 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 10 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 11 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 12 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 13 | * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 14 | ************************************************************************** |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | * nss_lag.h |
| 19 | * NSS LAG APIs |
| 20 | */ |
| 21 | |
Tushar Mathur | 6650654 | 2014-04-03 22:01:40 +0530 | [diff] [blame] | 22 | /* |
| 23 | * NSS LAG messages |
| 24 | */ |
| 25 | enum nss_lag_metadata_types { |
| 26 | NSS_TX_METADATA_LAG_STATE_CHANGE = 0, |
| 27 | }; |
| 28 | |
| 29 | /* |
| 30 | * NSS LAG state change events |
| 31 | */ |
| 32 | enum nss_lag_state_change_ev { |
| 33 | NSS_LAG_RELEASE = 0, |
| 34 | NSS_LAG_ENSLAVE = 1, |
| 35 | }; |
| 36 | |
| 37 | /* |
Sol Kavy | cd1bd5c | 2014-04-04 11:09:44 -0700 | [diff] [blame] | 38 | * LAG return values |
| 39 | */ |
| 40 | enum nss_lag_error_types { |
| 41 | NSS_LAG_ERROR_EINTERFACE = 1, |
| 42 | NSS_LAG_ERROR_EMSG = 2, |
| 43 | }; |
| 44 | |
| 45 | /* |
Tushar Mathur | 6650654 | 2014-04-03 22:01:40 +0530 | [diff] [blame] | 46 | * NSS LAG state change message |
| 47 | */ |
| 48 | struct nss_lag_state_change { |
| 49 | uint32_t lagid; |
| 50 | uint32_t interface; |
| 51 | enum nss_lag_state_change_ev event; |
| 52 | }; |
| 53 | |
| 54 | /* |
| 55 | * Message structure to send/receive Link aggregation commands |
| 56 | */ |
| 57 | struct nss_lag_msg { |
| 58 | struct nss_cmn_msg cm; /* Message Header */ |
| 59 | union { |
| 60 | struct nss_lag_state_change state; /* Message: state change */ |
| 61 | } msg; |
| 62 | }; |
| 63 | |
| 64 | extern nss_tx_status_t nss_lag_tx(struct nss_ctx_instance *nss_ctx, struct nss_lag_msg *msg); |
| 65 | |