From patchwork Mon Feb 4 07:08:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slavomir Kaslev X-Patchwork-Id: 10795013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 684436C2 for ; Mon, 4 Feb 2019 07:09:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52C432AFCA for ; Mon, 4 Feb 2019 07:09:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40B412B0AD; Mon, 4 Feb 2019 07:09:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D97702AFCA for ; Mon, 4 Feb 2019 07:09:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727514AbfBDHJE (ORCPT ); Mon, 4 Feb 2019 02:09:04 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36719 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfBDHJE (ORCPT ); Mon, 4 Feb 2019 02:09:04 -0500 Received: by mail-wr1-f66.google.com with SMTP id z3so2142224wrv.3 for ; Sun, 03 Feb 2019 23:09:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NizWEPNmX5axge9BdQSr1OwMV0+zdupHJpaVInlnmfo=; b=PSUpiuwavGjVKMnHh3AYiVu9WqiNQLR8AmMs+k1uQm95wFewwEPU9HrSSQNZAFRm05 irX+AGRmpHjewIT6ThcaopCgNbOTrTL4xAU+iaUUjgxVSUqQEmhxcyi571ZiizCc55C3 H5pkMdA6wdnLcgtJVvMKdKk17H+7JiGOrc8mL6uDLeGNZmlstygfbk53xYNxU17JvPo5 4yibQCBn7rpCTS34AqUByTYZomEf1vAYDdYhsYb0nzQaECfoeZ78/beMtjNVqTnO5L2F DNDAqbZKqHD9zPBIOrYVuhId68xIXNAVkJHX23JVJMdoEUc2OjjCPpxT0DBnxh/VxEYg DmXA== X-Gm-Message-State: AJcUukdL6nMytJIVyvb7aGWNLRFbP++u6z0wmCM4sCtw2AS3fJsxItbS HoKGo01UbY30K23xzFCowzeoD61TcQ== X-Google-Smtp-Source: ALg8bN7HQtZH2dXG2tf2n96fwQ28VA7ajBMcdMrAvUr6NKyc3ZNu/YmESzZ6Bl7TgiExyCB1RzuJ/g== X-Received: by 2002:adf:f390:: with SMTP id m16mr46241507wro.71.1549264141849; Sun, 03 Feb 2019 23:09:01 -0800 (PST) Received: from localhost.localdomain ([213.145.108.55]) by smtp.gmail.com with ESMTPSA id w12sm13222378wrr.23.2019.02.03.23.09.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Feb 2019 23:09:01 -0800 (PST) From: Slavomir Kaslev To: linux-trace-devel@vger.kernel.org Cc: rostedt@goodmis.org, slavomir.kaslev@gmail.com, tstoyanov@vmware.com, ykaradzhov@vmware.com Subject: [PATCH 0/8] trace-cmd protocol fixes Date: Mon, 4 Feb 2019 09:08:47 +0200 Message-Id: <20190204070855.8921-1-kaslevs@vmware.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch set tries to make trace-cmd's protocol more robust to future changes. New MSG_NOT_SUPP message is added for acknowledgement of unexpected requests. Slavomir Kaslev (8): trace-cmd: Remove unused global variable trace-cmd: Rename error_operation_for_server trace-cmd: Remove tracecmd_msg_handle/tracecmd_msg_server distinction trace-cmd: Check if connection is done when reading data in tracecmd_msg_read_data trace-cmd: Fix a memory leak in tracecmd_msg_send_init_data trace-cmd: Make tracecmd_msg_send_close return error code if any trace-cmd: Add tracecmd_msg_wait_close function trace-cmd: Acknowledge unexpected protocol messages include/trace-cmd/trace-cmd.h | 14 +-- tracecmd/trace-listen.c | 2 +- tracecmd/trace-msg.c | 172 ++++++++++++++++++---------------- tracecmd/trace-record.c | 2 +- 4 files changed, 96 insertions(+), 94 deletions(-)