Communication device

The communication device addresses priority conflicts by setting priority information in communication frames for each execution unit, enabling effective priority control across multiple units sharing a socket, thus enhancing communication management.

JP2024143710AActive Publication Date: 2024-10-11DENSO CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023056509
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-11
Estimated Expiration
2043-03-30

AI Technical Summary

Technical Problem

Existing communication devices face challenges in setting different priorities for multiple execution units sharing a port number, leading to potential priority conflicts and impaired communication control.

Method used

The communication device includes a setting unit to set priority information in a communication frame using a transmission system call for each execution unit, allowing arbitrary priority settings across multiple execution units sharing a socket.

Benefits of technology

Enables independent priority control for each execution unit, ensuring effective communication management and priority handling in Ethernet frames, even when multiple service instances share a transport layer port number.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024143710000001_ABST
    Figure 2024143710000001_ABST
Patent Text Reader

Abstract

To provide a communication device that can use any priority level in multiple execution units.SOLUTION: An ECU includes an operating system including a communication interface, a platform that controls communication processing with other ECUs, software having an application that utilizes the operating system and the platform, and a processing device that executes the software. The application has multiple execution units that share a socket. The ECU sets priority information for data included in a transmission system call Ethernet frame called by each execution unit (S15 to S17). Then, the ECU generates an Ethernet frame including the set priority information (S18).SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a communication device. [Background technology]

[0002] 2. Description of the Related Art Conventionally, there is a technology disclosed in Patent Document 1 as an example of a communication device. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent Publication No. 2021-129270 Summary of the Invention [Problem to be solved by the invention]

[0004] However, when a communication device shares a transport layer port number among execution units such as multiple service instances, the communication device may not be able to use different priorities for each of them. In addition, for example, a communication device may have a system in which there are two service instances that provide data with different priorities to an application. Therefore, when a communication device can only release one port number for one application, the communication device needs to share the same priority even if the priority is different for each service instance.

[0005] One disclosed object is to provide a communication device capable of using any priority in a plurality of execution units. [Means for solving the problem]

[0006] The communication device disclosed herein comprises: A computer system including an operating system including a communication interface, a platform for controlling communication processing with other communication devices, software having an application that utilizes the operating system and the platform, and a processing device that executes the software; The application has multiple execution units that share sockets, The platform is A setting unit (S15 to S17) that sets priority information of data to be included in a communication frame by a transmission system call that each execution unit calls; and a generating unit (S18) that generates a communication frame including the priority information set by the setting unit.

[0007] The communication device disclosed herein sets priority information for data to be included in a communication frame by a transmission system call invoked by each execution unit, so that the communication device can use any priority information among multiple execution units that share a socket.

[0008] The aspects disclosed in this specification adopt different technical means to achieve their respective objectives. The claims and the parenthetical symbols described in this section are illustrative of the corresponding relationship with the embodiments described below, and are not intended to limit the technical scope. The objectives, features, and effects disclosed in this specification will become clearer by referring to the following detailed description and the attached drawings. [Brief description of the drawings]

[0009] [Figure 1] FIG. 2 is a block diagram showing a schematic configuration of an ECU. [Diagram 2] FIG. 2 is a block diagram showing a schematic configuration of software. [Diagram 3] FIG. 2 is a conceptual diagram showing a schematic configuration of a buffer. [Figure 4] 13 is a flowchart showing a layer 3 transmission process. [Diagram 5] 13 is a flowchart showing a UDP transmission process. [Figure 6] 1 is a flowchart showing a TCP transmission process. [Figure 7] 13 is a flowchart showing a TCP stream transmission process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment of the present disclosure will be described with reference to the drawings. In this embodiment, a communication device is applied to the ECU 100, 200. In addition, in this embodiment, the ECU 100, 200 that can be mounted on a vehicle is adopted. It can also be said that the ECU 100, 200 is equipped with a communication device.

