.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify it |
---|
5 | | - * under the terms of the GNU General Public License as published by the Free |
---|
6 | | - * Software Foundation; either version 2 of the License, or (at your option) |
---|
7 | | - * any later version. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
10 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
11 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
12 | | - * more details. |
---|
13 | | - * |
---|
14 | | - * You should have received a copy of the GNU General Public License along with |
---|
15 | | - * this program; if not, write to the Free Software Foundation, Inc., 59 |
---|
16 | | - * Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
17 | | - * |
---|
18 | | - * The full GNU General Public License is included in this distribution in the |
---|
19 | | - * file called LICENSE. |
---|
20 | | - * |
---|
21 | 4 | */ |
---|
22 | 5 | |
---|
23 | 6 | #ifndef _NET_BOND_3AD_H |
---|
.. | .. |
---|
31 | 14 | /* General definitions */ |
---|
32 | 15 | #define PKT_TYPE_LACPDU cpu_to_be16(ETH_P_SLOW) |
---|
33 | 16 | #define AD_TIMER_INTERVAL 100 /*msec*/ |
---|
34 | | - |
---|
35 | | -#define MULTICAST_LACPDU_ADDR {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02} |
---|
36 | 17 | |
---|
37 | 18 | #define AD_LACP_SLOW 0 |
---|
38 | 19 | #define AD_LACP_FAST 1 |
---|
.. | .. |
---|
180 | 161 | #pragma pack(8) |
---|
181 | 162 | #endif |
---|
182 | 163 | |
---|
| 164 | +struct bond_3ad_stats { |
---|
| 165 | + atomic64_t lacpdu_rx; |
---|
| 166 | + atomic64_t lacpdu_tx; |
---|
| 167 | + atomic64_t lacpdu_unknown_rx; |
---|
| 168 | + atomic64_t lacpdu_illegal_rx; |
---|
| 169 | + |
---|
| 170 | + atomic64_t marker_rx; |
---|
| 171 | + atomic64_t marker_tx; |
---|
| 172 | + atomic64_t marker_resp_rx; |
---|
| 173 | + atomic64_t marker_resp_tx; |
---|
| 174 | + atomic64_t marker_unknown_rx; |
---|
| 175 | +}; |
---|
| 176 | + |
---|
183 | 177 | /* aggregator structure(43.4.5 in the 802.3ad standard) */ |
---|
184 | 178 | typedef struct aggregator { |
---|
185 | 179 | struct mac_addr aggregator_mac_address; |
---|
.. | .. |
---|
265 | 259 | |
---|
266 | 260 | struct ad_bond_info { |
---|
267 | 261 | struct ad_system system; /* 802.3ad system structure */ |
---|
268 | | - atomic_t agg_select_timer; /* Timer to select aggregator after all adapter's hand shakes */ |
---|
| 262 | + struct bond_3ad_stats stats; |
---|
| 263 | + atomic_t agg_select_timer; /* Timer to select aggregator after all adapter's hand shakes */ |
---|
269 | 264 | u16 aggregator_identifier; |
---|
270 | 265 | }; |
---|
271 | 266 | |
---|
272 | 267 | struct ad_slave_info { |
---|
273 | 268 | struct aggregator aggregator; /* 802.3ad aggregator structure */ |
---|
274 | 269 | struct port port; /* 802.3ad port structure */ |
---|
| 270 | + struct bond_3ad_stats stats; |
---|
275 | 271 | u16 id; |
---|
276 | 272 | }; |
---|
277 | 273 | |
---|
.. | .. |
---|
307 | 303 | int bond_3ad_set_carrier(struct bonding *bond); |
---|
308 | 304 | void bond_3ad_update_lacp_rate(struct bonding *bond); |
---|
309 | 305 | void bond_3ad_update_ad_actor_settings(struct bonding *bond); |
---|
| 306 | +int bond_3ad_stats_fill(struct sk_buff *skb, struct bond_3ad_stats *stats); |
---|
| 307 | +size_t bond_3ad_stats_size(void); |
---|
310 | 308 | #endif /* _NET_BOND_3AD_H */ |
---|
311 | 309 | |
---|