Re: git: 10746040820e - main - ixgbe: rename VF message type macros
Date: Fri, 20 Sep 2024 03:59:47 UTC
Kevin Bowling wrote:
> The branch main has been updated by kbowling:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=10746040820ee5186caf4d4d61cf88196ec213ba
>
> commit 10746040820ee5186caf4d4d61cf88196ec213ba
> Author: Jakub Chylkowski <jakubx.chylkowski@intel.com>
> AuthorDate: 2024-09-19 21:02:06 +0000
> Commit: Kevin Bowling <kbowling@FreeBSD.org>
> CommitDate: 2024-09-19 21:03:18 +0000
>
> ixgbe: rename VF message type macros
>
> DPDK commit message
>
> There is name similarity within IXGBE_VT_MSGTYPE_ACK and
> PFMAILBOX.ACK / VFMAILBOX.ACK which may cause confusion. Rename MSGTYPE
> macros to SUCCESS and FAILURE as they are not specified in datasheet and
> now will be easily distinguishable.
>
> Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
> Reviewed-by: Marek Zalfresso-jundzillo <marekx.zalfresso-jundzillo@intel.com>
> Reviewed-by: Alice Michael <alice.michael@intel.com>
> Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
> Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
> Tested-by: Piotr Skajewski <piotrx.skajewski@intel.com>
> Tested-by: Alice Michael <alice.michael@intel.com>
>
> Obtained from: DPDK (4f675c9)
> MFC after: 1 week
> ---
> sys/dev/ixgbe/if_sriov.c | 10 +++++-----
> sys/dev/ixgbe/ixgbe_mbx.h | 14 +++++++-------
> sys/dev/ixgbe/ixgbe_vf.c | 34 ++++++++++++++++++----------------
> 3 files changed, 30 insertions(+), 28 deletions(-)
>
> diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c
> index 7cdd287b85bf..a16092c9f688 100644
> --- a/sys/dev/ixgbe/if_sriov.c
> +++ b/sys/dev/ixgbe/if_sriov.c
> @@ -107,14 +107,14 @@ static inline void
> ixgbe_send_vf_ack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg)
> {
> msg &= IXGBE_VT_MSG_MASK;
> - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_ACK);
> + ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS);
> }
>
> static inline void
> ixgbe_send_vf_nack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg)
> {
> msg &= IXGBE_VT_MSG_MASK;
> - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_NACK);
> + ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_FAILURE);
> }
>
> static inline void
> @@ -362,9 +362,9 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg)
> if (ixgbe_validate_mac_addr(vf->ether_addr) == 0) {
> ixgbe_set_rar(&sc->hw, vf->rar_index, vf->ether_addr,
> vf->pool, true);
> - ack = IXGBE_VT_MSGTYPE_ACK;
> + ack = IXGBE_VT_MSGTYPE_SUCCESS;
> } else
> - ack = IXGBE_VT_MSGTYPE_NACK;
> + ack = IXGBE_VT_MSGTYPE_FAILURE;
>
> ixgbe_vf_enable_transmit(sc, vf);
> ixgbe_vf_enable_receive(sc, vf);
> @@ -556,7 +556,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg)
> return;
> }
>
> - resp[0] = IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_ACK |
> + resp[0] = IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_SUCCESS |
> IXGBE_VT_MSGTYPE_CTS;
>
> num_queues = ixgbe_vf_queues(sc->iov_mode);
Build fails:
/usr/src/sys/dev/ixgbe/if_sriov.c:103:16: error: member reference base
type 'struct ixgbe_mbx_operations[64]' is not a structure or union
103 | sc->hw.mbx.ops.write(&sc->hw, &msg, 1, vf->pool);
| ~~~~~~~~~~~~~~^~~~~~
/usr/src/sys/dev/ixgbe/if_sriov.c:377:13: error: member reference base
type 'struct ixgbe_mbx_operations[64]' is not a structure or union
377 | hw->mbx.ops.write(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN,
vf->pool);
| ~~~~~~~~~~~^~~~~~
/usr/src/sys/dev/ixgbe/if_sriov.c:568:13: error: member reference base
type 'struct ixgbe_mbx_operations[64]' is not a structure or union
568 | hw->mbx.ops.write(hw, resp,
IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool);
| ~~~~~~~~~~~^~~~~~
/usr/src/sys/dev/ixgbe/if_sriov.c:585:21: error: member reference base
type 'struct ixgbe_mbx_operations[64]' is not a structure or union
585 | error = hw->mbx.ops.read(hw, msg, IXGBE_VFMAILBOX_SIZE,
vf->pool);
| ~~~~~~~~~~~^~~~~
/usr/src/sys/dev/ixgbe/if_sriov.c:646:19: error: member reference base
type 'struct ixgbe_mbx_operations[64]' is not a structure or union
646 | if (hw->mbx.ops.check_for_rst(hw,
vf->pool) == 0)
| ~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/src/sys/dev/ixgbe/if_sriov.c:649:19: error: member reference base
type 'struct ixgbe_mbx_operations[64]' is not a structure or union
649 | if (hw->mbx.ops.check_for_msg(hw,
vf->pool) == 0)
| ~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/src/sys/dev/ixgbe/if_sriov.c:652:19: error: member reference base
type 'struct ixgbe_mbx_operations[64]' is not a structure or union
652 | if (hw->mbx.ops.check_for_ack(hw,
vf->pool) == 0)
| ~~~~~~~~~~~^~~~~~~~~~~~~~
7 errors generated.
*** [if_sriov.o] Error code 1
--
Charlie Li
...nope, still don't have an exit line.