All of lore.kernel.org
 help / color / mirror / Atom feed
* [iproute PATCH] man: tc-csum.8: Fix example
@ 2017-01-27 11:15 Phil Sutter
  2017-01-27 12:26 ` Jiri Pirko
  2017-01-27 20:49 ` Guillaume Nault
  0 siblings, 2 replies; 5+ messages in thread
From: Phil Sutter @ 2017-01-27 11:15 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

This fixes two issues with the provided example:

- Add missing 'dev' keyword to second command.
- Use a real IPv4 address instead of a bogus hex value since that will
  be rejected by get_addr_ipv4().

Fixes: dbfb17a67f9c7 ("man: tc-csum.8: Add an example")
Reported-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 man/man8/tc-csum.8 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/man8/tc-csum.8 b/man/man8/tc-csum.8
index 3a64c82f09ba8..43561d9f90a8e 100644
--- a/man/man8/tc-csum.8
+++ b/man/man8/tc-csum.8
@@ -57,9 +57,9 @@ packets, both IP and UDP checksums have to be recalculated:
 .RS
 .EX
 # tc qdisc add dev eth0 ingress handle ffff:
-# tc filter add eth0 prio 1 protocol ip parent ffff: \\
+# tc filter add dev eth0 prio 1 protocol ip parent ffff: \\
 	u32 match ip src 192.168.1.100/32 flowid :1 \\
-	action pedit munge ip dst set 0x12345678 pipe \\
+	action pedit munge ip dst set 1.2.3.4 pipe \\
 	csum ip and udp
 .EE
 .RE
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [iproute PATCH] man: tc-csum.8: Fix example
  2017-01-27 11:15 [iproute PATCH] man: tc-csum.8: Fix example Phil Sutter
@ 2017-01-27 12:26 ` Jiri Pirko
  2017-01-27 20:49 ` Guillaume Nault
  1 sibling, 0 replies; 5+ messages in thread
From: Jiri Pirko @ 2017-01-27 12:26 UTC (permalink / raw)
  To: Phil Sutter; +Cc: Stephen Hemminger, netdev

Fri, Jan 27, 2017 at 12:15:01PM CET, phil@nwl.cc wrote:
>This fixes two issues with the provided example:
>
>- Add missing 'dev' keyword to second command.
>- Use a real IPv4 address instead of a bogus hex value since that will
>  be rejected by get_addr_ipv4().
>
>Fixes: dbfb17a67f9c7 ("man: tc-csum.8: Add an example")
>Reported-by: Davide Caratti <dcaratti@redhat.com>
>Signed-off-by: Phil Sutter <phil@nwl.cc>

Reviewed-by: Jiri Pirko <jiri@mellanox.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [iproute PATCH] man: tc-csum.8: Fix example
  2017-01-27 11:15 [iproute PATCH] man: tc-csum.8: Fix example Phil Sutter
  2017-01-27 12:26 ` Jiri Pirko
@ 2017-01-27 20:49 ` Guillaume Nault
  2017-01-28 11:16   ` Phil Sutter
  1 sibling, 1 reply; 5+ messages in thread
From: Guillaume Nault @ 2017-01-27 20:49 UTC (permalink / raw)
  To: Phil Sutter; +Cc: Stephen Hemminger, netdev

On Fri, Jan 27, 2017 at 12:15:01PM +0100, Phil Sutter wrote:
> +# tc filter add dev eth0 prio 1 protocol ip parent ffff: \\
>  	u32 match ip src 192.168.1.100/32 flowid :1 \\
> -	action pedit munge ip dst set 0x12345678 pipe \\
> +	action pedit munge ip dst set 1.2.3.4 pipe \\
> 
Just nitpicking here, but IMHO examples like this should better use IP
addresses reserved for documentation (192.0.2.0/24, 198.51.100.0/24 or
203.0.113.0/24).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [iproute PATCH] man: tc-csum.8: Fix example
  2017-01-27 20:49 ` Guillaume Nault
@ 2017-01-28 11:16   ` Phil Sutter
  2017-01-30 12:12     ` Guillaume Nault
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Sutter @ 2017-01-28 11:16 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: Stephen Hemminger, netdev

On Fri, Jan 27, 2017 at 09:49:58PM +0100, Guillaume Nault wrote:
> On Fri, Jan 27, 2017 at 12:15:01PM +0100, Phil Sutter wrote:
> > +# tc filter add dev eth0 prio 1 protocol ip parent ffff: \\
> >  	u32 match ip src 192.168.1.100/32 flowid :1 \\
> > -	action pedit munge ip dst set 0x12345678 pipe \\
> > +	action pedit munge ip dst set 1.2.3.4 pipe \\
> > 
> Just nitpicking here, but IMHO examples like this should better use IP
> addresses reserved for documentation (192.0.2.0/24, 198.51.100.0/24 or
> 203.0.113.0/24).

Good point! This wasn't on my radar yet and I didn't know there were
IPv4 ranges specifically for that purpose. I guess the reasoning here is
analogous to why one shouldn't use 'example.com' everywhere.

Luckily, 1.2.3.0/24 seems to be reserved by APNIC for testing purposes.
:)

I'll respin using another example address.

Thanks, Phil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [iproute PATCH] man: tc-csum.8: Fix example
  2017-01-28 11:16   ` Phil Sutter
@ 2017-01-30 12:12     ` Guillaume Nault
  0 siblings, 0 replies; 5+ messages in thread
From: Guillaume Nault @ 2017-01-30 12:12 UTC (permalink / raw)
  To: Phil Sutter, Stephen Hemminger, netdev

On Sat, Jan 28, 2017 at 12:16:48PM +0100, Phil Sutter wrote:
> On Fri, Jan 27, 2017 at 09:49:58PM +0100, Guillaume Nault wrote:
> > On Fri, Jan 27, 2017 at 12:15:01PM +0100, Phil Sutter wrote:
> > > +# tc filter add dev eth0 prio 1 protocol ip parent ffff: \\
> > >  	u32 match ip src 192.168.1.100/32 flowid :1 \\
> > > -	action pedit munge ip dst set 0x12345678 pipe \\
> > > +	action pedit munge ip dst set 1.2.3.4 pipe \\
> > > 
> > Just nitpicking here, but IMHO examples like this should better use IP
> > addresses reserved for documentation (192.0.2.0/24, 198.51.100.0/24 or
> > 203.0.113.0/24).
> 
> Good point! This wasn't on my radar yet and I didn't know there were
> IPv4 ranges specifically for that purpose.
> 
The same exists for IPv6: 2001:db8::/32, reserved by RFC 3849. But I
guess you probably already figured it out.

> I guess the reasoning here is analogous to why one shouldn't use
> 'example.com' everywhere.
> 
Not sure about what you mean by "one shouldn't use 'example.com'
everywhere". Other domains may sometime be more appropriate (like
.invalid), but example.com is one of the domains reserved for
documentation by RFC 2606.

> Luckily, 1.2.3.0/24 seems to be reserved by APNIC for testing purposes.
> :)
> 
I'd expect that too many martians target these addresses. But AFAIK, in
theory, nothing prevents APNIC from allocating 1.2.3.0/24.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-30 12:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 11:15 [iproute PATCH] man: tc-csum.8: Fix example Phil Sutter
2017-01-27 12:26 ` Jiri Pirko
2017-01-27 20:49 ` Guillaume Nault
2017-01-28 11:16   ` Phil Sutter
2017-01-30 12:12     ` Guillaume Nault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.