[0011] Although the ECUs 100 and 200 have different control targets, they have the same basic configuration. That is, the ECUs 100 and 200 have different application functions. Therefore, the following description will be mainly focused on the ECU 100. Note that the present disclosure is not limited to the two ECUs 100 and 200, and three or more ECUs may be mounted on a vehicle.

[0012] ECU is an abbreviation for Electronic Control Unit. In the drawings, the software 10 is represented as SFT, the application 11 as APP, the platform 12 as PF, the operating system 13 as OS, the arithmetic processing unit 20 as CPU, the controller 30 as MAC, the transceiver 40 as PHY, and the switching hub 300 as ESW.

[0013] <ecu> 1, the ECU 100 and the ECU 200 are connected via a switching hub 300. Specifically, the ECU 100 and the switching hub 300 are connected via a communication line, and the switching hub 300 and the ECU 200 are connected via a communication line. The ECUs 100 and 200 and the switching hub 300 comply with IEEE802.1Q, which is a VLAN standard. The path connecting the ECU 100 and the ECU 200, including the switching hub 300, can also be called an Ethernet path. VLAN is an abbreviation for Virtual LAN.

[0014] The ECU 100 includes software 10, a processor 20 that executes the software 10, and a controller 30 and a transceiver 40 for performing Ethernet communication. The controller 30 can also be called a media access controller. The transceiver 40 can also be called a VLAN I / F or a physical transceiver. An example of the controller 30 can be called an Ethernet MAC. An example of the transceiver 40 can be called an Ethernet PHY. An Ethernet Switch is used as an example of the switching hub 300. Ethernet is a registered trademark. I / F is an abbreviation for interface.

[0015] The software 10 is stored in a ROM serving as a memory in the ECU 100. The arithmetic processing device 20 loads the software 10 from the ROM or the like into a RAM and executes it. The arithmetic processing device 20 executes the software 10 to perform Ethernet communication using the controller 30 and the transceiver 40. ROM is an abbreviation for Read Only Memory. RAM is an abbreviation for Random Access Memory. The memory is not limited to ROM and may be other storage media.

[0016] <Software> As shown in FIG. 2, the software 10 has component layers including an operating system 13, a platform 12, and an application 11 that uses these.

[0017] The operating system 13 has, as an interface for Ethernet communication, a BSD socket 13a, a program for processing each layer of TCP / UDP 13b, IP 13c, and Ethernet 13d, and an Ethernet communication driver (DRI) 13e. In this embodiment, POSIXOS is used as an example of the operating system 13. POSIX is an abbreviation for Portable Operating System Interface. POSIXOS can also be said to be an OS that complies with POSIX.

[0018] In the drawings, the BSD socket 13a is abbreviated as BSD. TCP is an abbreviation for Transmission Control Protocol. UDP is an abbreviation for User Datagram Protocol. IP is an abbreviation for Internet Protocol.

[0019] TCP / UDP 13b can be considered a Layer 4 (transport layer) communication protocol. In TCP / UDP 13b communication, a port number indicating the application process of the communication partner is defined. Hereinafter, it is also referred to as TCP 13b or UDP 13b.

[0020] The IP 13c can be considered to be a communication protocol of Layer 3 (network layer) which is a lower layer than the TCP / UDP 13b, while the Ethernet 13d can be considered to be a communication protocol of Layer 2 (data link layer) which is a lower layer than the IP 13c.

[0021] The BSD socket 13a is used when the application 11, which will be described later, calls the TCP / UDP 13b. The BSD socket 13a can also be considered as an API used when the application 11 uses the TCP / UDP 13b. The BSD socket 13a can also be considered to include, as a transmission system call, a transmission API for TCP transmission and a transmission API for UDP transmission. The port number can be considered as an identifier used in the BSD socket 13a. API is an abbreviation for Application Programming Interface.

[0022] When processing each of the layers TCP / UDP 13b, IP 13c, and Ethernet 13d, a communication layer buffer as shown in Fig. 3 is used. The communication layer buffer stores various headers, payload data, and other information. In more detail, in addition to payload data, the communication layer buffer has an area for a pointer indicating the next element, and an area for priority (priority information). The next element pointer has a pointer to the communication layer buffer to be sent next, so that data can be linked. In the following, payload data will also be simply referred to as payload.

[0023] Priority is information indicating the priority of the payload of the communication layer buffer. Priority is set in a predetermined field of the header when configuring an Ethernet frame (communication frame). For example, priority is set in the PCP of the IEEE802.1Q header. Therefore, priority can be considered as the value of PCP. PCP is an abbreviation for Priority Code Point. Priority can also be called VLAN Priority. In the drawings, priority is also written as VP.

[0024] Furthermore, when processing the BSD socket 13a, the socket buffer shown in Figure 3 is used. The socket buffer has an area for a pointer to a communication layer buffer and an area for a priority. As shown in Figure 3, the pointer to the communication layer buffer allows access to successive payloads to be sent by the BSD socket 13a and their priorities. When an Ethernet frame is constructed, if a priority has not been set in the communication layer buffer, the priority of the socket buffer is set in the PCP as an initial value.

[0025] The platform 12 provides an interface for a communication management (COM) 12a that controls communication processing between the ECUs 100 and 200. In other words, the platform 12 of the ECU 100 is for controlling communication processing with other communication devices such as the ECU 200. The communication management 12a binds protocols such as SOME / IP 12b and DDS 12c that are used in Ethernet communication. SOME / IP is an abbreviation for Scalable service-Oriented Middleware over IP. DDS is an abbreviation for Data Distribution Service. In this embodiment, the AUTOSARA adaptive platform is adopted as an example of the platform 12.

[0026] The application 11 uses an operating system 13 and a platform 12. The application 11 configures service instances 11a and event groups 11b using an interface provided by a communication management 12a. It can also be said that the application 11 includes the service instances 11a and the event groups 11b as execution units. In this embodiment, as an example, the application 11 is configured with a plurality of service instances 11a, each of which includes a plurality of event groups 11b.

[0027] The service instance 11a is a communication service for providing a service to the application 11 of another device such as the ECU 200. The event group 11b is a group of interfaces. The service instance 11a and the event group 11b are configured to be able to call a transmission API.

[0028] A service instance 11a and an event group 11b can have multiple interfaces for event communication. In the drawing, a service instance is represented as SI (Service Instance) and an event group is represented as EG (Event Group).

[0029] The ECU 100 is configured to be able to specify a priority by, for example, a transmission API of the BSD socket 13a. This allows multiple service instances 11a and multiple event groups 11b to control different PCPs while sharing the BSD socket 13a. The ECU 100 executes protocol processing required to transmit data specified by the transmission API.

[0030] In addition, the ECU 100 assigns priorities to the communication layer buffers used to store data in the transmission processes of TCP 13b and UDP 13b. When the priorities differ, the ECU 100 divides the communication layer buffers so that the PCP value of one Ethernet frame is determined to be one. This point will be explained in detail later.

[0031] <Processing Operation> The processing operation will be described with reference to Fig. 4 to Fig. 7. The flowcharts in Fig. 4 to Fig. 7 are performed by the arithmetic processing device 20 executing the software 10. Therefore, it can be said that the software 10 includes the procedures (functions) shown in each step in Fig. 4 to Fig. 7.

[0032] First, the transmission process of layer 3 will be described with reference to Fig. 4. In this embodiment, it is assumed that a priority area exists in the communication layer buffer in which communication data is stored.

[0033] In step S10, a header for layer 3 is created. Next, in step S11, a header for layer 2 is created. In this manner, the header for layer 3 and the header for layer 2 are created in that order.

[0034] In step S12, it is determined whether or not to transmit from a VLAN I / F. If it is determined to transmit from a VLAN I / F, the process proceeds to step S13, and if it is not determined to transmit from a VLAN I / F, the process proceeds to step S18.

[0035] In step S13, it is determined whether or not a priority (VP) is set in the communication layer buffer. If it is determined that a priority is set in the communication layer buffer, the process proceeds to step S17, and if it is determined that a priority is not set, the process proceeds to step S14.

