|
|
Re: [ovs-dev] [PATCH 03/21] odp-util: Add tun_key to parse_odp_key_attr() |
On Thu, May 24, 2012 at 06:08:56PM +0900, Simon Horman wrote:
> Cc: Kyle Mestery <kmestery@xxxxxxxxx>
But I don't see him CCed?
> + ovs_be32 ipv4_src;
> + ovs_be32 ipv4_dst;
> + unsigned long long tun_flags;
> + int ipv4_tos;
> + int ipv4_ttl;
> + int n = -1;
> +
> + if (sscanf(s, "ipv4_tunnel(tun_id=%31[x0123456789abcdefABCDEF]"
> + ",flags=%llx,src="IP_SCAN_FMT",dst="IP_SCAN_FMT
> + ",tos=%i,ttl=%i)%n",
> + tun_id_s, &tun_flags,
> + IP_SCAN_ARGS(&ipv4_src), IP_SCAN_ARGS(&ipv4_dst),
> + &ipv4_tos, &ipv4_ttl, &n) > 0
> + && n > 0) {
Does this compile? I don't see a declaration of tun_id_s.
In the ODP printer and parser, we usually require fields that are
hexadecimal to be written with an explicit "0x" on output (using
something like "0x%x" or "%#x" on output), and then use "%i" on input,
so that it is always unambiguous at a glance whether a number is
decimal or hexadecimal. I'd appreciate it if we could maintain that
here (I didn't look over at the printer code to see if it writes 0x,
but I'd like it to).
Otherwise, this looks good, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |