Message ID | 1374284049-8159-1-git-send-email-tjlee@ambarella.com |
---|---|
State | Changes Requested |
Commit | 8d228d30105079a91fed16097193601713c02198 |
Headers | show |
>>>>> "T" == Tzu-Jung Lee <roylee17@gmail.com> writes:
T> Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
T> ---
T> package/Config.in | 1 +
T> package/dropwatch/Config.in | 7 +++++++
T> package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++
T> package/dropwatch/dropwatch.mk | 30 +++++++++++++++++++++++++++++
T> 4 files changed, 65 insertions(+)
T> create mode 100644 package/dropwatch/Config.in
T> create mode 100644 package/dropwatch/dropwatch-1.4-build.patch
T> create mode 100644 package/dropwatch/dropwatch.mk
T> diff --git a/package/Config.in b/package/Config.in
T> index 286a605..7730317 100644
T> --- a/package/Config.in
T> +++ b/package/Config.in
T> @@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in"
T> source "package/dhrystone/Config.in"
T> source "package/dstat/Config.in"
T> source "package/dmalloc/Config.in"
T> +source "package/dropwatch/Config.in"
T> source "package/gdb/Config.in"
T> source "package/iozone/Config.in"
T> source "package/kexec/Config.in"
T> diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in
T> new file mode 100644
T> index 0000000..69d7cd5
T> --- /dev/null
T> +++ b/package/dropwatch/Config.in
T> @@ -0,0 +1,7 @@
T> +config BR2_PACKAGE_DROPWATCH
T> + bool "dropwatch"
T> + help
T> + Dropwatch is a project I am tinkering with to improve the visibility
T> + developers and sysadmins have into the Linux networking stack.
That doesn't really explain what it is about.
How about using the description from the man page instead?
(http://linux.die.net/man/1/dropwatch)
Dropwatch is an interactive utility for monitoring and recording packets
that are dropped by the kernel
T> +
T> + https://git.fedorahosted.org/git/dropwatch.git
Please use https://fedorahosted.org/dropwatch/ instead.
T> diff --git a/package/dropwatch/dropwatch-1.4-build.patch b/package/dropwatch/dropwatch-1.4-build.patch
T> new file mode 100644
T> index 0000000..eed43e8
T> --- /dev/null
T> +++ b/package/dropwatch/dropwatch-1.4-build.patch
T> @@ -0,0 +1,27 @@
T> +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001
T> +From: Tzu-Jung Lee <tjlee@ambarella.com>
T> +Date: Fri, 12 Jul 2013 20:00:57 +0800
T> +Subject: [PATCH] build: modify hardcoded gcc to support buildroot
T> +
It isn't just about buildroot, it is for everything not just using
'gcc'.
Did you send this patch upstream?
T> +Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com>
T> +
T> +diff --git a/src/Makefile b/src/Makefile
T> +index 026b6ba..b87ae9f 100644
T> +--- a/src/Makefile
T> ++++ b/src/Makefile
T> +@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\
T> + lookup_bfd.o lookup_kas.o
T> +
T> + dropwatch: $(OBJFILES)
T> +- gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS)
T> ++ $(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS)
T> +
T> + %.o: %.c
T> +- gcc $(CFLAGS) $<
T> ++ $(CC) $(CFLAGS) $<
T> + clean:
T> + rm -f dropwatch *.o
T> +
T> +--
T> +1.8.3.2
T> +
T> diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk
T> new file mode 100644
T> index 0000000..b9676cb
T> --- /dev/null
T> +++ b/package/dropwatch/dropwatch.mk
T> @@ -0,0 +1,30 @@
T> +#############################################################
T> +#
T> +# dropwatch
T> +#
T> +#############################################################
Nit: These ##### lines should be 80 chars.
T> +
T> +DROPWATCH_VERSION = 1.4
T> +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2
T> +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/
T> +DROPWATCH_DEPENDENCIES = readline libnl binutils
You should select those packages in Config.in as well then.
T> +DROPWATCH_LICENSE = GPLv2+
T> +DROPWATCH_LICENSE_FILE = COPYING
T> +
T> +define DROPWATCH_INSTALL_TARGET_CMDS
T> + cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin
We normally use
$(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch
And normally put it below the build step.
Does it really make sense to put in usr/bin? Don't you need root
permissions to listen for these events?
From the website I see it apparently relies on some out of tree netlink
patches:
Normally, monitoring for dropped packets requires the creation of a
script that periodically polls all the aformentioned interfaces,
checking for a change in various counter values. Dropwatch instead
listens on a netlink socket for the kernel to inform userspace (apps
like dropwatch and any others), that a packet has been dropped. This of
course implies that the kernel has some sort of functionality to this
end. That functionality (called the netlink Drop Monitor protocol), is
currently being reviewed upstream. For those who would like to
experiment with dropwatch now, you can either retrieve the appropriate
kernel patches from the netdev mailing list, or download them here
Is that still the case? Have these been reviewed on the netdev list?
Have they been accepted/rejected?
T> +endef
T> +
T> +define DROPWATCH_BUILD_CMDS
T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build
T> +endef
T> +
T> +define DROPWATCH_CLEAN_CMDS
T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
T> +endef
T> +
T> +define DROPWATCH_UNINSTALL_CMDS
T> + rm -f $(TARGET_DIR)/usr/bin/dropwatch
T> +endef
T> +
T> +$(eval $(generic-package))
Hi Peter, On Mon, Jul 22, 2013 at 6:35 AM, Peter Korsgaard <jacmet@uclibc.org> wrote: >>>>>> "T" == Tzu-Jung Lee <roylee17@gmail.com> writes: > > T> Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com> > T> --- > T> package/Config.in | 1 + > T> package/dropwatch/Config.in | 7 +++++++ > T> package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++ > T> package/dropwatch/dropwatch.mk | 30 +++++++++++++++++++++++++++++ > T> 4 files changed, 65 insertions(+) > T> create mode 100644 package/dropwatch/Config.in > T> create mode 100644 package/dropwatch/dropwatch-1.4-build.patch > T> create mode 100644 package/dropwatch/dropwatch.mk > > T> diff --git a/package/Config.in b/package/Config.in > T> index 286a605..7730317 100644 > T> --- a/package/Config.in > T> +++ b/package/Config.in > T> @@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in" > T> source "package/dhrystone/Config.in" > T> source "package/dstat/Config.in" > T> source "package/dmalloc/Config.in" > T> +source "package/dropwatch/Config.in" > T> source "package/gdb/Config.in" > T> source "package/iozone/Config.in" > T> source "package/kexec/Config.in" > T> diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in > T> new file mode 100644 > T> index 0000000..69d7cd5 > T> --- /dev/null > T> +++ b/package/dropwatch/Config.in > T> @@ -0,0 +1,7 @@ > T> +config BR2_PACKAGE_DROPWATCH > T> + bool "dropwatch" > T> + help > T> + Dropwatch is a project I am tinkering with to improve the visibility > T> + developers and sysadmins have into the Linux networking stack. > > That doesn't really explain what it is about. > > How about using the description from the man page instead? > (http://linux.die.net/man/1/dropwatch) > > Dropwatch is an interactive utility for monitoring and recording packets > that are dropped by the kernel done. > T> + > T> + https://git.fedorahosted.org/git/dropwatch.git > > Please use https://fedorahosted.org/dropwatch/ instead. done. > T> diff --git a/package/dropwatch/dropwatch-1.4-build.patch b/package/dropwatch/dropwatch-1.4-build.patch > T> new file mode 100644 > T> index 0000000..eed43e8 > T> --- /dev/null > T> +++ b/package/dropwatch/dropwatch-1.4-build.patch > T> @@ -0,0 +1,27 @@ > T> +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001 > T> +From: Tzu-Jung Lee <tjlee@ambarella.com> > T> +Date: Fri, 12 Jul 2013 20:00:57 +0800 > T> +Subject: [PATCH] build: modify hardcoded gcc to support buildroot > T> + > > It isn't just about buildroot, it is for everything not just using > 'gcc'. > Did you send this patch upstream? I'm sending one now, and will feedback once I got ... feedback :-) > T> +Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com> > T> + > T> +diff --git a/src/Makefile b/src/Makefile > T> +index 026b6ba..b87ae9f 100644 > T> +--- a/src/Makefile > T> ++++ b/src/Makefile > T> +@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\ > T> + lookup_bfd.o lookup_kas.o > T> + > T> + dropwatch: $(OBJFILES) > T> +- gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS) > T> ++ $(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS) > T> + > T> + %.o: %.c > T> +- gcc $(CFLAGS) $< > T> ++ $(CC) $(CFLAGS) $< > T> + clean: > T> + rm -f dropwatch *.o > T> + > T> +-- > T> +1.8.3.2 > T> + > T> diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk > T> new file mode 100644 > T> index 0000000..b9676cb > T> --- /dev/null > T> +++ b/package/dropwatch/dropwatch.mk > T> @@ -0,0 +1,30 @@ > T> +############################################################# > T> +# > T> +# dropwatch > T> +# > T> +############################################################# > > Nit: These ##### lines should be 80 chars. > > T> + > T> +DROPWATCH_VERSION = 1.4 > T> +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2 > T> +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/ > T> +DROPWATCH_DEPENDENCIES = readline libnl binutils > > You should select those packages in Config.in as well then. > > T> +DROPWATCH_LICENSE = GPLv2+ > T> +DROPWATCH_LICENSE_FILE = COPYING > T> + > T> +define DROPWATCH_INSTALL_TARGET_CMDS > T> + cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin > > We normally use > $(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch done. > And normally put it below the build step. Do you mean to put it under BUILD_CMD, instead, or both BUILD and INSTALL_TARGET > Does it really make sense to put in usr/bin? Don't you need root > permissions to listen for these events? Not really. It doesn't require root permission. > > From the website I see it apparently relies on some out of tree netlink > patches: > > Normally, monitoring for dropped packets requires the creation of a > script that periodically polls all the aformentioned interfaces, > checking for a change in various counter values. Dropwatch instead > listens on a netlink socket for the kernel to inform userspace (apps > like dropwatch and any others), that a packet has been dropped. This of > course implies that the kernel has some sort of functionality to this > end. That functionality (called the netlink Drop Monitor protocol), is > currently being reviewed upstream. For those who would like to > experiment with dropwatch now, you can either retrieve the appropriate > kernel patches from the netdev mailing list, or download them here > > Is that still the case? Have these been reviewed on the netdev list? > Have they been accepted/rejected? Yes, they've been merged for quite some time. Quote: Mar 14 2009: Kernel bits have been accepted and will be available starting with 2.6.30! I'm going to start working on adding some packaging code and getting the userspace bits into fedora in time for F11. Then I'll start working on the Roadmap items > > T> +endef > T> + > T> +define DROPWATCH_BUILD_CMDS > T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build > T> +endef > T> + > T> +define DROPWATCH_CLEAN_CMDS > T> + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean > T> +endef > T> + > T> +define DROPWATCH_UNINSTALL_CMDS > T> + rm -f $(TARGET_DIR)/usr/bin/dropwatch > T> +endef > T> + > T> +$(eval $(generic-package)) > > -- > Bye, Peter Korsgaard I'm re-submitting v3, which should include all the above comments. Thanks. Roy
>>>>> "Tzu-Jung" == Tzu-Jung Lee <roylee17@gmail.com> writes: Hi, T> +++ b/package/dropwatch/dropwatch-1.4-build.patch T> @@ -0,0 +1,27 @@ T> +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001 T> +From: Tzu-Jung Lee <tjlee@ambarella.com> T> +Date: Fri, 12 Jul 2013 20:00:57 +0800 T> +Subject: [PATCH] build: modify hardcoded gcc to support buildroot T> + >> >> It isn't just about buildroot, it is for everything not just using >> 'gcc'. >> Did you send this patch upstream? T> I'm sending one now, and will feedback once I got ... feedback :-) Great, thanks. T> +define DROPWATCH_INSTALL_TARGET_CMDS T> + cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin >> >> We normally use >> $(INSTALL) -D -m 0755 $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin/dropwatch T> done. >> And normally put it below the build step. T> Do you mean to put it under BUILD_CMD, instead, or both BUILD and INSTALL_TARGET Under BUILD_CMDS, so they are listed in the order that they get executed. >> Does it really make sense to put in usr/bin? Don't you need root >> permissions to listen for these events? T> Not really. It doesn't require root permission. Ahh, ok. >> >> From the website I see it apparently relies on some out of tree netlink >> patches: >> >> Normally, monitoring for dropped packets requires the creation of a >> script that periodically polls all the aformentioned interfaces, >> checking for a change in various counter values. Dropwatch instead >> listens on a netlink socket for the kernel to inform userspace (apps >> like dropwatch and any others), that a packet has been dropped. This of >> course implies that the kernel has some sort of functionality to this >> end. That functionality (called the netlink Drop Monitor protocol), is >> currently being reviewed upstream. For those who would like to >> experiment with dropwatch now, you can either retrieve the appropriate >> kernel patches from the netdev mailing list, or download them here >> >> Is that still the case? Have these been reviewed on the netdev list? >> Have they been accepted/rejected? T> Yes, they've been merged for quite some time. Ahh, great!
diff --git a/package/Config.in b/package/Config.in index 286a605..7730317 100644 --- a/package/Config.in +++ b/package/Config.in @@ -22,6 +22,7 @@ source "package/cache-calibrator/Config.in" source "package/dhrystone/Config.in" source "package/dstat/Config.in" source "package/dmalloc/Config.in" +source "package/dropwatch/Config.in" source "package/gdb/Config.in" source "package/iozone/Config.in" source "package/kexec/Config.in" diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in new file mode 100644 index 0000000..69d7cd5 --- /dev/null +++ b/package/dropwatch/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_DROPWATCH + bool "dropwatch" + help + Dropwatch is a project I am tinkering with to improve the visibility + developers and sysadmins have into the Linux networking stack. + + https://git.fedorahosted.org/git/dropwatch.git diff --git a/package/dropwatch/dropwatch-1.4-build.patch b/package/dropwatch/dropwatch-1.4-build.patch new file mode 100644 index 0000000..eed43e8 --- /dev/null +++ b/package/dropwatch/dropwatch-1.4-build.patch @@ -0,0 +1,27 @@ +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001 +From: Tzu-Jung Lee <tjlee@ambarella.com> +Date: Fri, 12 Jul 2013 20:00:57 +0800 +Subject: [PATCH] build: modify hardcoded gcc to support buildroot + +Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com> + +diff --git a/src/Makefile b/src/Makefile +index 026b6ba..b87ae9f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\ + lookup_bfd.o lookup_kas.o + + dropwatch: $(OBJFILES) +- gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS) ++ $(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS) + + %.o: %.c +- gcc $(CFLAGS) $< ++ $(CC) $(CFLAGS) $< + clean: + rm -f dropwatch *.o + +-- +1.8.3.2 + diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk new file mode 100644 index 0000000..b9676cb --- /dev/null +++ b/package/dropwatch/dropwatch.mk @@ -0,0 +1,30 @@ +############################################################# +# +# dropwatch +# +############################################################# + +DROPWATCH_VERSION = 1.4 +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.bz2 +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot/ +DROPWATCH_DEPENDENCIES = readline libnl binutils +DROPWATCH_LICENSE = GPLv2+ +DROPWATCH_LICENSE_FILE = COPYING + +define DROPWATCH_INSTALL_TARGET_CMDS + cp $(@D)/src/dropwatch $(TARGET_DIR)/usr/bin +endef + +define DROPWATCH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) build +endef + +define DROPWATCH_CLEAN_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean +endef + +define DROPWATCH_UNINSTALL_CMDS + rm -f $(TARGET_DIR)/usr/bin/dropwatch +endef + +$(eval $(generic-package))
Signed-off-by: Tzu-Jung Lee <tjlee@ambarella.com> --- package/Config.in | 1 + package/dropwatch/Config.in | 7 +++++++ package/dropwatch/dropwatch-1.4-build.patch | 27 ++++++++++++++++++++++++++ package/dropwatch/dropwatch.mk | 30 +++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 package/dropwatch/Config.in create mode 100644 package/dropwatch/dropwatch-1.4-build.patch create mode 100644 package/dropwatch/dropwatch.mk