liquidio: synchronize VF representor names with NIC firmware
Subsystems (3)
PATCH 1/1 liquidio: synchronize VF representor names with NIC firmware
From: Vijaya Mohan Guvva <[email protected]>
LiquidIO firmware supports a vswitch that needs to know the names of the VF representors in the host to maintain compatibility for direct programming using external Openflow agents. So, for each VF representor, send its name to the firmware when it gets registered and when its name changes.
--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 15 +++++ drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c | 68 ++++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_vf_rep.h | 2 + .../net/ethernet/cavium/liquidio/liquidio_common.h | 8 ++- 4 files changed, 92 insertions(+), 1 deletion(-)
drivers/net/ethernet/cavium/liquidio/lio_main.c +15 -0
@@ -1639,6 +1639,10 @@ static void liquidio_remove(struct pci_dev *pdev)if (oct_dev->watchdog_task)kthread_stop (oct_dev->watchdog_task); +if (!oct_dev->octeon_id && + oct_dev->fw_info.app_cap_flags &LIQUIDIO_SWITCHDEV_CAP ) +lio_vf_rep_modexit (); +if (oct_dev->app_mode && (oct_dev->app_mode ==CVM_DRV_NIC_APP ))liquidio_stop_nic_module (oct_dev);
@@ -4029,6 +4033,17 @@ static int liquidio_init_nic_module(struct octeon_device *oct) goto octnet_init_failure; } +/* Call vf_rep_modinit if the firmware is switchdev capable +* and do it from the first liquidio function probed. +*/ +if (!oct->octeon_id && + oct->fw_info.app_cap_flags &LIQUIDIO_SWITCHDEV_CAP ) { +if (lio_vf_rep_modinit ()) { +liquidio_stop_nic_module (oct); + goto octnet_init_failure; + } + } +liquidio_ptp_init (oct);dev_dbg (&oct->pci_dev->dev,"Network interfaces ready\n" );
drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c +68 -0
71 lines not on this page · raw message
drivers/net/ethernet/cavium/liquidio/lio_vf_rep.h +2 -0
@@ -44,4 +44,6 @@ struct lio_vf_rep_sc_ctx {int lio_vf_rep_create (struct octeon_device *oct);void lio_vf_rep_destroy (struct octeon_device *oct); +int lio_vf_rep_modinit (void ); +void lio_vf_rep_modexit (void );#endif
drivers/net/ethernet/cavium/liquidio/liquidio_common.h +7 -1
@@ -928,7 +928,8 @@ enum lio_vf_rep_req_type {LIO_VF_REP_REQ_NONE ,LIO_VF_REP_REQ_STATE ,LIO_VF_REP_REQ_MTU , -LIO_VF_REP_REQ_STATS +LIO_VF_REP_REQ_STATS , +LIO_VF_REP_REQ_DEVNAME }; enum {
@@ -936,12 +937,17 @@ enum {LIO_VF_REP_STATE_UP }; +#define LIO_IF_NAME_SIZE 16 struct lio_vf_rep_req { u8 req_type; u8 ifidx; u8 rsvd[6]; union { + struct lio_vf_rep_name { + char name[LIO_IF_NAME_SIZE]; + } rep_name; + struct lio_vf_rep_mtu { u32 mtu; u32 rsvd;
Signature · 1 line
1.8.3.1
From: Felix Manlunas <[email protected]>
Date: Wed, 1 Nov 2017 16:19:49 -0700
Quoted 11 lines
From: Vijaya Mohan Guvva <[email protected]>
LiquidIO firmware supports a vswitch that needs to know the names of the VF representors in the host to maintain compatibility for direct programming using external Openflow agents. So, for each VF representor, send its name to the firmware when it gets registered and when its name changes.
Signed-off-by Vijaya Mohan Guvva <[email protected]>Signed-off-by Raghu Vatsavayi <[email protected]>Signed-off-by Felix Manlunas <[email protected]>
Applied, thank you.