]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mlxsw: reg: Update RALUE register with IPv6 support
authorIdo Schimmel <idosch@mellanox.com>
Tue, 18 Jul 2017 08:10:23 +0000 (10:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Jul 2017 18:57:33 +0000 (11:57 -0700)
Update the register so that IPv6 LPM entries could be programmed to the
device's table.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/reg.h

index 0fc2263dee3a91b63571c3c39b640acac8b81067..c6c508941d2383267819fb3ca593fcb8ea9142e8 100644 (file)
@@ -4724,6 +4724,7 @@ MLXSW_ITEM32(reg, ralue, prefix_len, 0x08, 0, 8);
  * Access: Index
  */
 MLXSW_ITEM32(reg, ralue, dip4, 0x18, 0, 32);
+MLXSW_ITEM_BUF(reg, ralue, dip6, 0x0C, 16);
 
 enum mlxsw_reg_ralue_entry_type {
        MLXSW_REG_RALUE_ENTRY_TYPE_MARKER_ENTRY = 1,
@@ -4857,6 +4858,16 @@ static inline void mlxsw_reg_ralue_pack4(char *payload,
        mlxsw_reg_ralue_dip4_set(payload, dip);
 }
 
+static inline void mlxsw_reg_ralue_pack6(char *payload,
+                                        enum mlxsw_reg_ralxx_protocol protocol,
+                                        enum mlxsw_reg_ralue_op op,
+                                        u16 virtual_router, u8 prefix_len,
+                                        const void *dip)
+{
+       mlxsw_reg_ralue_pack(payload, protocol, op, virtual_router, prefix_len);
+       mlxsw_reg_ralue_dip6_memcpy_to(payload, dip);
+}
+
 static inline void
 mlxsw_reg_ralue_act_remote_pack(char *payload,
                                enum mlxsw_reg_ralue_trap_action trap_action,