blob: c797dc76279f71c4374ffaa0fa357cd90159c538 [file] [log] [blame]
Guduri Prathyusha79a5fee2021-11-11 17:59:10 +05301/*
2 * sfe_pppoe.h
3 * Shortcut flow acceleration for PPPoE flow
4 *
Guduri Prathyusha5f27e232022-01-06 14:39:04 +05305 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
Guduri Prathyusha79a5fee2021-11-11 17:59:10 +05306 *
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
Guduri Prathyusha5f27e232022-01-06 14:39:04 +053019
Wayne Tanbb7f1782021-12-13 11:16:04 -080020#ifndef __SFE_PPPOE_H
21#define __SFE_PPPOE_H
22
Guduri Prathyusha79a5fee2021-11-11 17:59:10 +053023#include <linux/ppp_defs.h>
Guduri Prathyusha647fe3e2021-11-22 19:17:51 +053024#include <linux/if_pppox.h>
Guduri Prathyusha79a5fee2021-11-11 17:59:10 +053025
Guduri Prathyusha5f27e232022-01-06 14:39:04 +053026struct sfe_ppp_hdr {
27 u16 protocol;
28};
Guduri Prathyusha647fe3e2021-11-22 19:17:51 +053029
Wayne Tanbb7f1782021-12-13 11:16:04 -080030/*
31 * PPPoE (6-byte) + PPP (2-byte) header.
32 */
33#define SFE_PPPOE_SESSION_HEADER_SIZE 8
34
35void sfe_pppoe_add_header(struct sk_buff *skb, u16 pppoe_session_id, u16 ppp_protocol);
Guduri Prathyusha5f27e232022-01-06 14:39:04 +053036bool sfe_pppoe_parse_hdr(struct sk_buff *skb, struct sfe_l2_info *l2_info);
Wayne Tanbb7f1782021-12-13 11:16:04 -080037
38#endif /* __SFE_PPPOE_H */