Change in vdsm[ovirt-3.6]: net: Support VLAN hardware offloading in hostQOS
danken at redhat.com
danken at redhat.com
Mon Oct 19 21:57:33 UTC 2015
Dan Kenigsberg has posted comments on this change.
Change subject: net: Support VLAN hardware offloading in hostQOS
......................................................................
Patch Set 3: Code-Review-1
(2 comments)
minor nits regarding parsing (which we never use, but let's make it less misleading)
https://gerrit.ovirt.org/#/c/47443/3/vdsm/network/tc/filter.py
File vdsm/network/tc/filter.py:
Line 171: def _parse_ematch_match(first_arg, tokens):
Line 172: data = {}
Line 173: if first_arg in ('random', 'loadavg_1', 'nf_mark', 'vlan', 'sk_rcvbuf',
Line 174: 'sk_snd_queue'):
Line 175: data['object'] = first_arg
there are plenty more objects. We don't have to parse them all (or any other than 'vlan'), but we'd better acknowledge their existence with an "else" clause and an early exit from the function.
--------------------------------------------------------
ID Type Description
--------------------------------------------------------
Generic:
random INT Random value (32 bit)
loadavg_1 INT Load average in last minute
loadavg_5 INT Load average in last 5 minutes
loadavg_15 INT Load average in last 15 minutes
Interfaces:
dev INT,VAR Device the packet is on
Packet attributes:
priority INT Priority of packet
protocol INT Link layer protocol
pkt_type INT Packet type (uni|multi|broad|...)cast
pkt_len INT Length of packet
data_len INT Length of data in packet
mac_len INT Length of link layer header
Netfilter:
nf_mark INT Netfilter mark
fwmark INT Alias for nf_mark
Traffic Control:
tc_index INT TC Index
Routing:
rt_classid INT Routing ClassID (cls_route)
rt_iif INT Incoming interface index
vlan INT Vlan tag
Sockets:
sk_family INT Address family
sk_state INT State
sk_reuse INT Reuse Flag
sk_bind_if INT,VAR Bound interface
sk_refcnt INT Reference counter
sk_shutdown INT Shutdown mask
sk_proto INT Protocol
sk_type INT Type
sk_rcvbuf INT Receive buffer size
sk_rmem INT RMEM
sk_wmem INT WMEM
sk_omem INT OMEM
sk_wmem_queue INT WMEM queue
sk_snd_queue INT Send queue length
sk_rcv_queue INT Receive queue length
sk_err_queue INT Error queue length
sk_fwd_alloc INT Forward allocations
sk_sndbuf INT Send buffer size
--------------------------------------------------------
Illegal "ematch"
Line 176: for token in tokens:
Line 177: if token in ('eq', 'lt', 'gt'):
Line 178: data['relation'] = token
Line 179: data['value'] = next(tokens).strip(')')
Line 175: data['object'] = first_arg
Line 176: for token in tokens:
Line 177: if token in ('eq', 'lt', 'gt'):
Line 178: data['relation'] = token
Line 179: data['value'] = next(tokens).strip(')')
It's not important for our use case, but the value for all our supported "objects" is an int. so we'd better call parse_int (and parse_hex() for mask.
Line 180: elif token == 'mask':
Line 181: data['mask'] = _parser.parse_str(tokens)
Line 182: else:
Line 183: logging.info('could not parse ematch filter. token=%s', token)
--
To view, visit https://gerrit.ovirt.org/47443
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I667a9f38f4314da309685f6ba247f705a2e9c23e
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list