blob: d3dc16699343c7be5790b9c5c950dd74d938bb44 [file] [log] [blame]
Tushar Mathur66506542014-04-03 22:01:40 +05301/*
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 Mathur66506542014-04-03 22:01:40 +053022/*
23 * NSS LAG messages
24 */
25enum nss_lag_metadata_types {
26 NSS_TX_METADATA_LAG_STATE_CHANGE = 0,
27};
28
29/*
30 * NSS LAG state change events
31 */
32enum nss_lag_state_change_ev {
33 NSS_LAG_RELEASE = 0,
34 NSS_LAG_ENSLAVE = 1,
35};
36
37/*
Sol Kavycd1bd5c2014-04-04 11:09:44 -070038 * LAG return values
39 */
40enum nss_lag_error_types {
41 NSS_LAG_ERROR_EINTERFACE = 1,
42 NSS_LAG_ERROR_EMSG = 2,
43};
44
45/*
Tushar Mathur66506542014-04-03 22:01:40 +053046 * NSS LAG state change message
47 */
48struct 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 */
57struct 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
64extern nss_tx_status_t nss_lag_tx(struct nss_ctx_instance *nss_ctx, struct nss_lag_msg *msg);
65