From: Antonio Quartulli <antonio@open-mesh.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
davem@davemloft.net
Cc: netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [PATCH] skbedit: allow the user to specify bitmask for mark
Date: Mon, 21 Jul 2014 14:08:45 +0200 [thread overview]
Message-ID: <53CD02CD.7050300@open-mesh.com> (raw)
In-Reply-To: <53CD01E7.50004@cogentembedded.com>
[-- Attachment #1: Type: text/plain, Size: 876 bytes --]
On 21/07/14 14:04, Sergei Shtylyov wrote:
>> diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c
>> index fcfeeaf..5fca32b 100644
>> --- a/net/sched/act_skbedit.c
>> +++ b/net/sched/act_skbedit.c
>> @@ -43,8 +43,12 @@ static int tcf_skbedit(struct sk_buff *skb, const
>> struct tc_action *a,
>> if (d->flags & SKBEDIT_F_QUEUE_MAPPING &&
>> skb->dev->real_num_tx_queues > d->queue_mapping)
>> skb_set_queue_mapping(skb, d->queue_mapping);
>> - if (d->flags & SKBEDIT_F_MARK)
>> - skb->mark = d->mark;
>> + if (d->flags & SKBEDIT_F_MARK) {
>> + /* unset all the bits in the mask */
>> + skb->mark = skb->mark & ~d->mask;
>
> Why not 'skb->mark &= ~d->mask;'?
No real reason :) Shall we always use the compressed version of this
operator when possible ?
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
next prev parent reply other threads:[~2014-07-21 12:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 8:35 [PATCH] skbedit: allow the user to specify bitmask for mark Antonio Quartulli
2014-07-21 10:43 ` Jamal Hadi Salim
2014-07-21 12:04 ` Sergei Shtylyov
2014-07-21 12:08 ` Antonio Quartulli [this message]
2014-07-21 12:31 ` Eric Dumazet
2014-07-21 12:45 ` Antonio Quartulli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53CD02CD.7050300@open-mesh.com \
--to=antonio@open-mesh.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.