DEVLINKOBJ = devlink.o mnlg.o
TARGETS += devlink
-CFLAGS += $(shell $(PKG_CONFIG) libmnl --cflags)
-LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
-
endif
all: $(TARGETS) $(LIBS)
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
install: all
- install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
+ for i in $(TARGETS); \
+ do install -m 0755 $$i $(DESTDIR)$(SBINDIR); \
+ done
clean:
rm -f $(DEVLINKOBJ) $(TARGETS)
if (tb[IFLA_CAN_STATE]) {
uint32_t state = rta_getattr_u32(tb[IFLA_CAN_STATE]);
- fprintf(f, "state %s ", state < CAN_STATE_MAX ?
+ print_string(PRINT_ANY, "state", "state %s ", state < CAN_STATE_MAX ?
can_state_names[state] : "UNKNOWN");
}
msg.msg_iovlen = 1;
i = 0;
while (1) {
+next:
status = rtnl_recvmsg(rtnl->fd, &msg, &buf);
++i;
else
free(buf);
+ if (i < iovlen)
+ goto next;
return error ? -i : 0;
}
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
install: all
- install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
+ for i in $(TARGETS); \
+ do install -m 0755 $$i $(DESTDIR)$(SBINDIR); \
+ done
clean:
rm -f $(RDMA_OBJ) $(TARGETS)
__u32 lkey;
};
+enum ib_uverbs_wr_opcode {
+ IB_UVERBS_WR_RDMA_WRITE = 0,
+ IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1,
+ IB_UVERBS_WR_SEND = 2,
+ IB_UVERBS_WR_SEND_WITH_IMM = 3,
+ IB_UVERBS_WR_RDMA_READ = 4,
+ IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5,
+ IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6,
+ IB_UVERBS_WR_LOCAL_INV = 7,
+ IB_UVERBS_WR_BIND_MW = 8,
+ IB_UVERBS_WR_SEND_WITH_INV = 9,
+ IB_UVERBS_WR_TSO = 10,
+ IB_UVERBS_WR_RDMA_READ_WITH_INV = 11,
+ IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12,
+ IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13,
+ /* Review enum ib_wr_opcode before modifying this */
+};
+
struct ib_uverbs_send_wr {
__aligned_u64 wr_id;
__u32 num_sge;
- __u32 opcode;
+ __u32 opcode; /* see enum ib_uverbs_wr_opcode */
__u32 send_flags;
union {
__be32 imm_data;
--- /dev/null
+#!/bin/sh
+. lib/generic.sh
+
+DEV="$(rand_dev)"
+ts_ip "$0" "Add $DEV dummy interface" link add dev $DEV type dummy
+ts_ip "$0" "Enable $DEV" link set $DEV up
+ts_tc "$0" "Add ingress qdisc" qdisc add dev $DEV clsact
+
+TMP="$(mktemp)"
+echo filt add dev $DEV ingress pref 1000 matchall action pass >> "$TMP"
+echo filt add dev $DEV ingress pref 1000 matchall action pass >> "$TMP"
+
+"$TC" -b "$TMP" 2> $STD_ERR > $STD_OUT
+if [ $? -eq 0 ]; then
+ ts_err "$0: batch passed when it should have failed"
+elif [ ! -s $STD_ERR ]; then
+ ts_err "$0: batch produced no error message"
+else
+ echo "$0: batch failed, as expected"
+fi
+
+rm "$TMP"
+ts_ip "$0" "Del $DEV dummy interface" link del dev $DEV
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
install: all
- install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
+ for i in $(TARGETS); \
+ do install -m 0755 $$i $(DESTDIR)$(SBINDIR); \
+ done
clean:
rm -f $(TIPCOBJ) $(TARGETS)
open_json_object(NULL);
print_uint(PRINT_ANY, "type", "%-10u",
mnl_attr_get_u32(publ[TIPC_NLA_PUBL_TYPE]));
+ print_string(PRINT_FP, NULL, " ", "");
print_uint(PRINT_ANY, "lower", "%-10u",
mnl_attr_get_u32(publ[TIPC_NLA_PUBL_LOWER]));
+ print_string(PRINT_FP, NULL, " ", "");
print_uint(PRINT_ANY, "upper", "%-10u",
mnl_attr_get_u32(publ[TIPC_NLA_PUBL_UPPER]));
+ print_string(PRINT_FP, NULL, " ", "");
print_string(PRINT_ANY, "scope", "%-8s",
scope[mnl_attr_get_u32(publ[TIPC_NLA_PUBL_SCOPE])]);
+ print_string(PRINT_FP, NULL, " ", "");
print_uint(PRINT_ANY, "port", "%-10u",
mnl_attr_get_u32(publ[TIPC_NLA_PUBL_REF]));
+ print_string(PRINT_FP, NULL, " ", "");
print_string(PRINT_ANY, "node", "%s", str);
print_string(PRINT_FP, NULL, "\n", "");
close_json_object();