Revision f9302d917452e5ada93ccc8ced0f0268ae4264ec authored by Joe Stringer on 21 January 2021, 01:10:58 UTC, committed by Joe Stringer on 21 January 2021, 01:10:58 UTC
Workflow: ./contrib/go-mod/wrapper.sh This launches a docker container with your current Cilium working directory mounted into the correct gopath inside the container. Inside the container: go mod download Then, use make / unit-tests / go-mod scripts to update dependencies etc. Signed-off-by: Joe Stringer <joe@cilium.io>
1 parent c4933f1
bpf_hostdev_ingress.c
/*
* Copyright (C) 2019 Authors of Cilium
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/if_packet.h>
#include <node_config.h>
#include <netdev_config.h>
#include <bpf/api.h>
#include <stdint.h>
#include <stdio.h>
#include "lib/common.h"
__section("to-host")
int to_host(struct __sk_buff *skb)
{
// Upper 16 bits may carry proxy port number, clear it out
__u32 magic = skb->cb[0] & 0xFFFF;
if (magic == MARK_MAGIC_TO_PROXY) {
skb->mark = skb->cb[0];
skb->cb[0] = 0;
}
return TC_ACT_OK;
}
BPF_LICENSE("GPL");
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...