Module: xenomai-3
Branch: stable-3.0.x
Commit: f6f9729194cd8d2d5bd8e4e6151ebd51cf0c701d
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f6f9729194cd8d2d5bd8e4e6151ebd51cf0c701d

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Dec  6 13:40:19 2017 +0100

net: convert to rtdm_get_iov_flatlen()

---

 kernel/drivers/net/stack/ipv4/udp/udp.c     |    4 ++--
 kernel/drivers/net/stack/packet/af_packet.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/drivers/net/stack/ipv4/udp/udp.c 
b/kernel/drivers/net/stack/ipv4/udp/udp.c
index 80db4b4..8e80d3e 100644
--- a/kernel/drivers/net/stack/ipv4/udp/udp.c
+++ b/kernel/drivers/net/stack/ipv4/udp/udp.c
@@ -473,7 +473,7 @@ ssize_t rt_udp_recvmsg(struct rtdm_fd *fd, struct 
user_msghdr *u_msg, int msg_fl
     __rtskb_pull(skb, sizeof(struct udphdr));
 
     flags = msg->msg_flags & ~MSG_TRUNC;
-    len = rt_iovec_len(iov, msg->msg_iovlen);
+    len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
 
     /* iterate over all IP fragments */
     do {
@@ -624,7 +624,7 @@ ssize_t rt_udp_sendmsg(struct rtdm_fd *fd, const struct 
user_msghdr *msg, int ms
     if (err)
            return err;
 
-    len = rt_iovec_len(iov, msg->msg_iovlen);
+    len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
     if ((len < 0) || (len > 0xFFFF-sizeof(struct iphdr)-sizeof(struct 
udphdr))) {
            err = -EMSGSIZE;
            goto out;
diff --git a/kernel/drivers/net/stack/packet/af_packet.c 
b/kernel/drivers/net/stack/packet/af_packet.c
index b1f8e67..9fa985d 100644
--- a/kernel/drivers/net/stack/packet/af_packet.c
+++ b/kernel/drivers/net/stack/packet/af_packet.c
@@ -380,7 +380,7 @@ rt_packet_recvmsg(struct rtdm_fd *fd, struct user_msghdr 
*u_msg, int msg_flags)
 
     /* The data must not be longer than the available buffer size */
     copy_len = rtskb->len;
-    len = rt_iovec_len(iov, msg->msg_iovlen);
+    len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
     if (len < 0) {
            copy_len = len;
            goto out;
@@ -483,7 +483,7 @@ rt_packet_sendmsg(struct rtdm_fd *fd, const struct 
user_msghdr *msg, int msg_fla
            goto abort;
     }
 
-    len = rt_iovec_len(iov, msg->msg_iovlen);
+    len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
     rtskb = alloc_rtskb(rtdev->hard_header_len + len, &sock->skb_pool);
     if (rtskb == NULL) {
        ret = -ENOBUFS;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to