From: Wang Xiao W Date: Thu, 10 Sep 2015 04:38:10 +0000 (+0800) Subject: fm10k/base: add PF Tx timestamp mode handler X-Git-Tag: spdx-start~8415 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=14d2d7d475655157904c09dfc053fedb0610b1ff;p=dpdk.git fm10k/base: add PF Tx timestamp mode handler 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 --- diff --git a/drivers/net/fm10k/base/fm10k_pf.c b/drivers/net/fm10k/base/fm10k_pf.c index 7ab322a5ca..cc4923503a 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 f6c290a7fa..5a40d5b913 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, \