[0036] In step S14, it is determined whether or not a priority is set in the BSD socket 13a (socket buffer). If it is determined that a priority is set in the BSD socket 13a, the process proceeds to step S16, and if it is determined that a priority is not set, the process proceeds to step S15.

[0037] In step S17, the priority of the communication layer buffer is set to PCP. In step S16, the priority of the BSD socket 13a is set to PCP as an initial value. If no priority is set in either the communication layer buffer or the BSD socket 13a, the priority of the VLAN I / F is set to PCP in step S15. In this way, in the ECU 100, the priority of an Ethernet frame can be set by the transmission API. Also, it can be said that the software 10 has a procedure for setting the priority of an Ethernet frame by the transmission API. Steps S15 to S17 correspond to a setting unit.

[0038] In step S18, a frame is constructed. That is, once the layer 3 header and layer 2 header have been generated, they are concatenated with the layer 3 payload to generate an Ethernet frame (generation unit). Therefore, when transmitting from the VLAN I / F, in step S18, the priority set in any of steps S15 to S17 is set in the Ethernet frame.

[0039] In step S19, the controller 30 (MAC) is operated. That is, the controller 30 is controlled to transmit the Ethernet frame generated in step S18. At this time, the Ethernet frame is transmitted onto the Ethernet path via the transceiver 40.

[0040] According to SOME / IP Specification R21-11 PRS_SOMEIP_00163, multiple SOME / IP service instances can share the same transport layer port number in the AUTOSARAdaptivePlatform. Also, according to Specification of Manifest R21-11 10.1.1 VLAN Priority, the AUTOSARAdaptivePlatform allows VLANPriority to be set for each service instance. Furthermore, in a POSIX OS such as Linux (registered trademark) on which the AUTOSARAdaptivePlatform is based, the transport layer port number corresponds 1:1 to the BSD socket, and a unique value is set for the VLANPriority for the BSD socket. This makes it possible to control the PCP compliant with IEEE802.1Q on a BSD socket basis. Therefore, when multiple service instances share a transport layer port number, it is not possible to use different PCPs compliant with IEEE802.1Q that are used for each service instance.

[0041] However, for example, suppose that there are two application 11 service instances 11a, one providing high-priority data and the other providing low-priority data. In this case, if only one port number can be released for one application 11 due to system constraints, the same priority value must be shared for each service instance 11a even if the data priority differs for each service instance 11a. This may make it impossible to perform priority control when communicating Ethernet frames by the transceiver 40 or the switching hub 300. The same applies between multiple event groups.

[0042] Therefore, the ECU 100 is configured to set the priority for each service instance 11a from the transmission API of the BSD socket 13a. Therefore, the ECU 100 allows multiple service instances 11a sharing the BSD socket 13a to use any PCP value. Similarly, the ECU 100 can set the priority for each event group 11b from the transmission API.

[0043] Therefore, the ECU 100 allows multiple service instances 11a and multiple event groups 11b that share the BSD socket 13a to use any PCP value. In other words, the ECU 100 can control different PCPs for multiple service instances 11a and multiple event groups 11b that share a transport layer port number. Furthermore, it can be said that the software 10 can cause multiple service instances 11a or multiple event groups 11b that share the BSD socket 13a to use any PCP value. Therefore, the ECU 100 can perform priority control in the transmission, reception, and transfer of Ethernet frames by the transceiver 40 and the switching hub 300. Note that sharing the BSD socket 13a is synonymous with sharing a port number.

[0044] Next, the UDP transmission process will be described with reference to Fig. 5. The flowchart in Fig. 5 is executed when the UDP transmission API is called.

[0045] In step S20, a communication layer buffer is allocated. When the transmission API is called, a communication layer buffer capable of storing a payload (transmission payload) is allocated. In step S21, the payload is copied to the communication layer buffer. When the communication layer buffer is allocated, the next element pointer of the previous stream data is updated to concatenate the data.

