Merge tag 'regulator-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-block.git] / include / net / seg6_local.h
CommitLineData
2874c5fd 1/* SPDX-License-Identifier: GPL-2.0-or-later */
1c1e761e
MX
2/*
3 * SR-IPv6 implementation
4 *
5 * Authors:
6 * David Lebrun <david.lebrun@uclouvain.be>
7 * eBPF support: Mathieu Xhonneux <m.xhonneux@gmail.com>
1c1e761e
MX
8 */
9
10#ifndef _NET_SEG6_LOCAL_H
11#define _NET_SEG6_LOCAL_H
12
fe94cc29 13#include <linux/percpu.h>
1c1e761e
MX
14#include <linux/net.h>
15#include <linux/ipv6.h>
16
17extern int seg6_lookup_nexthop(struct sk_buff *skb, struct in6_addr *nhaddr,
18 u32 tbl_id);
486cdf21 19extern bool seg6_bpf_has_valid_srh(struct sk_buff *skb);
1c1e761e 20
fe94cc29 21struct seg6_bpf_srh_state {
486cdf21 22 struct ipv6_sr_hdr *srh;
fe94cc29 23 u16 hdrlen;
486cdf21 24 bool valid;
fe94cc29
MX
25};
26
27DECLARE_PER_CPU(struct seg6_bpf_srh_state, seg6_bpf_srh_states);
28
1c1e761e 29#endif