[ovs-dev] ovn: Make DHCP log messages unique

Message ID 20190228180650.31470-1-haleyb.dev@gmail.com
State New
Headers show
Series
  • [ovs-dev] ovn: Make DHCP log messages unique
Related show

Commit Message

Brian Haley Feb. 28, 2019, 6:06 p.m.
From: Brian Haley <bhaley@redhat.com>

Two messags were using the same string, add info to one
to make it unique.  Also cleaned-up some of the others
to make them consistent throughout.

Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
---
 ovn/controller/pinctrl.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

Comments

0-day Robot Feb. 28, 2019, 6:59 p.m. | #1
Bleep bloop.  Greetings Brian Haley, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Author Brian Haley <bhaley@redhat.com> needs to sign off.
WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Brian Haley <haleyb.dev@gmail.com>
Lines checked: 74, Warnings: 1, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
Ben Pfaff Feb. 28, 2019, 7:23 p.m. | #2
On Thu, Feb 28, 2019 at 01:06:50PM -0500, Brian Haley wrote:
> From: Brian Haley <bhaley@redhat.com>
> 
> Two messags were using the same string, add info to one
> to make it unique.  Also cleaned-up some of the others
> to make them consistent throughout.
> 
> Signed-off-by: Brian Haley <haleyb.dev@gmail.com>

Thanks, applied to master.

Patch

diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c
index 9250a71bd..655a85f74 100644
--- a/ovn/controller/pinctrl.c
+++ b/ovn/controller/pinctrl.c
@@ -622,12 +622,13 @@  pinctrl_handle_put_dhcp_opts(
     in_dhcp_ptr += sizeof *in_dhcp_data;
     if (in_dhcp_ptr > end) {
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
-        VLOG_WARN_RL(&rl, "Invalid or incomplete DHCP packet received");
+        VLOG_WARN_RL(&rl, "Invalid or incomplete DHCP packet received, "
+                     "bad data length");
         goto exit;
     }
     if (in_dhcp_data->op != DHCP_OP_REQUEST) {
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
-        VLOG_WARN_RL(&rl, "Invalid opcode in the DHCP packet : %d",
+        VLOG_WARN_RL(&rl, "Invalid opcode in the DHCP packet: %d",
                      in_dhcp_data->op);
         goto exit;
     }
@@ -692,7 +693,7 @@  pinctrl_handle_put_dhcp_opts(
     if (*in_dhcp_msg_type != DHCP_MSG_DISCOVER &&
         *in_dhcp_msg_type != DHCP_MSG_REQUEST) {
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
-        VLOG_WARN_RL(&rl, "Invalid DHCP message type : %d", *in_dhcp_msg_type);
+        VLOG_WARN_RL(&rl, "Invalid DHCP message type: %d", *in_dhcp_msg_type);
         goto exit;
     }
 
@@ -1024,13 +1025,13 @@  pinctrl_handle_put_dhcpv6_opts(
 
     if (!in_opt_client_id) {
         VLOG_WARN_RL(&rl, "DHCPv6 option - Client id not present in the "
-                     " DHCPv6 packet");
+                     "DHCPv6 packet");
         goto exit;
     }
 
     if (!iaid && in_dhcpv6_msg_type != DHCPV6_MSG_TYPE_INFO_REQ) {
         VLOG_WARN_RL(&rl, "DHCPv6 option - IA NA not present in the "
-                     " DHCPv6 packet");
+                     "DHCPv6 packet");
         goto exit;
     }
 
@@ -2391,8 +2392,8 @@  extract_addresses_with_port(const char *addresses,
     if (lexer.token.type != LEX_T_STRING) {
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
         VLOG_INFO_RL(&rl,
-                    "Syntax error: expecting quoted string after"
-                    " 'is_chassis_resident' in address '%s'", addresses);
+                    "Syntax error: expecting quoted string after "
+                    "'is_chassis_resident' in address '%s'", addresses);
         lexer_destroy(&lexer);
         return false;
     }