]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Merge branch 'iproute2-master' into iproute2-next
authorDavid Ahern <dsahern@gmail.com>
Fri, 7 Dec 2018 21:02:08 +0000 (13:02 -0800)
committerDavid Ahern <dsahern@gmail.com>
Fri, 7 Dec 2018 21:02:08 +0000 (13:02 -0800)
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/Makefile
ip/iplink_can.c
lib/libnetlink.c
rdma/Makefile
rdma/include/uapi/rdma/ib_user_verbs.h
testsuite/tests/tc/batch.t [new file with mode: 0755]
tipc/Makefile
tipc/nametable.c

index ace34c7b0d600a520f65d59a696283019e25fef8..7da7d1fa18d5068e36ba0f842805e800d26539fa 100644 (file)
@@ -8,9 +8,6 @@ ifeq ($(HAVE_MNL),y)
 DEVLINKOBJ = devlink.o mnlg.o
 TARGETS += devlink
 
-CFLAGS += $(shell $(PKG_CONFIG) libmnl --cflags)
-LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
-
 endif
 
 all: $(TARGETS) $(LIBS)
@@ -19,7 +16,9 @@ devlink: $(DEVLINKOBJ)
        $(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)
index c0deeb1f1fcf38e466ce38d8c1ebebab399db669..5bf490a9d1c3f1e9d33c09ae10bf81b65cec1619 100644 (file)
@@ -283,7 +283,7 @@ static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
        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");
        }
 
index c0b80ed6fdfb839a3e9560de5b52ac1b048f0ab9..954571097ea8dd90a1ec3461da84865a4655f1be 100644 (file)
@@ -763,6 +763,7 @@ static int __rtnl_talk_iov(struct rtnl_handle *rtnl, struct iovec *iov,
        msg.msg_iovlen = 1;
        i = 0;
        while (1) {
+next:
                status = rtnl_recvmsg(rtnl->fd, &msg, &buf);
                ++i;
 
@@ -826,6 +827,8 @@ static int __rtnl_talk_iov(struct rtnl_handle *rtnl, struct iovec *iov,
                                else
                                        free(buf);
 
+                               if (i < iovlen)
+                                       goto next;
                                return error ? -i : 0;
                        }
 
index 819fcbe37506ae7252288eb711078213a3fa479c..0498994fc23339a8494752e10631ee09d8556199 100644 (file)
@@ -17,7 +17,9 @@ rdma: $(RDMA_OBJ) $(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 $(RDMA_OBJ) $(TARGETS)
index 25a16760de2ad1c6a735d71b3bd4edcc07f1e3c3..1254b51a551a1c370557340a2c480467dd1e5bac 100644 (file)
@@ -763,10 +763,28 @@ struct ib_uverbs_sge {
        __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;
diff --git a/testsuite/tests/tc/batch.t b/testsuite/tests/tc/batch.t
new file mode 100755 (executable)
index 0000000..50e7ba3
--- /dev/null
@@ -0,0 +1,23 @@
+#!/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
index fdb18d39b67d5ba3bd1346b83534ebc1d29e7ab4..a10debe08c619756266cd2ba9e3794b043a60b11 100644 (file)
@@ -22,7 +22,9 @@ tipc: $(TIPCOBJ)
        $(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)
index eb4bd0bda83583bd44ac8134996f25fc1ef5b093..d899eeb67c07dcf0edd2d32410b7d0c6413b3f1d 100644 (file)
@@ -58,14 +58,19 @@ static int nametable_show_cb(const struct nlmsghdr *nlh, void *data)
        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();