summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2016-05-17 10:52:14 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-05-18 16:00:51 +0900
commit13ae023f2ddba23116af253136c52c93c1987edf (patch)
treecf2da318934194da603e1ad1dd11d195f3560c9b
parent9d9f28519f0de2e07206feba2d18cf608f822410 (diff)
doc: Remove warnings when building doc pages
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--doc/source/app/ofctl_rest.rst41
-rw-r--r--ryu/lib/packet/tcp.py8
-rw-r--r--ryu/ofproto/nx_match.py53
3 files changed, 53 insertions, 49 deletions
diff --git a/doc/source/app/ofctl_rest.rst b/doc/source/app/ofctl_rest.rst
index cda76cfc..1cba2f65 100644
--- a/doc/source/app/ofctl_rest.rst
+++ b/doc/source/app/ofctl_rest.rst
@@ -1664,7 +1664,7 @@ Get meters stats
.. _get-meter-config-stats:
Get meter config stats
-------------------------
+----------------------
Get meter description stats
---------------------------
@@ -1820,9 +1820,9 @@ Add a flow entry
Request message body(Openflow1.4 or later):
- ============= ===================================================== =============================== ===============
+ ============= ===================================================== ================================ ===============
Attribute Description Example Default
- ============= ===================================================== =============================== ===============
+ ============= ===================================================== ================================ ===============
dpid Datapath ID (int) 1 (Mandatory)
cookie Opaque controller-issued identifier (int) 1 0
cookie_mask Mask used to restrict the cookie bits (int) 1 0
@@ -2555,7 +2555,7 @@ Send a experimenter message
.. _description-of-match-and-actions:
Reference: Description of Match and Actions
-============================================
+===========================================
Description of Match on request messages
----------------------------------------
@@ -2636,7 +2636,7 @@ Description of Match on request messages
tunnel_id Logical Port Metadata (int or string) {"tunnel_id": 7} or {"tunnel_id": "0x07/0xff"}
(Openflow1.3+)
ipv6_exthdr IPv6 Extension Header pseudo-field (int or string) {"ipv6_exthdr": 3, "eth_type": 34525} or {"ipv6_exthdr": "0x40/0x1F0", "eth_type": 34525}
- (Openflow1.3+)
+ (Openflow1.3+)
pbb_uca PBB UCA hander field(int) {"pbb_uca": 1, "eth_type": 35047}
(Openflow1.4+)
tcp_flags TCP flags(int) {"tcp_flags": 2, "ip_proto": 6, "eth_type": 2048}
@@ -2826,19 +2826,20 @@ Example of set-field action
"match":{
"dl_type": "0x8000"
},
- "actions":[
- {
- "type": "PUSH_VLAN", # Push a new VLAN tag if a input frame is non-VLAN-tagged
- "ethertype": 33024 # Ethertype 0x8100(=33024): IEEE 802.1Q VLAN-tagged frame
- },
- {
- "type": "SET_FIELD",
- "field": "vlan_vid", # Set VLAN ID
- "value": 4102 # Describe sum of vlan_id(e.g. 6) | OFPVID_PRESENT(0x1000=4096)
- },
- {
- "type": "OUTPUT",
- "port": 2
- }
- ]
+ "actions":[
+ {
+ "type": "PUSH_VLAN", # Push a new VLAN tag if a input frame is non-VLAN-tagged
+ "ethertype": 33024 # Ethertype 0x8100(=33024): IEEE 802.1Q VLAN-tagged frame
+ },
+ {
+ "type": "SET_FIELD",
+ "field": "vlan_vid", # Set VLAN ID
+ "value": 4102 # Describe sum of vlan_id(e.g. 6) | OFPVID_PRESENT(0x1000=4096)
+ },
+ {
+ "type": "OUTPUT",
+ "port": 2
+ }
+ ]
}' http://localhost:8080/stats/flowentry/add
+
diff --git a/ryu/lib/packet/tcp.py b/ryu/lib/packet/tcp.py
index 80c49928..1771b9a1 100644
--- a/ryu/lib/packet/tcp.py
+++ b/ryu/lib/packet/tcp.py
@@ -98,11 +98,11 @@ class tcp(packet_base.PacketBase):
returns boolean if all passed flags is set
- eg.
+ Example::
- # Check if this is a syn+ack
- if pkt.has_flags(tcp.TCP_SYN, tcp.TCP_ACK):
- ...
+ >>> pkt = tcp.tcp(bits=(tcp.TCP_SYN | tcp.TCP_ACK))
+ >>> pkt.has_flags(tcp.TCP_SYN, tcp.TCP_ACK)
+ True
"""
mask = sum(flags)
diff --git a/ryu/ofproto/nx_match.py b/ryu/ofproto/nx_match.py
index d17fc73b..49a5e03d 100644
--- a/ryu/ofproto/nx_match.py
+++ b/ryu/ofproto/nx_match.py
@@ -1240,9 +1240,9 @@ The API of this class is the same as ``OFPMatch``.
You can define the flow match by the keyword arguments.
The following arguments are available.
-================ =============== ==================================
+================ =============== ==============================================
Argument Value Description
-================ =============== ==================================
+================ =============== ==============================================
eth_dst_nxm MAC address Ethernet destination address.
eth_src_nxm MAC address Ethernet source address.
eth_type_nxm Integer 16bit Ethernet type. Needed to support Nicira
@@ -1256,8 +1256,8 @@ tun_ipv4_src IPv4 address Tunnel IPv4 source address.
tun_ipv4_dst IPv4 address Tunnel IPv4 destination address.
pkt_mark Integer 32bit Packet metadata mark.
tcp_flags_nxm Integer 16bit TCP Flags. Requires setting fields:
- eth_type_nxm = |IP or IPv6| and
- ip_proto_nxm = TCP
+ eth_type_nxm = [0x0800 (IP)|0x86dd (IPv6)] and
+ ip_proto_nxm = 6 (TCP)
conj_id Integer 32bit Conjunction ID used only with
the conjunction action
ct_state Integer 32bit Conntrack state.
@@ -1267,27 +1267,30 @@ ct_label Integer 128bit Conntrack label.
_dp_hash Integer 32bit Flow hash computed in Datapath.
reg<idx> Integer 32bit Packet register.
<idx> is register number 0-7.
-================ =============== ==================================
-
-Example:: Setting the TCP flags via the nicira extensions.
- This is required when using OVS version < 2.4.
-
- When using the nxm fields, you need to use any nxm prereq
- fields as well or you will receive a OFPBMC_BAD_PREREQ error
-
- # WILL NOT work
- flag = tcp.TCP_ACK
- match = parser.OFPMatch(
- tcp_flags_nxm=(flag, flag),
- ip_proto=inet.IPPROTO_TCP,
- eth_type=eth_type)
-
- # works
- flag = tcp.TCP_ACK
- match = parser.OFPMatch(
- tcp_flags_nxm=(flag, flag),
- ip_proto_nxm=inet.IPPROTO_TCP,
- eth_type_nxm=eth_type)
+================ =============== ==============================================
+
+.. Note::
+
+ Setting the TCP flags via the nicira extensions.
+ This is required when using OVS version < 2.4.
+ When using the nxm fields, you need to use any nxm prereq
+ fields as well or you will receive a OFPBMC_BAD_PREREQ error
+
+ Example::
+
+ # WILL NOT work
+ flag = tcp.TCP_ACK
+ match = parser.OFPMatch(
+ tcp_flags_nxm=(flag, flag),
+ ip_proto=inet.IPPROTO_TCP,
+ eth_type=eth_type)
+
+ # Works
+ flag = tcp.TCP_ACK
+ match = parser.OFPMatch(
+ tcp_flags_nxm=(flag, flag),
+ ip_proto_nxm=inet.IPPROTO_TCP,
+ eth_type_nxm=eth_type)
"""
oxm_types = [