From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id DF3EB8DA8 for ; Thu, 10 Sep 2015 06:38:48 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 09 Sep 2015 21:38:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,501,1437462000"; d="scan'208";a="786352450" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 09 Sep 2015 21:38:47 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t8A4cjmP006202; Thu, 10 Sep 2015 12:38:45 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t8A4cfte026516; Thu, 10 Sep 2015 12:38:43 +0800 Received: (from xiaowan1@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8A4cfTS026512; Thu, 10 Sep 2015 12:38:41 +0800 From: Wang Xiao W To: dev@dpdk.org Date: Thu, 10 Sep 2015 12:38:10 +0800 Message-Id: <1441859917-26475-2-git-send-email-xiao.w.wang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1441859917-26475-1-git-send-email-xiao.w.wang@intel.com> References: <1441859917-26475-1-git-send-email-xiao.w.wang@intel.com> Cc: Wang Xiao W Subject: [dpdk-dev] [PATCH 01/28] fm10k: add PF Tx Timestamp mode handler function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2015 04:38:49 -0000 We need a handler function to be able to listen for Tx timestamp mode responses. Without this, core driver code for PTP can't determine if the Timestamp mode request was successful. This was overlooked in the previous commit. Signed-off-by: Wang Xiao W --- drivers/net/fm10k/base/fm10k_pf.c | 6 ++++++ drivers/net/fm10k/base/fm10k_pf.h | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c index 3545a24..ac9ae5e 100644 --- a/drivers/net/fm10k/base/fm10k_pf.c +++ b/drivers/net/fm10k/base/fm10k_pf.c @@ -1810,6 +1810,12 @@ const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[] = { FM10K_TLV_ATTR_LAST }; +const struct fm10k_tlv_attr fm10k_tx_timestamp_mode_attr[] = { + FM10K_TLV_ATTR_LE_STRUCT(FM10K_PF_ATTR_ID_TIMESTAMP_MODE_RESP, + sizeof(struct fm10k_swapi_tx_timestamp_mode)), + FM10K_TLV_ATTR_LAST +}; + /* currently there is no shared 1588 timestamp handler */ /** diff --git a/drivers/net/fm10k/base/fm10k_pf.h b/drivers/net/fm10k/base/fm10k_pf.h index f6c290a..5a40d5b 100644 --- a/drivers/net/fm10k/base/fm10k_pf.h +++ b/drivers/net/fm10k/base/fm10k_pf.h @@ -118,6 +118,12 @@ struct fm10k_swapi_1588_timestamp { __le16 sglort; }; +struct fm10k_swapi_tx_timestamp_mode { + __le16 glort; + __le16 maxmode; + __le32 status; +}; + #define FM10K_PF_MSG_LPORT_CREATE_HANDLER(func) \ FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_LPORT_CREATE, NULL, func) #define FM10K_PF_MSG_LPORT_DELETE_HANDLER(func) \ @@ -139,6 +145,11 @@ extern const struct fm10k_tlv_attr fm10k_err_msg_attr[]; #define FM10K_PF_MSG_ERR_HANDLER(msg, func) \ FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_##msg, fm10k_err_msg_attr, func) +extern const struct fm10k_tlv_attr fm10k_tx_timestamp_mode_attr[]; +#define FM10K_PF_MSG_TIMESTAMP_MODE_HANDLER(func) \ + FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_TX_TIMESTAMP_MODE, \ + fm10k_tx_timestamp_mode_attr, func) + extern const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[]; #define FM10K_PF_MSG_1588_TIMESTAMP_HANDLER(func) \ FM10K_MSG_HANDLER(FM10K_PF_MSG_ID_1588_TIMESTAMP, \ -- 1.9.3