/* * Copyright (c) 2010, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope 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, see . * * Author: John Fastabend */ #ifndef _DCB_EVENT_H #define _DCB_EVENT_H enum dcbevent_notif_type { DCB_APP_EVENT = 1, }; #ifdef CONFIG_DCB int register_dcbevent_notifier(struct notifier_block *nb); int unregister_dcbevent_notifier(struct notifier_block *nb); int call_dcbevent_notifiers(unsigned long val, void *v); #else static inline int register_dcbevent_notifier(struct notifier_block *nb) { return 0; } static inline int unregister_dcbevent_notifier(struct notifier_block *nb) { return 0; } static inline int call_dcbevent_notifiers(unsigned long val, void *v) { return 0; } #endif /* CONFIG_DCB */ #endif lect> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2017-02-09 11:22:00 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-09 22:59:34 -0500
commitdd41d33f0b033885211a5d6f3ee19e73238aa9ee (patch)
tree4d2e3e68f09ad6177c220448ef006fd2af30c131
parent9dd7f8907c3705dc7a7a375d1c6e30b06e6daffc (diff)
openvswitch: Add force commit.
Stateful network admission policy may allow connections to one direction and reject connections initiated in the other direction. After policy change it is possible that for a new connection an overlapping conntrack entry already exists, where the original direction of the existing connection is opposed to the new connection's initial packet. Most importantly, conntrack state relating to the current packet gets the "reply" designation based on whether the original direction tuple or the reply direction tuple matched. If this "directionality" is wrong w.r.t. to the stateful network admission policy it may happen that packets in neither direction are correctly admitted. This patch adds a new "force commit" option to the OVS conntrack action that checks the original direction of an existing conntrack entry. If that direction is opposed to the current packet, the existing conntrack entry is deleted and a new one is subsequently created in the correct direction. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Joe Stringer <joe@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/uapi/linux/openvswitch.h5
-rw-r--r--net/openvswitch/conntrack.c26
2 files changed, 29 insertions, 2 deletions
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h