[0046] In step S22, the priority is stored in the communication layer buffer. The priority passed as an argument is stored in the communication layer buffer (storage unit). In step S23, a layer 4 header is generated. Here, a UDP header is generated. Then, in step S24, layer 3 transmission processing is executed.

[0047] When a UDP socket is shared by multiple service instances 11a, the ECU 100 can directly set a priority in the communication layer buffer. That is, when a port number used in a transmission API for UDP transmission is shared, the ECU 100 can directly set a priority in the communication layer buffer. In this case, the ECU 100 executes steps S13 and S17. Therefore, in step S18, the ECU 100 generates an Ethernet frame including the priority stored in the communication layer buffer. Therefore, the ECU 100 can change the PCP value of the UDP Ethernet frame for each transmission API. Also, the ECU 100 can set the PCP value of one UDP Ethernet frame to one.

[0048] Next, the TCP transmission process will be described with reference to Figures 6 and 7. The TCP transmission process is divided into the process when the TCP transmission API is called and the process when a TCP stream is transmitted.

[0049] 6 is executed when the TCP transmission API is called. In step S30, it is determined whether there is free space in the existing communication layer buffer. If it is determined that there is free space, the process proceeds to step S31, and if it is determined that there is no free space, the process proceeds to step S34.

[0050] In step S31, it is determined whether the priority (VP) matches the immediately previous stream data (SD) that has already been stored. In other words, it is determined whether the priority of the immediately previous stream data matches the priority of the stream data to be transmitted this time. If it is determined that they match, the process proceeds to step S32, and if it is determined that they do not match, the process proceeds to step S34. Stream data corresponds to data. Stream data is also called the transmission payload.

[0051] If there is free space in the communication layer buffer and the priority of the stream data matches, steps S32 and S33 are executed. In step S32, the transmission payload is copied to the free space in the communication layer buffer that stores the immediately previous stream data. In step S33, the transmission stream size (TSS) size of the same priority is updated.

[0052] If there is no free space in the communication layer buffer or if the priority does not match the stream data, steps S34 to S37 are executed. In step S34, a communication layer buffer capable of storing the payload is allocated. In step S35, the transmission payload is copied to the communication layer buffer. When the communication layer buffer is allocated, the next element pointer of the previous stream data is updated to concatenate the data.

[0053] In step S36, the priority passed as the next argument is stored in the communication layer buffer (division section). In step S37, the communication layer buffer is linked to the stream queue. Then, the process proceeds to step S38, where the TCP stream is sent.

[0054] In this way, when a TCP socket is shared by multiple service instances 11a, the ECU 100 divides the communication layer buffer that stores data for each different priority. That is, when a port number used in a transmission API for TCP transmission is shared, the ECU 100 divides the communication layer buffer that stores data for each different priority. Also, when a TCP socket is shared, the ECU 100 divides the communication layer buffer at a position where the priority of the stream data changes. Thus, the ECU 100 can change the PCP value of a TCP Ethernet frame for each transmission API. Also, the ECU 100 can set the PCP value of one TCP Ethernet frame to one.

[0055] Next, the transmission process of the TCP stream will be described with reference to Fig. 7. Note that Fig. 7 is also executed when called in the ACK reception process. Therefore, it may be executed in the reception process of a positive response from a communication partner such as ECU 200. ACK is an abbreviation of ACKnowledgement.

[0056] In step S40, the process waits until transmission becomes possible. In other words, the process waits until there is space in the transmittable size (TPS). When there is space in the transmittable size, the process proceeds to step S41. Steps S41 to S46 are repeated until there is no more space in the transmittable size. The transmittable size is the amount of data that can be transmitted without waiting for an ACK response. The transmittable size can also be considered as the size in which one Ethernet frame can be transmitted.

[0057] In step S41, it is determined whether the transmission stream size (TSS) of the same priority is larger than the transmittable size (TPS). If it is determined that the transmission stream size is larger than the transmittable size, the process proceeds to step S42, and if it is determined that the transmission stream size is not larger than the transmittable size, the process proceeds to step S43. The transmission stream size is the size (amount of data) of the stream data.

