On Wed Jul 29 2020, Richard Cochran wrote:
> On Wed, Jul 29, 2020 at 12:29:08PM +0200, Kurt Kanzenbach wrote:
>> I'll test it and send v3. But before, I've got another question that
>> somebody might have an answer to:
>>
>> The ptp v1 code always does locate the message type at
>>
>> msgtype =
Kurt Kanzenbach writes:
> On Wed Jul 29 2020, Russell King - ARM Linux admin wrote:
>> Would it make more sense to do:
>>
>> u8 *data = skb_mac_header(skb);
>> u8 *ptr = data;
>>
>> if (type & PTP_CLASS_VLAN)
>> ptr += VLAN_HLEN;
>>
>> switch (type & PTP_CLASS_P
On Wed, Jul 29, 2020 at 12:29:08PM +0200, Kurt Kanzenbach wrote:
> I'll test it and send v3. But before, I've got another question that
> somebody might have an answer to:
>
> The ptp v1 code always does locate the message type at
>
> msgtype = data + offset + OFF_PTP_CONTROL
>
> OFF_PTP_CONTR
On Wed, Jul 29, 2020 at 11:02:57AM +0100, Russell King - ARM Linux admin wrote:
> in other words, compare pointers, so that whether skb_push() etc has
> been used on the skb is irrelevant?
+1
On 29/07/2020 00:06, Petr Machata wrote:
Kurt Kanzenbach writes:
On Mon Jul 27 2020, Petr Machata wrote:
So this looks good, and works, but I'm wondering about one thing.
Thanks for testing.
Your code (and evidently most drivers as well) use a different check
than mlxsw, namely skb->
On Wed Jul 29 2020, Russell King - ARM Linux admin wrote:
> On Tue, Jul 28, 2020 at 11:06:08PM +0200, Petr Machata wrote:
>>
>> Kurt Kanzenbach writes:
>>
>> > On Mon Jul 27 2020, Petr Machata wrote:
>> >> So this looks good, and works, but I'm wondering about one thing.
>> >
>> > Thanks for tes
On Tue, Jul 28, 2020 at 11:06:08PM +0200, Petr Machata wrote:
>
> Kurt Kanzenbach writes:
>
> > On Mon Jul 27 2020, Petr Machata wrote:
> >> So this looks good, and works, but I'm wondering about one thing.
> >
> > Thanks for testing.
> >
> >>
> >> Your code (and evidently most drivers as well)
Kurt Kanzenbach writes:
> On Mon Jul 27 2020, Petr Machata wrote:
>> So this looks good, and works, but I'm wondering about one thing.
>
> Thanks for testing.
>
>>
>> Your code (and evidently most drivers as well) use a different check
>> than mlxsw, namely skb->len + ETH_HLEN < X. When I print
On Tue Jul 28 2020, Kurt Kanzenbach wrote:
> On Mon Jul 27 2020, Petr Machata wrote:
>> So this looks good, and works, but I'm wondering about one thing.
>
> Thanks for testing.
>
>>
>> Your code (and evidently most drivers as well) use a different check
>> than mlxsw, namely skb->len + ETH_HLEN <
On Mon Jul 27 2020, Petr Machata wrote:
> So this looks good, and works, but I'm wondering about one thing.
Thanks for testing.
>
> Your code (and evidently most drivers as well) use a different check
> than mlxsw, namely skb->len + ETH_HLEN < X. When I print_hex_dump()
> skb_mac_header(skb), skb
Kurt Kanzenbach writes:
> @@ -329,30 +327,14 @@ static int mlxsw_sp_ptp_parse(struct sk_buff *skb,
> return -ERANGE;
> }
>
> - if (ptp_class & PTP_CLASS_VLAN)
> - offset += VLAN_HLEN;
> -
> - switch (ptp_class & PTP_CLASS_PMASK) {
> - case PTP_CLASS_I
In order to reduce code duplication between ptp drivers, generic helper
functions were introduced. Use them.
Signed-off-by: Kurt Kanzenbach
---
.../ethernet/mellanox/mlxsw/spectrum_ptp.c| 32 ---
1 file changed, 7 insertions(+), 25 deletions(-)
diff --git a/drivers/net/ether
12 matches
Mail list logo