From: David S. Miller Date: Sun, 5 Aug 2018 20:04:31 +0000 (-0700) Subject: Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c1c8626fcebed467184ffd8de0ab5c9f9d9c3594;p=linux.git Merge ra./pub/scm/linux/kernel/git/davem/net Lots of overlapping changes, mostly trivial in nature. The mlxsw conflict was resolving using the example resolution at: https://github.com/jpirko/linux_mlxsw/blob/combined_queue/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c Signed-off-by: David S. Miller --- c1c8626fcebed467184ffd8de0ab5c9f9d9c3594 diff --cc drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c index a4669e79fdf90,f6f6a568d66a5..66ea256fe5609 --- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c @@@ -760,10 -730,8 +766,10 @@@ int mlxsw_afa_block_append_vlan_modify( MLXSW_AFA_VLAN_CODE, MLXSW_AFA_VLAN_SIZE); - if (!act) { - if (IS_ERR(act)) ++ if (IS_ERR(act)) { + NL_SET_ERR_MSG_MOD(extack, "Cannot append vlan_modify action"); - return -ENOBUFS; + return PTR_ERR(act); + } mlxsw_afa_vlan_pack(act, MLXSW_AFA_VLAN_VLAN_TAG_CMD_NOP, MLXSW_AFA_VLAN_CMD_SET_OUTER, vid, MLXSW_AFA_VLAN_CMD_SET_OUTER, pcp, @@@ -1043,9 -1003,8 +1050,9 @@@ int mlxsw_afa_block_append_fwd(struct m act = mlxsw_afa_block_append_action(block, MLXSW_AFA_FORWARD_CODE, MLXSW_AFA_FORWARD_SIZE); - if (!act) { - err = -ENOBUFS; + if (IS_ERR(act)) { + NL_SET_ERR_MSG_MOD(extack, "Cannot append forward action"); + err = PTR_ERR(act); goto err_append_action; } mlxsw_afa_forward_pack(act, MLXSW_AFA_FORWARD_TYPE_PBS, @@@ -1176,10 -1130,8 +1183,10 @@@ int mlxsw_afa_block_append_fid_set(stru char *act = mlxsw_afa_block_append_action(block, MLXSW_AFA_VIRFWD_CODE, MLXSW_AFA_VIRFWD_SIZE); - if (!act) { - if (IS_ERR(act)) ++ if (IS_ERR(act)) { + NL_SET_ERR_MSG_MOD(extack, "Cannot append fid_set action"); - return -ENOBUFS; + return PTR_ERR(act); + } mlxsw_afa_virfwd_pack(act, MLXSW_AFA_VIRFWD_FID_CMD_SET, fid); return 0; } diff --cc tools/bpf/bpftool/map.c index 9c81918455850,f74a8bcbda874..e860ca859b284 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c @@@ -34,7 -34,9 +34,8 @@@ #include #include #include +#include + #include #include #include #include @@@ -262,20 -162,11 +264,21 @@@ static void print_entry_json(struct bpf print_hex_data_json(key, info->key_size); jsonw_name(json_wtr, "value"); print_hex_data_json(value, info->value_size); + if (btf) { + struct btf_dumper d = { + .btf = btf, + .jw = json_wtr, + .is_plain_text = false, + }; + + jsonw_name(json_wtr, "formatted"); + do_dump_btf(&d, info, key, value); + } } else { - unsigned int i, n; + unsigned int i, n, step; n = get_possible_cpus(); + step = round_up(info->value_size, 8); jsonw_name(json_wtr, "key"); print_hex_data_json(key, info->key_size);