[0058] This is to determine the TCP segment size (SGS). Also, the reason why it is set as the transmission stream size of the same priority is to prevent different priorities from being mixed in one Ethernet frame. The segment size is the size of the TCP segment (including the header and data), and is the transmission unit sent and received by TCP.

[0059] In step S42, the segment size is set to the transmittable size. In other words, if the transmission stream size is larger, it is not possible to send all the stream data in one Ethernet frame. Therefore, the segment size is set to the transmittable size.

[0060] In step S43, the segment size is set to the same priority transmission stream size. If the transmission stream size is smaller or equal to the transmittable size, the same priority stream data can be sent in one Ethernet frame. Therefore, the segment size is set to the same priority transmission stream size.

[0061] In step S44, the payload and priority for the segment size are copied to the communication layer buffer (storage unit). The communication layer buffer here is reallocated for data transmission, and corresponds to the transmission buffer.

[0062] In this way, when constructing a TCP segment, the ECU 100 stores only payloads (data) with the same priority in the transmission buffer. In other words, when constructing a TCP segment, the ECU 100 obtains only stream data with the same priority. It can also be said that the ECU 100 obtains stream data only from socket buffers with the same priority.

[0063] Then, in step S45, a layer 4 header is generated. A layer 4 header is generated for the payload data copied in step S44. Here, a TCP header is generated. In step S46, a layer 3 transmission process is executed.

[0064] Although the preferred embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments, and various modifications are possible without departing from the spirit and scope of the present disclosure.

[0065] Although the present disclosure has been described based on the embodiment, it is understood that the present disclosure is not limited to the embodiment or structure. The present disclosure also encompasses various modifications and modifications within the equivalent range. In addition, although various combinations and forms are shown in the present disclosure, other combinations and forms including only one element, more than one element, or less than one element are also within the scope and concept of the present disclosure. [Explanation of symbols]

[0066] 10... software, 20... processing unit, 30... controller, 40... transceiver, 11... application, 12... platform, 13... operating system, 100, 200... ECU, 300... switching hub< / ecu>

Claims

1. A computer system comprising: an operating system including a communication interface; a platform for controlling communication processing with other communication devices; software having an application that utilizes the operating system and the platform; and a processing device that executes the software; the application has multiple execution units that share a socket; The platform includes: A setting unit (S15 to S17) that sets priority information of data to be included in a communication frame by a transmission system call that each execution unit calls; a generating unit (S18) that generates the communication frame including the priority information set by the setting unit.

2. The communication device according to claim 1 , wherein the execution unit is a service instance.

3. The communication device according to claim 1 , wherein the execution unit is an event group.

4. When a UDP socket is shared as the socket, a storage unit (S22) is provided for storing the priority information in a communication layer buffer; The communication device according to claim 1 , wherein the generation unit generates the communication frame including the priority information stored in the communication layer buffer.

5. the priority information is stored in a communication layer buffer; A communication device according to any one of claims 1 to 3, further comprising a division unit (S36) that divides the communication layer buffer in which the priority information is stored according to differences when a TCP socket is shared as the socket.

6. 6. The communication device according to claim 5, further comprising a storage unit (S41 to S44) for storing, in a transmission buffer, only the data having the same priority information when forming a TCP segment.

7. The communication device according to claim 1 , wherein the generation unit sets the priority information in an IEEE 802.1Q header in an Ethernet frame as the communication frame.

8. The communication device of claim 1 , wherein the platform is an AUTOSAR Adaptive Platform.

Citation Information

Patent Citations

  • Method and system for dispatching received sessions between multiple instances of application using the same IP port

    JP2010154518A

  • CLOUD SCALE MULTI-TENANCY FOR RDMA OVER CONVERGED ETHERNET (RoCE)

    US20220209993A1

  • Apparatus and method for implementing dynamic service-oriented communication between vehicle applications on autosar adaptive platform

    WO2023013814A1

  • Communication device

    JP2021129270A