From patchwork Fri May 8 06:05:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1285842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49JKZD5bKGz9sRY for ; Fri, 8 May 2020 16:05:40 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 52B1187BA3; Fri, 8 May 2020 06:05:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5OD0p8-e3tYJ; Fri, 8 May 2020 06:05:37 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 70A5D87B83; Fri, 8 May 2020 06:05:37 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4D8C4C088B; Fri, 8 May 2020 06:05:37 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9BB95C0889 for ; Fri, 8 May 2020 06:05:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8C1402152E for ; Fri, 8 May 2020 06:05:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bi3AON2yroAz for ; Fri, 8 May 2020 06:05:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by silver.osuosl.org (Postfix) with ESMTPS id 548932157D for ; Fri, 8 May 2020 06:05:08 +0000 (UTC) X-Originating-IP: 115.99.89.246 Received: from nusiddiq.home.org.com (unknown [115.99.89.246]) (Authenticated sender: numans@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id AF4C91C0007; Fri, 8 May 2020 06:05:05 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Fri, 8 May 2020 11:35:01 +0530 Message-Id: <20200508060501.247103-1-numans@ovn.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508060325.246679-1-numans@ovn.org> References: <20200508060325.246679-1-numans@ovn.org> MIME-Version: 1.0 Cc: Dave Tucker Subject: [ovs-dev] [PATCH ovn 5/7] Remove Unused Third-Party Folder X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Dave Tucker Submitted-at: https://github.com/ovn-org/ovn/pull/38 Signed-off-by: Dave Tucker Signed-off-by: Numan Siddique --- Makefile.am | 7 +- third-party/.gitignore | 2 - third-party/README.rst | 66 ----------------- third-party/automake.mk | 3 - third-party/ofp-tcpdump.patch | 133 ---------------------------------- 5 files changed, 3 insertions(+), 208 deletions(-) delete mode 100644 third-party/.gitignore delete mode 100644 third-party/README.rst delete mode 100644 third-party/automake.mk delete mode 100644 third-party/ofp-tcpdump.patch diff --git a/Makefile.am b/Makefile.am index 8b49ba255..57cd41a62 100644 --- a/Makefile.am +++ b/Makefile.am @@ -256,7 +256,7 @@ config-h-check: @cd $(srcdir); \ if test -e .git && (git --version) >/dev/null 2>&1 && \ git --no-pager grep -L '#include ' `git ls-files | grep '\.c$$' | \ - grep -vE '^ovs/datapath|^ovs/lib/sflow|^ovs/third-party|^ovs/datapath-windows|^python|^ovs/python'`; \ + grep -vE '^ovs/datapath|^ovs/lib/sflow|^ovs/datapath-windows|^python|^ovs/python'`; \ then \ echo "See above for list of violations of the rule that"; \ echo "every C source file must #include ."; \ @@ -270,7 +270,7 @@ printf-check: @cd $(srcdir); \ if test -e .git && (git --version) >/dev/null 2>&1 && \ git --no-pager grep -n -E -e '%[-+ #0-9.*]*([ztj]|hh)' --and --not -e 'ovs_scan' `git ls-files | grep '\.[ch]$$' | \ - grep -vE '^ovs/datapath|^ovs/lib/sflow|^ovs/third-party'`; \ + grep -vE '^ovs/datapath|^ovs/lib/sflow'`; \ then \ echo "See above for list of violations of the rule that"; \ echo "'z', 't', 'j', 'hh' printf() type modifiers are"; \ @@ -353,7 +353,7 @@ thread-safety-check: if test -e .git && (git --version) >/dev/null 2>&1 && \ grep -n -f build-aux/thread-safety-blacklist \ `git ls-files | grep '\.[ch]$$' \ - | $(EGREP) -v '^ovs/datapath|^ovs/lib/sflow|^ovs/third-party'` /dev/null \ + | $(EGREP) -v '^ovs/datapath|^ovs/lib/sflow'` /dev/null \ | $(EGREP) -v ':[ ]*/?\*'; \ then \ echo "See above for list of calls to functions that are"; \ @@ -493,7 +493,6 @@ include lib/automake.mk include utilities/automake.mk include tests/automake.mk include include/automake.mk -include third-party/automake.mk include debian/automake.mk include lib/ovsdb_automake.mk include rhel/automake.mk diff --git a/third-party/.gitignore b/third-party/.gitignore deleted file mode 100644 index b336cc7ce..000000000 --- a/third-party/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/Makefile -/Makefile.in diff --git a/third-party/README.rst b/third-party/README.rst deleted file mode 100644 index c4dc42601..000000000 --- a/third-party/README.rst +++ /dev/null @@ -1,66 +0,0 @@ -.. - Licensed under the Apache License, Version 2.0 (the "License"); you may - not use this file except in compliance with the License. You may obtain - a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - License for the specific language governing permissions and limitations - under the License. - - Convention for heading levels in OVN documentation: - - ======= Heading 0 (reserved for the title in a document) - ------- Heading 1 - ~~~~~~~ Heading 2 - +++++++ Heading 3 - ''''''' Heading 4 - - Avoid deeper levels because they do not render well. - -================================ -Third-party software integration -================================ - -This directory contains third-party software that may be useful for debugging. - -tcpdump -------- - -The ``ofp-tcpdump.patch`` patch adds the ability to parse OpenFlow messages to -tcpdump. These instructions assume that tcpdump 4.3.0 is going to be used, but -it should work with other versions that are not substantially different. To -begin, download tcpdump and apply the patch: - -:: - - $ wget http://www.tcpdump.org/release/tcpdump-4.3.0.tar.gz - $ tar xzf tcpdump-4.3.0.tar.gz - $ ln -s tcpdump-4.3.0 tcpdump - $ patch -p0 < ofp-tcpdump.patch - -Then build the new version of tcpdump: - -:: - - $ cd tcpdump - $ ./configure - $ make - -Clearly, tcpdump can only parse unencrypted packets, so you will need to -connect the controller and datapath using plain TCP. To look at the traffic, -tcpdump will be started in a manner similar to the following: - -:: - - $ sudo ./tcpdump -s0 -i eth0 port 6653 - -The ``-s0`` flag indicates that tcpdump should capture the entire packet. If -the OpenFlow message is not received in its entirety, ``[|openflow]`` will be -printed instead of the OpenFlow message contents. - -The verbosity of the output may be increased by adding additional ``-v`` flags. -If ``-vvv`` is used, the raw OpenFlow data is also printed in hex and ASCII. diff --git a/third-party/automake.mk b/third-party/automake.mk deleted file mode 100644 index dd7bf4184..000000000 --- a/third-party/automake.mk +++ /dev/null @@ -1,3 +0,0 @@ -EXTRA_DIST += \ - third-party/ofp-tcpdump.patch \ - third-party/README.rst diff --git a/third-party/ofp-tcpdump.patch b/third-party/ofp-tcpdump.patch deleted file mode 100644 index 56b35716c..000000000 --- a/third-party/ofp-tcpdump.patch +++ /dev/null @@ -1,133 +0,0 @@ ---- tcpdump/interface.h 2007-06-13 18:03:20.000000000 -0700 -+++ tcpdump/interface.h 2008-04-15 18:28:55.000000000 -0700 -@@ -130,7 +130,8 @@ - - extern const char *dnaddr_string(u_short); - --extern void error(const char *, ...) -+#define error(fmt, args...) tcpdump_error(fmt, ## args) -+extern void tcpdump_error(const char *, ...) - __attribute__((noreturn, format (printf, 1, 2))); - extern void warning(const char *, ...) __attribute__ ((format (printf, 1, 2))); - -@@ -163,6 +164,7 @@ - extern void hex_print_with_offset(const char *, const u_char *, u_int, u_int); - extern void hex_print(const char *, const u_char *, u_int); - extern void telnet_print(const u_char *, u_int); -+extern void openflow_print(const u_char *, u_int); - extern int llc_print(const u_char *, u_int, u_int, const u_char *, - const u_char *, u_short *); - extern int snap_print(const u_char *, u_int, u_int, u_int); ---- tcpdump/Makefile.in 2012-06-13 04:56:20.000000000 +1200 -+++ tcpdump/Makefile.in 2012-08-29 21:36:37.000000000 +1200 -@@ -43,7 +43,7 @@ - CC = @CC@ - PROG = tcpdump - CCOPT = @V_CCOPT@ --INCLS = -I. @V_INCLS@ -+INCLS = -I. @V_INCLS@ -I../../include - DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@ - - # Standard CFLAGS -@@ -51,10 +51,10 @@ - FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS) - - # Standard LDFLAGS --LDFLAGS = @LDFLAGS@ -+LDFLAGS = @LDFLAGS@ -L../../lib - - # Standard LIBS --LIBS = @LIBS@ -+LIBS = @LIBS@ -lopenvswitch -lssl -lrt -lm - - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ -@@ -93,7 +93,8 @@ - print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ - print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \ - print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \ -- print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c -+ print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c \ -+ print-openflow.c - - LIBNETDISSECT_SRC=print-isakmp.c - LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) -@@ -363,7 +364,7 @@ all: $(PROG) - - $(PROG): $(OBJ) - @rm -f $@ -- $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) -+ libtool --mode=link $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) - - $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) - @rm -f $@ ---- tcpdump/print-openflow.c 1969-12-31 16:00:00.000000000 -0800 -+++ tcpdump/print-openflow.c 2009-05-11 15:38:41.000000000 -0700 -@@ -0,0 +1,45 @@ -+/* Copyright (C) 2007, 2008, 2009 Nicira, Inc. -+ -+ Redistribution and use in source and binary forms, with or without -+ modification, are permitted provided that the following conditions -+ are met: -+ -+ 1. Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ 2. Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in -+ the documentation and/or other materials provided with the -+ distribution. -+ 3. The names of the authors may not be used to endorse or promote -+ products derived from this software without specific prior -+ written permission. -+ -+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include -+ -+#include "interface.h" -+#include "openflow/openflow.h" -+#include "openvswitch/ofp-print.h" -+ -+void -+openflow_print(const u_char *sp, u_int length) -+{ -+ const struct ofp_header *ofp = (struct ofp_header *)sp; -+ -+ if (!TTEST2(*sp, ntohs(ofp->length))) -+ goto trunc; -+ -+ ofp_print(stdout, sp, length, vflag); -+ return; -+ -+trunc: -+ printf("[|openflow]"); -+} ---- tcpdump/print-tcp.c 2006-09-19 12:07:57.000000000 -0700 -+++ tcpdump/print-tcp.c 2009-05-11 15:38:25.000000000 -0700 -@@ -56,6 +56,8 @@ - - #include "nameser.h" - -+#include "openflow/openflow.h" -+ - #ifdef HAVE_LIBCRYPTO - #include - #include -@@ -669,7 +672,9 @@ - } - else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) { - ldp_print(bp, length); -- } -+ } else if (sport == OFP_PORT || dport == OFP_PORT) { -+ openflow_print(bp, length); -+ } - - return; - bad: